I'm very new to this,so please correct if I'm wrong. I've understood that with Amazon RDS one can create read replicas and use those for all read-only operations. This helps scaling the application a lot.

Unfortunately, I have a PHP application that does not support separate read-write and read-only connections.

Is there a way around this, other than modifying the application?


When designing databases you have two basic choices: Scale-Up or Scale-Out. In the first case you use bigger machines (instances), for the second case you add more machines (instances) and this means read-replicas usually.

Unless you have a small application with no heavy database requirements, I would modify my code to support read-replicas. This is no easy task but well worth the investment (sometimes).

However, these architecture decisions are best made before implementing your systems, so it may be easier and cheaper to just Scale-Up in your case.

Sorry, there is no real answer for you situation. You will have to do the research to estimate the costs / value / time of each implementation.

| improve this answer | |
  • Scale-out would be better, since we will have very short (few hours) peaks and could then scale down. – Tero Lahtinen Oct 10 '17 at 7:07
  • To Scale-Out you will need to support read-replicas or setup a clustered database server where every node is a read-write replica. I am not aware of any setups for database servers that auto scale up and down without building your own setup. – John Hanley Oct 10 '17 at 16:30
  • Or maybe just use ProxySQL to do read/write split. – Carson Ip Dec 15 '18 at 12:42
  • @CarsonIp - ProxySQL is a nice product, but you then introduce another node and a single point of failure. Read/Write splitting is not easy unless designed into the architecture. – John Hanley Dec 15 '18 at 15:12
  • @JohnHanley True. Though I usually install it in the application node so unless proxysql crashes, it should work when the application works. – Carson Ip Dec 18 '18 at 4:29

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