Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS API Gateway + Lamda - how to handle 1 million requests per second

we would like to create serverless architecture for our startup and we would like to support up to 1 million requests per second and 50 millions active users. How can we handle this use case with AWS architecture?

Regarding to AWS documentation API Gateway can handle only 10K requests/s and lamda can process 1K invocations/s and for us this is unacceptable.

How can we overcome this limitation? Can we request this throughput with AWS support or can we connect somehow to another AWS services (queues)?

Thanks!

like image 693
Jacek Pudysz Avatar asked Oct 18 '25 07:10

Jacek Pudysz


2 Answers

Those numbers you quoted are the default account limits. Lambda and API Gateway can handle more than that, but you have to send a request to Amazon to raise your account limits. If you are truly going to receive 1 million API requests per second then you should discuss it with an AWS account rep. Are you sure most of those requests won't be handled by a cache like CloudFront?

like image 140
Mark B Avatar answered Oct 19 '25 21:10

Mark B


The gateway is NOT your API Server. Lambda's are the bottleneck.

While the gateway can handle 100000 messages/sec (because it is going through a message queue), Lambdas top out at around 2,200 rps even with scaling (https://amido.com/blog/azure-functions-vs-aws-lambda-vs-google-cloud-functions-javascript-scaling-face-off/)

This differs dramatically from actually API framework implementations wherein the scale goes up to 3,500+ rps... enter image description here

like image 33
Orubel Avatar answered Oct 19 '25 22:10

Orubel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!