The RDS Connection Calculation Problem
When using Amazon Web Services’ RDS MySQL service on the back end of clusters of web servers, one resource constraint that can occur in times of heavy load is database connection starvation.
Planning capacity in the RDS MySQL layer often comes down to ensuring enough connections are available; avoiding queuing on the web tier for connection releases.
But how do you know how many connections you get from a given instance type?
Fortunately there is a useful little calculation to determine connections by instance type:
That’s 12582880 bytes by the way….
So for example:
A Large RDS MySQL Instance with 7.5 GB memory has a limit of 640 connections.
You can find more out about the various RDS MySQL instance types at this page. You can feed the memory information listed there into the equation above to work out connection limits for all current RDS instance types.