Filed in Product & Development by Angela Bartels | October 17, 2011 9:26 am
When developing your application from the ground up, keep scalability in mind. Your application may run perfectly on your desktop or even after you’ve launched on the Cloud, but how will it run when you receive a swarm of visitors trying to access your application at the same time? You can always upgrade on the fly in the Cloud, but there will always be a cap. It’s important to think about a strategy for growth before you launch into production.
For example, will it be easy to scale MySQL once you hit the I/O, CPU, or RAM ceiling for your application? Would it make more sense to take a NoSQL approach and use something like Cassandra or CouchDB?
For serving web pages, do you want to use Apache? Do you want to use something a little more lightweight with fewer features? Think about what your application does and decide if the web server you’re using is overpowered (or underpowered) for what you’re doing.
Scaling horizontally means adding more instances to your pool of machines. When scaling horizontally, you have to look at what the load balancer can do. Rackspace Cloud Servers caps the throughput on the outbound network (no cap on inbound traffic). On a 256MB instance, you receive 10MB/sec of throughput. If every request is 1MB of traffic, it doesn’t matter how many machines you have, your instance will cap at 10 requests. You can have 20 machines but can’t do anything because the pipe isn’t big enough. Be sure you size your load balancer correctly.
To get around that, you can use Rackspace Cloud Load Balancers. Part 4 of this series will cover this topic.
To scale vertically means sizing the web server with enough memory (up or down), whether it’s a single instance at 256MB all the way up to 15.5GB, capped at outbound bandwidth.
This is a good tactic for developers who don’t have the system administration skills or desire to manage multiple servers. Choose the instance most appropriate for your application from the beginning. Because it’s all shared, you will run into limitations running your I/O, memory, CPU on a single instance. Things like Apache and MySQL would have to share resources.
Some frameworks require more memory than others, so vertical is better. Application data, like Cassandra or Drizzle, take a lot of overhead and might go from 8GB to 16GB. Make sure you have enough room to run your applications.
If you’re in the Cloud, features like burstable CPUs based on instance size are available on Rackspace Cloud Servers. We have dedicated performance based on each instance size giving you more I/O, CPU, and memory.
Stayed tuned for Part 2 of our Scaling for the Holiday Series: Take Advantage of Caching.
Source URL: http://www.rackspace.com/blog/scaling-for-the-holidays-part-1-to-scale-vertically-or-horizontally/
Copyright ©2014 The Official Rackspace Blog unless otherwise noted.