Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Amazon RDS FAQs stated that it is up my application to distribute traffic to the read replica.

My websites have mostly visitors - non-logged in users. So, I suppose most database activities are read. I am supposed to set the MySQL database connection to the read replica for non-logged in users and the source RDS instance for logged-in ones?

My single RDS instance which power several websites just went bottleneck so I'm a little panicking and don't know where to start right now.

If the direction I'm going is not correct, kindly point me to the correct path then

share|improve this question
Have you enabled the read replicas in your database. Also, did you try the Provisioned IOPS ? – GeekRide Dec 14 '12 at 7:51
up vote 1 down vote accepted

That all depends on what your application(s) are and how they go about connecting to the database and running their queries.

Most applications I have seen setup two database connection pools/strings. One for reading and one for writing and the application code directs it's queries to whichever pool suits the query. Most applications are not written like this until they need failover though so this is probably going to need some coding.

You might be able to use mysql-proxy to filter particular queries to a read only back end.

You also might have more immediate gains by running a separate database instance for each of the applications rather than splitting the load via reads, if your load profile allows it.

share|improve this answer
I have not seen people using mysql-proxy in production systems. The other option to develop the login in your application to where to connect is a right choice. – mwasif Dec 18 '12 at 13:16

I don't think you can specify that where your traffic will go for read or write operations. That's a tradeoff you need to do when you use RDS.

But for the Load issue, I think you should enable (which I believe you already did) the Multi-AZ replication in the RDS.

That will create read replicas and will also be used for the failover and redundancy purposes.

Also, if still your traffic is getting affected, you should consider using provisioned-IOPS. That will very much increase the efficiency and performance of your DB.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.