.NET Core Web API on AWS Lambda Performance
cloudncode.blog
cloudncode.blog
Also, a simple Google search would have shown the author that first 1 million requests are free in AWS Lambda, contrary to what he says.
> AWS Lambda is now generally available. The AWS Free Tier includes 1 million free requests and up to 3.2 million seconds of compute time per month with AWS Lambda [0]
While I love the service, you do end up paying pretty quick to scale up. https://loadimpact.com/pricing
As a note, we started using GOAD https://goad.io and Dino http://veldstra.org/2016/02/18/project-dino-load-testing-on-... - for running tests and has been great.
Would be great if you could post some total latency numbers from client to server and back, as in my experience API Gateway is extremely slow (AWS employees admit as much in their forums). Another problem is that once the Lambda is 'warmed up', if you have scaling needs beyond the 1 container it's allocated then you again have a 'cold start latency' problem. Interested to see whether this had an effect on your setup also (and as a side note, I'm extremely impressed with the potential for Lambda and serverless, but it still doesn't seem ready for prime time IMO).
Hitting Gateway -> Cloudfront -> S3 (for gzip / caching) it's ~100-200ms.
Hitting Gateway -> ELB -> EC2 -> IIS (.NET Web API) it's ~400-500ms.
Hitting Gateway -> Lambda -> NodeJS it's ~700-800ms.
Still need more time to in production to get more statistics.
(I haven't tested this myself, just what I've gleaned from the forums.)
That said, I'm excited for the potential of serverless offerings - whether using containers or any other implementation mechanism. I'm building a backend for a native app right now and the initial beta version was using Lambda. The slow responses really made it tough though so a move to GKE and Kubernetes have made response times a lot lower, and it actually scales faster too.
Lambda also prevents any long running optimization such as output cacheing.