This content originally appeared on Level Up Coding - Medium and was authored by Trey Huffine
An Interview with Amberflo.io’s CTO and Co-Founder, Lior Mechlovich
Lior (Lior Mechlovich), the CTO and co-founder of Amberflo.io, shares how they process billions of events to provide meter-based pricing as a service. Amberflo.io uses Lambda Functions to scale infinitely and provide a highly functional product with granular data.
“Scaling 0 to infinity is very important to us as we are serving high throughput companies with billions of meter events”
> Want your company to be interviewed in Level Up Coding? Fill out this form
> Are you a dev looking for an amazing job? Visit the Level Up hiring platform

What does your company do? What attracted you to the idea?
We started amberflo.io 2 years ago and as a CTO, my responsibilities include running an engineering team and as always in a young startup, a little bit of everything.
Amberflo.io is a cloud metering and usage-based billing platform. We help companies measure and accurately bill their customer based on usage.
My co-founder Puneet Gupta and I spent a lot of time at AWS and other leading companies, building and scaling usage-based cloud services with on-demand metered pricing, invoicing, and billing. We saw firsthand the tremendous benefits of leading with a usage-based business model.

Can you explain cloud metering and how your product functions?
We came from AWS where we could see exactly how usage-based pricing works. This could be compute power or API requests. It’s all about highly accurate data that can be billed — how much and how long.
We provide metering as a service, so it is a B2B solution. We help clients meter customers and then charge them using Stripe. So the same way that AWS bills its customers, we provide this same billing functionality as a service to our clients for the use case of their company and how their customers interact with their product.

Can you give some examples of how your customers use Amberflo.io?
We have clients all across the industry, especially infrastructure — API, storage, networks, etc. We can get even more granular like Kafka clusters where you provide the cloud provider, instance region, and size.
One example is API monetization — how long it ran or the records processed.
Another very interesting case is an AI B2C company that uses it as a wallet-based system that is monetized by actions, ex. tweets ingested or other AI actions.
How is the service delivered — an SDK?
There is an API and SDKs that allow our customers to utilize Amberflo. We can also connect through other ways like Cloudwatch ingesting.
What technology stack do you use, and why did you choose this stack?
We use serverless (AWS Lambda) with NodeJS and Java as the backend infrastructure. It was natural for us to build on top of AWS as the founding team had extensive AWS experience. We believe serverless best aligns with the real usage of our clients and our costs to support them. Scaling 0 to infinity is very important to us as we are serving high throughput companies with billions of meter events. Our system is event-driven with design principles around idempotency (process once and only once) for high accuracy.
NodeJS is for the platform and metadata and works with the website and user management.
Java is for heavier lifting like pipelines and billing. Java cold starts are an issue in Lambda Functions. Data pipelines are fine because it’s backoffice. For reactive web app performance, this can be bad.
The tradeoff for the price and scaling infinitely is huge, so the tradeoff is worth it for the cold starts. We handle billions of events which is only possible through Lambda. We bill our clients in the exact same way that Lambda Functions are billed to us (usage-based), so it aligns well.

