AWS Aurora Serverless
A few months ago AWS announced a serverless model for their Aurora databases. Compared to traditional DB approach this is brand new.
I’ve been trying it out for a pilot application and it works well in general. You pay for what you use just like any other serverless resource.
The only problem I’ve been having is DB startup time after pause. Meaning after 5 minutes the resources are released and the first request that comes after that suffers a performance penalty. My application was getting an error when this happened and it was showing an error screen. Obviously from a user standpoint it’s not a great experience.
So to remedy this issue I’ve updated the DB connection timeout
Connection Timeout=120
By default it’s 15 seconds which is not enough for the new server to respond. But after increasing the timeout at least I could prevent the application from failing. Of course this doesn’t speed up the response time of the DB server.
They recently announced additional regions that support serverless Aurora.
For cost-cutting reasons this can be a great option. Especially if your system is idle for extended periods of time you don’t need to pay anything. Also it scales up so you don’t have to worry about the database bottlenecks under heavy traffic.