Amazon-web-services – Amazon RDS Instance type connection limits

amazon-rdsamazon-web-services

I am trying to decide which AWS RDS instance type is to be used.

I have the stats of the number of database connections required by the application.

Is it possible to know which AWS RDS instance type supports how many database connections approximately?

I have the following list with me, but I'm not sure how accurate it is to date:

t2.micro   66
t2.small   150
m3.medium  296
t2.medium  312
m3.large   609
t2.large   648
m4.large   648
m3.xlarge  1237
r3.large   1258
m4.xlarge  1320
m2.xlarge  1412
m3.2xlarge 2492
r3.xlarge  2540

Is there any official AWS document for the same?

Best Answer

You can also verify the max_db_connection value

# mysql>show max_connections;

or

Click on the default Parameter Group and search for max_connections and you’ll see the formula. In my case, it’s {DBInstanceClassMemory/magic_number}.

But the numbers in the max_connections column look slightly awkward because they are actually calculated from a formula DBInstanceClassMemory/magic_number where magic_number differs according to the class of your instance.

You can check this link for updated documentation MySQL Managing Performance.

It's mean the higher the memory, the instance will capable to handle more connection. you check DB instance class size here.

The maximum number of connections allowed to an Amazon RDS MySQL DB instance is based on the amount of memory available for the DB instance class of the DB instance. A DB instance class with more memory available will result in a larger amount of connections available

Choose RDS class.

If you create a new parameter group to customize your own default for the connection limit, you'll see that the default connection limit is derived using a formula based on the DBInstanceClassMemory value. As shown in the preceding table, the formula produces connection limits that increase by 1000 as the memory doubles between progressively larger R3, R4, and R5 instances, and by 45 for different memory sizes of T2 instances. The much lower connectivity limits for T2 instances are because T2 instances are intended only for development and test scenarios, not for production workloads. The default connection limits are tuned for systems that use the default values for other major memory consumers, such as the buffer pool and query cache. If you change those other settings for your cluster, consider adjusting the connection limit to account for the increase or decrease in available memory on the DB instances.

Related Topic