Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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

2 Answers 2

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.

share|improve this answer
    
thanks for the feedback will have a look at haproxy –  user160108 May 28 '12 at 11:47

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.

share|improve this answer

Your Answer

 
discard

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.