Pillars Of Cloudiness: No. 3 – Scaling Horizontally

Filed in Cloud Industry Insights by Wayne Walls | March 26, 2013 9:00 am

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[1]. 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[2] and the Rackspace DevOps blog[3].

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

  1. agility returns: http://www.rackspace.com/blog/pillars-of-cloudiness-no-4-agility-returns/
  2. Rackspace Cloud API documentation: http://docs.rackspace.com
  3. Rackspace DevOps blog: http://devops.rackspace.com

Source URL: https://blog.rackspace.com/pillars-of-cloudiness-no-3-scaling-horizontally/