3 ms·
Can you achieve competitive latency for web pages using API Gateway and Lambda?
by borplk 10y ago
Can you achieve competitive latency for web pages using API Gateway and Lambda?
- ranman 10y agoI think acloud.guru is served through lambda. I think if you go the single page app route with S3 + cloudfront CDN + API gateway + lambda (so many words/things) you can deliver a really high quality product. You can also cache responses out via elasticache. It's not perfect but the development velocity and potential is really exciting.
- deleted 10y ago[deleted]
- ledgerdev 10y agoI was curious about the same thing and setup a jvm lambda to test. The setup was served through API gateway, connected to a postgres RDS, selected a couple records from a single database table and returned them as json, and deployed in us-west. From the west coast, I'm getting between 150ms and 300ms response times for most requests, but it does jump around quite a bit, with occasional requests taking 500ms-800ms to complete. A lot of the variability seems to be coming from execution time of the lambda itself, which would probably be because of the connection to RDS? I'm using HikariCP so the connection is pooled but maybe something like dynamo would be better. So latency is all over the place, but generally under half a second.
- taurath 10y agoConnection would only be pooled on a per-instance basis, which can be cached but sometimes are not for many parallel running processes (to my understanding).