I currently have a couple of cloud servers on Rackspace

  1. For application NGINX+PHP+Memcached+APC 2GB instance
  2. For Mysql Database 1GB instance

Our site at the moment is not very heavy in terms of traffic, we have about 100000 pageviews per month, and the servers have to still reach their max capacity.

Also ran some load test using ab and a few pages with 100 concurrent users and I get a healthy transaction rate of 30 tans per sec (is this good).

Now we are in expansion mode and there is a possibility of a a traffic surge on the site in the next 2 months, so I need to plan for scale (keeping the budgets in mind).

Some of the options I have though about
1. Launch a larger instance (more memory) for Mysql server in case there is a traffic surge and the site cannot take the load (the fastest solution I believe).
2. Perform some read-write splitting along with a Master-Slave or Maser-Master Setup.
3. Added a rackspace load balancer on top of my application server.
4. Sharding (I Think may be an over kill for my website at the moment)

Just need some suggestions on which solution should I go with to help us scale gradually.

  • You could evaluate if you can apply other improvements. For example, you could store your content as static pages (well if thats possible - it, ofcourse, depends on content you serve). – Janis Veinbergs May 28 '12 at 9:21
  • @JanisVeinbergs well I do have a caching strategy in place currently not the best strategy but pages that are not update on our site too often are cached for about 24hrs by default. So its first static page if not then memcached and then finally database. Was wondering if database writes could cause a problem down the line, currently using the MYIasm storage engine. – user160108 May 28 '12 at 11:36

I think better option is using the larger instance for MySQL and for webserver go for the load-balancer like haproxy. The rackspace load-balancer are some what slow and we don't get full access too. So better go for haproxy.


You're considering to "Launch a larger instance (more memory) for Mysql server in case there is a traffic surge". Keep in mind that you can't do this in real time, you will probably need to do the upgrade manually, and even if you catch the exact moment of the traffic surge and upgrade to a bigger instance, there will be some downtime. Also, if load on the database increases beyond the capacity of the largest RackSpace instance, you'll be stuck. I know that Xeround's cloud database is available on RackSpace and scales up automatically when throughput increases, and you are not limited to the capacity of a single instance. They also have high availability which will will save you the need to setup Master/Slave or Master/Master. There is also RackSpace's native MySQL service which is in beta, I believe it has high availability but not sure about auto scaling, you should check and see.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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