News for hackers. Stuff that matters.
Re:The hidden costs of serverless by alexnewman on Wednesday January 17, 2018 @10:11PM (#16174365)
Just don't use SQL databases. Lambda will knock over your DB
Re:The hidden costs of serverless by teej on Wednesday January 17, 2018 @10:54PM (#16174566)
It’s easy to knock over anything with bursty Lambda loads. I have successfully maxed out AWS Redis, kinesis, kinesis streams, and S3 with massively parallel Lambda work. One of the things that I haven’t figured out is if there’s a sane and simple way to implement backpressure on Lambdas.
Re:The hidden costs of serverless by misframer on Wednesday January 17, 2018 @10:24PM (#16174423)
Probably not the case with Serverless Aurora!

https://aws.amazon.com/blogs/aws/in-the-works-amazon-aurora-...

Re:The hidden costs of serverless by rwol on Wednesday January 17, 2018 @10:25PM (#16174427)
Could you expand on this? I’m trying to learn more about using Lambda as a serverless REST API recently and one of my projects has a SQL DB.
Re:The hidden costs of serverless by rmrfrmrf on Wednesday January 17, 2018 @10:52PM (#16174558)
Traditionally, a web application creates a group of always-on reusable connections (a pool) to a database server since setting up the connection takes time and each connection uses up resources on the database server that could otherwise be used for computation. If there are more connections to your API that require the database than there are connections in the pool, those requests are queued and handled when the next connection is freed. These connections are then closed when the app shuts down.

The problem on Lambda is that you can’t persist any application state beyond the function call itself, so you can’t take advantage of connection pooling the way you normally would in a self-contained webapp. Without some kind of middleman, each database call will require you to open a new connection to the database and close it when the function ends. This becomes catastrophic for the database server as the number of requests scales up.

Re:The hidden costs of serverless by mrep on Wednesday January 17, 2018 @11:30PM (#16174716)
Yes you can. You are supposed to instantiate those connections outside the function call as per the docs.

Example: https://docs.aws.amazon.com/lambda/latest/dg/vpc-rds-deploym...

Re:The hidden costs of serverless by alexnewman on Friday January 19, 2018 @05:49PM (#16190666)
Tried and failed
Re:The hidden costs of serverless by jdchernofsky on Thursday January 18, 2018 @01:12PM (#16179648)
Re:The hidden costs of serverless by drb91 on Wednesday January 17, 2018 @10:30PM (#16174451)
I am not sure to what the op was referring, but I’d make sure to plex your connections through a configured connection pool to ensure the highly liquid lambda compute doesn’t suffocate the database.
Re:The hidden costs of serverless by alexnewman on Friday January 19, 2018 @05:49PM (#16190664)
Yea can i do 10k requests/second . The example was 80 connections per second. What happens when lambda has tens of thousands of workers?
Re:The hidden costs of serverless by alexnewman on Wednesday January 17, 2018 @10:42PM (#16174505)
What happens if you get 1M requests. How many dB connections is this?
Re:The hidden costs of serverless by bdcravens on Thursday January 18, 2018 @01:52AM (#16175232)
What would you do in a traditional architecture?
Re:The hidden costs of serverless by alexnewman on Friday January 19, 2018 @05:47PM (#16190658)
pgpool