Roadmap to Backend Developer on Cost Effective API Serverless Infrastructures

AWS API Gateway is a great service but can be quite expensive, and even cost-prohibitive in some cases.

An Application Load Balancer is a viable alternative since it integrates seamlessly with Lambda functions and is also highly scalable and reliable. For very small traffic, API Gateway will probably be the winner, but in high-throughput cases, ALB is capable of providing up to 90% savings.

Let’s outline an example and see how they compare. Consider an API that runs 24h/7d, receives around 5 Million requests per day, averaging 60 RPS (requests per second) and peaking at 120 RPS. The request/response payload sizes are on average 1 KB, each, and it has 10 rules for mopping and routing requested URLs to downstream resources such as Lambda functions.

Doing the math for this scenario, ALB can save from around 60% to 90% over API Gateway REST API and HTTP API services. Part of the ALB costs are fixed and irrespective of actual usage, so the higher the API traffic, the higher will be the opportunity to cut costs.

When API Gateway is really needed for some reason, consider using the newly available HTTP API version. It’s simplified, three times cheaper than the traditional REST API service and a good alternative for using in internal APIs to decouple Lambda functions, for example.

The main reason we would recommend using the HTTP API for internal purposes is for the lack of granular concurrency control and public access security features. A firewall is not really needed for an internal API. It may not be necessary to control concurrency per client, as well, so controlling on the Lambda level should be fine.

The other missing features (access key management, SDK generation, and usage plans) are also unlikely to be worth the extra cost for the purposes of an internal API

Also when using API Gateway, it might be interesting to enable caching. It can be applied to the entire API or only to specific methods that can tolerate cached responses. Time-to-live is also customizable. The downside is that AWS charges an hourly price for the memory allocated to the cache, not actual usage. The opportunity to cut costs will depend on whether your API receives too many similar queries over short periods of time.

Optimizing API endpoints is a moving target since the underlying services connected to it are usually in constant change. It is necessary to have proper tooling to monitor and alert as performance and cost optimization opportunities arise. Dashbird is a Serverless-first visibility service that provides everything you need to stay on top of your cloud architecture spending, from API Gateways, to Lambda functions, SQS queues, etc. Try it today for free, no credit card required.

Read our blog

Dashbird app launches new version

The new Dashbird app is bringing your data together for a faster, more secure, and smoother observability experience with team collaboration in mind.

AWS updates for serverless builders in 2021

In this article, we’re covering all AWS updates since and including re:Invent 2020 that all serverless builders should be aware of.

The Ultimate Guide to AWS Step Functions

The use of serverless computing has become a must nowadays, and some of you may already know a thing or two about Amazon Web Services like Lambda Functions, Step Functions, and other services AWS provides. However, if this is the first time you hear about them – fantastic!

Is Real-Time Processing Worth It For Your Analytical Use Cases?

Real-time technologies are powerful but they add significant complexity to your data architecture. In this article, we’ll look at several options to reap the benefits of a real-time paradigm with the least amount of architectural changes and maintenance effort.

Made by developers for developers

Dashbird was born out of our own need for an enhanced serverless debugging and monitoring tool, and we take pride in being developers.

What our customers say

Dashbird gives us a simple and easy to use tool to have peace of mind and know that all of our Serverless functions are running correctly. We are instantly aware now if there’s a problem. We love the fact that we have enough information in the Slack notification itself to take appropriate action immediately and know exactly where the issue occurred.

Thanks to Dashbird the time to discover the occurrence of an issue reduced from 2-4 hours to a matter of seconds or minutes. It also means that hundreds of dollars are saved every month.

Great onboarding: it takes just a couple of minutes to connect an AWS account to an organization in Dashbird. The UI is clean and gives a good overview of what is happening with the Lambdas and API Gateways in the account.

I mean, it is just extremely time-saving. It’s so efficient! I don’t think it’s an exaggeration or dramatic to say that Dashbird has been a lifesaver for us.

Dashbird provides an easier interface to monitor and debug problems with our Lambdas. Relevant logs are simple to find and view. Dashbird’s support has been good, and they take product suggestions with grace.

Great UI. Easy to navigate through CloudWatch logs. Simple setup.

Dashbird helped us refine the size of our Lambdas, resulting in significantly reduced costs. We have Dashbird alert us in seconds via email when any of our functions behaves abnormally. Their app immediately makes the cause and severity of errors obvious.