Hacker News new | ask | show | jobs
by coredog64 2197 days ago
I've been contemplating pushing SQLite data files to my Lambda function via a custom layer. Individual executions can update within the scope of their execution, but you'd only get an update by pushing a new layer.

One fewer network hop compared to DynamoDB, and for something that might get an update once a week or even once a month I get low latency without having to oversubscribe to another service.

1 comments

From playing with zappa/django and SQLite on S3, the first page load latency is still a thing even if the one Lambda is always alive, and I don't know why but have my suspicions. I didn't bother to performance test it much other than observation, since I was just using it for development to build an SES email newsletter system.

Comparing a read of a database driven app (going to the URL and getting the admin login in Django via Lambda/SQLite/S3) to an async javascript submission (submitting a form on a cloudfront static site that POSTs to DynamoDB), the javascript/DynamoDB round trip is faster by about a full second.

I suspect it's because of the simple bulk of the Django deployment. Putting the whole bundle on a Lambda with all of its dependencies was about 45-46 megs of crap, whereas a simple Node DynamoDB insert is a couple dozen lines.

So ultimately, while spiffy to play with, I didn't bother to use it much due to performance. Although it has been awhile, I heard that Amazon made some Lambda changes recently to address initial wake-up request performance.