AWS: Website with multiple DB instances

With more information about what you're trying to achieve and why we might be able to help more.

Read Replicas

You can create multiple RDS Read Replicas, then offload some of the database traffic to those replicas. Writes go to the master database. This is separate from RDS Multi-AZ which is for reliability rather than scale.

Finding the Bottleneck

While the database can be the bottleneck, it's not always the problem. Before you look at scaling out you should look at why your database is so busy. Is it indexed correctly? Do you have slow queries? Are the SQL queries optimised? You should have a good DBA look at it if you haven't already.

Alternate Databases

Do you need a relational database, or can you use a NoSQL database like DynamoDB for some or all of your data? NoSQL databases are typically much easier to scale.

Caching

Could you alter your application code to query an Elasticache instance before querying the database? It's more flat than relational, but it's much, much faster as everything is in memory.

Vertical Scaling

Sometimes the easiest option it to just use a bigger server. You can't easily auto-scale up and down, but if you can afford it, it can be less work.


It depends on what DB engine you're using. If your RDS runs MySQL 5.6 you can either use Aurora Multi-Master where you can add more DB nodes as needed or Aurora Serverless that automatically adds small DB nodes on demand.

With other RDS DB engines (all non-Aurora ones, or Aurora PgSQL) it may not be that trivial.

Hope that helps :)

Tags:

Amazon Ec2

Rds