Live data from Hacker News

In The Works – Amazon Aurora Serverless

aws.amazon.com

31–34 of 34 posts

Re: In The Works – Amazon Aurora Serverless

#31
post #28

Earlier quoted context omitted.

Haven't heard of this approach yet. Do you have a write up I could reference to try it out?

I never read anything official, but some stuff by framework makers (serverless/apex up) edit: https://medium.com/@tjholowaychuk/aws-lambda-lifecycle-and-i...

Thanks, 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/

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!

Re: In The Works – Amazon Aurora Serverless

#32
post #16

Really wish "serverless" also meant that it can work with AWS Lambda efficiently. As is, each function would try to open a connection, making the overall overhead extremely high and stressing DBs.

Is that true? The default limit on concurrent function executions is 1000. The existing Aurora (MySQL) should be able to handle cycling through those connections without issue.

It’s not that the DB servers can’t handle it, it’s that establishing a connection is slower than re-using an existing one.

You also forgo certain optimizations within the DB designed to make fetching things for the given connection/scope faster, such as temp tables.

Re: In The Works – Amazon Aurora Serverless

#33
post #28

Earlier quoted context omitted.

I never read anything official, but some stuff by framework makers (serverless/apex up) edit: https://medium.com/@tjholowaychuk/aws-lambda-lifecycle-and-i...

Thanks, 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/ 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!

That's basically what I wrote
Post reply on HN