Pillars Of Cloudiness: No. 3 – Scaling Horizontally

There are five essential pillars of cloudiness. In this recurring blog series, we’ll count down from No. 5 to No. 1. Last time, we looked at agility returns. In this third post, we discuss scaling horizontally.

Applications have tracked user state for years. Entire technologies have come and gone to increase the consistency of sessions between parallel web servers. With state saved in sessions we can have a consistent user experience between several web server machines. Typically this is used in online shopping carts.

In most shopping cart applications, when a user adds an item to their cart and continues browsing the site, a session is created and stored somewhere (e.g. memcached, database, etc.). When looking to scale horizontally, a central storage location is typically used for sessions so all of the web servers have access to the same session information. Now we have several systems hitting a single system for information (not unlike data in databases) and adding more web servers is going to increase the session store’s system load. This centralized approach doesn’t scale as effectively as newer solutions. Cloud and stateless protocols have started changing the way we design applications to increase the effectiveness of horizontally scaling.

Representational State Transfer (REST) to the rescue! REST by definition is stateless. Without state we don’t have any session data to consider or store. Thus, using REST sessions become a non-issue. Technologies like AJAX and HTML5 work with REST to remove the necessity of sessions from applications. Without sessions to require centralization in our application we have a bit more flexibility and can be agile with our scaling methodology. This allows us to scale horizontally without the growth of system load we noticed earlier in our session store.

Not everything can be converted to behave correctly without state. The portions that still have state requirements typically need to provide immediate feedback about the actions that are taken and provide contextual information across multiple requests.

Stateless applications have less coupling among their components and allow horizontal scaling points to work independently of one another and scale independently of one another. With this added elasticity in the application we can increase our return on agility we discussed in the last article.

Tune in next week when we talk about the second pillar of cloudiness: modular design. Need more information about developing on the cloud? Be sure to check out our Rackspace Cloud API documentation and the Rackspace DevOps blog.

Alex Brandt, a Technical Trainer with Rackspace University, contributed to this article.

Wayne Walls is a Cloud Architect at Rackspace, where he evangelizes global cloud strategy. A tenured technology leader, Wayne has engineered complex technical solutions, delivered IT transformation plans, and implemented multiple training initiatives around cloud computing. Co-maintainer of the Rackspace Developer blog, Wayne is helping developers, engineers, and executives understand cloud technologies and how to turn that knowledge into tangible returns. He holds a B.S. of Information Systems and a B.A. of Economics from the University of Oklahoma. Follow him on Twitter at @waynewalls.


  1. I understand this is meant for a nontechnical audience, but could you make these posts more substantive? If would be great to know how you horizontally scale with or without a central server, in addition to mentioning that you can.

  2. Could you please be a bit more specific. I do not see how REST would help you for example in a online shop to make the handling of a session obsolete. Don’t get me wrong – I the REST concept but I think instead of trying to get rid of states everywhere it should be considered how to make state-management working in a horizontal scaling environment, for example with external caching, queues or the like.
    I would be happy to hear your opinion on that

  3. Greetings, Sordid!

    Thanks for your comment! You are correct, these posts are more generalized, but the first stab at a more technical look is at our developer blog: http://developer.rackspace.com/blog/scaling-horizontally-handling-sessions-on-the-open-cloud.html

    There, we have covered the same five pillars but with a more technical point of view. That being said, we will continue to elaborate on these topics and dive deeper into the technology that supports them in that forum.


  4. Howdy. Peter!

    Thanks for commenting! As I mentioned to Sordid, if you check out the Horizontal Pillar post on our developer blog (http://developer.rackspace.com/blog/scaling-horizontally-handling-sessions-on-the-open-cloud.html) we actually start to cover some of the items you mentioned. There is many ways to handle scale and we cannot tackle them all at once 🙂 — we are continuing to add content around of Five Pillars of Cloudiness — from technology implementation, cloud consumption models and industry best practices.


  5. The article is misleading as REST does not get rid of states but instead requires some other mechanism to pass along “states” generally in the form of header data which needs to be managed by the client or an intermediate proxy server which stores session data.

    A centralized session store is the only answer unless you are relying on the client to pass the session data to the REST Apis or using sticky sessions on a load balancer (forcing you back to the same server).

    Horizontal scaling of the session state is possible with many of the technologies mentioned above by setting up clusters of servers. Redis and mongo are both excellent session storage providers.

    Some APIs could be public and not require any type of validation.

    If you are looking for a centralized session store, I would look at Object Rocket (mongodb as a service) which was just acquired by Rackspace. Its super fast and redundant. If you are using Node.js as a web server, it has easy to use modules to configure mongodb as a session store (as well as redis).

  6. Greetings, Stan!

    Thanks for the comment! You are correct, REST is enabling you to be stateless, but it does not happen ‘out of the box.’ I’ll work on clearing that up.

    Along with session state, another area that lots of customers are looking to is auto scaling when it comes to horizontal scale. I sounds like it’d be beneficial to add a section were we discuss using a centralized mechanism for scaling and a monitoring solution (polling for the best attribute) to help determine when a scale event should/should not occur.



Please enter your comment!
Please enter your name here