3 ms·
Hey all. Can't believe the response this has gotten! Glad people are reading. I wanted to address a few points that were coming up in comments: * Yes, I faile
by matthewbonig 6y ago
Hey all. Can't believe the response this has gotten! Glad people are reading.
I wanted to address a few points that were coming up in comments:
* Yes, I failed to bundle the deps with the Deno deploy, causing a long cold-start time as it downloaded deps. I was not concerned about cold-start times. I knew that there were ways to optimize it. I decided not to, as it simplified the tests. I was very careful about making sure duration measurements were running on warm lambdas. I don't believe I covered it in the blog but I stop-watched the dynamodb calls and could see them running around 100-120ms each. I was satisfied that the values I was seeing was largely due to API calls to dynamodb, and not the deno runtime.
* In re: API gateway. Yes, the cold-starts are an issue that I believe could be resolved. But even then, the API calls to dynamodb are STILL substantially slower than Node and would be too slow, imo, to be worth putting behind API Gateway where low response times usually trump a lot of other concerns.
* I encourage anyone that wants to try this for themselves to check out the github repo linked in the article. It contains a CDK module you can easily run and recreate all of this in your own AWS account and see for yourself. If I was interpreting this data wrong, PLEASE tell me. The last thing I want to do is be spreading misinformation. If you find easy optimizations, I would love to see a PR and I'll update the blog with your contribution (with your approval).
Thank you all for reading this. This is the first time a blog post has ever made it on to hackernews (afaik). I'm stoked with all the interest, even if I believe some of it is because of misunderstandings because I explained the tests poorly.
-M