What does a typical day look like for you?
- Daily meetings with the backend and frontend team.
- Customer meetings.
- Design/architecture meetings with the lead engineers
- Interviewing candidates
- Metetring data review (how many events amberflo system is ingesting, how many new meters created)
- Operational metrics (latency, errors, incidents)
Team: 13 employees. These days I mostly do meetings and organizing.
How did the company start?
My co-founder Puneet Gupta and I spent a lot of time at AWS and other leading companies, building and scaling usage-based cloud services with on-demand metered pricing, invoicing, and billing. We saw firsthand the tremendous benefits of leading with a usage-based business model.
Moving to usage-based accurate metering is not trivial and requires a heavy lift. We saw teams of various sizes (10–70 engineers) managing the billing/metering services in leading companies like Twillio, Databricks, and Snowflake.
We know how hard metered billing is. A lot harder than you initially think. We saw multiple companies building this metering and billing infrastructure, not always successfully, and know we can help them lead with usage-based pricing much easier and faster.
What makes your company unique?
We have been very clear about our founding team values from the start https://www.amberflo.io/about. We are fully remote and it is very important to us to keep the culture that we started with. We work on highly complex problems with high impact on our customers, the bar is high.
What are some of the most interesting problems you’re solving?
It starts with metering customer usage, accurately, at scale.
Idempotency and data deduplication — process once and only once: Make sure your customers are not overcharged (or undercharged).
In a distributed environment, preventing duplicate records is not an easy task. You would like the usage metering service to ignore duplicate records, even if the client retries the same record. This makes the usage metering service idempotent
Scaling to various workloads is tricky. Usage patterns can fluctuate and records must not be dropped
Scaling to millions and billions of events, for example for API calls metering, in a cost-effective manner. Calculating the aggregate number of API calls across the last 6 months, and then breakdown by top 10 customers for example.

What will the world look like once your company achieves its vision?
Metering customer usage will become a checkbox like monitoring servers today.
Today when you start a startup, you need a Datadog or elastic search. All the data has to go somewhere. It will be like that for metering as well. “Who is using what for how long”. You want to associate every action — a warehouse of all customer usage. It pushes this data to different applications. Metering becomes a full profile. You still want to know, businesswise, exactly what a customer's usage does and changes, and with amberflo, you can get highly granularity.
You can’t do that easily these days. Amplitude and Mixpanel only take web and mobile analytics — it sounds the same but it’s not. You can’t get a full range of what a customer does. You only define your funnels and get that output, but it’s really only things like web clicks and not API calls and real usage. No one builds metering or customer usage on their Amplitude. The products are great but it's not their focus.
For example, an AI company that does inference for AI models. They are creating so many models and instances, they are much more metering and backend focused. You need the volume and ability to really focus on all the actions taken.

How did you first get into software development?
I think it started when I was 14, with programming lessons I took and immediately fell in love with it. It became more than a hobby while serving in the IDF intelligence core. I always loved building things and being proud of what I built.
Are there any technologies or tools you’re playing around with right now that you’re excited about?
There are two things I’m finding very interesting at the moment:
- OpenTelemetry for serverless tracing. Pipelines are how you trace through all the functions that process the data. This is a highly technical and pervasive challenge. We also want to find the equivalent in metering.
- AWS Lambda running on ARM instances for a reduced cost.
Describe your computer hardware setup
MacBook pro M1, 16GB
Describe your computer software setup
Visual Studio Code, Slack, Github desktop, AWS CLI
Are you hiring and for what roles?
Developers, SRE/devops, product designer, product manager.
Reach out to jobs@amberflo.io
Where can we go to learn more?
Level Up Coding
Level Up is a community of 3 million monthly developers (learn more and follow or read more interviews). We also work with the best startups and most innovative tech companies 🔥
- Are you a developer? Have the best companies reach out to you by joining the Level Up talent collective ➡️ Join Talent Collective as a Dev
- Are you a company hiring developers? Hire FAANG-caliber engineers from the Level Up community ➡️ Hire Engineers
- Do you want to be interviewed in Level Up to share your company? Fill out our form to be interviewed and share your company with the community ➡️ Interview Request Form
We also provide free tools for developers to grow their careers: Coding interview course, automatic resume builder, portfolio API
Follow us on Twitter and LinkedIn
A technical dive into how we process billions of events in our cloud metering product at Amberflo.io was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.
This content originally appeared on Level Up Coding - Medium and was authored by Trey Huffine

Trey Huffine | Sciencx (2022-07-05T15:19:34+00:00) A technical dive into how we process billions of events in our cloud metering product at Amberflo.io. Retrieved from https://www.scien.cx/2022/07/05/a-technical-dive-into-how-we-process-billions-of-events-in-our-cloud-metering-product-at-amberflo-io/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.