3 ms·
Haven't heard of this approach yet. Do you have a write up I could reference to try it out?
by sologoub 9y ago
Haven't heard of this approach yet. Do you have a write up I could reference to try it out?
- k__ 9y agoI never read anything official, but some stuff by framework makers (serverless/apex up) edit: https://medium.com/@tjholowaychuk/aws-lambda-lifecycle-and-in-memory-caching-c9cd0844e072 https://medium.com/@tjholowaychuk/aws-lambda-lifecycle-and-i...
- sologoub 9y agoThanks, but I think this is very different from connection pooling on a DB, say pdbouncer. Doing some searching, I did find this that seems much closer: http://blog.rowanudell.com/database-connections-in-lambda/ http://blog.rowanudell.com/database-connections-in-lambda/ TLDR; you can define the connection to DB outside of the scope of a given function, so it’s scoped to the container and can be reused so long as the container is not recycled. Seems promising!
- k__ 9y agoThat's basically what I wrote