Part 2 – Auto-scaling and elastic load balancing in the cloud
In Part 1 I looked at the front-end (presentation layer) high availability cache (Varnish) that helps us deliver web pages quickly from a cache (memory). However, there are situations when there are a large number of queries also reaching our back-end, as Varnish hasn’t or can’t cache those queries – during adverse weather or industrial action, when our website traffic can spike at up to 20x usual volumes for example.
In this situation a seamless infrastructure platform is fundamental for us to ramp up and ramp down capacity according to the needs of our customers and hosting http://www.tfl.gov.uk in the cloud allows us to do this easily, quickly and relatively cheaply. AWS (Amazon Web Services) provides us access to an almost infinite capacity to meet our requirements via Auto-scaling and elastic load balancing (ELB):
• Auto-scaling allows us to increase or decrease the number of EC2 instances (Virtual Servers) within our application’s architecture to provide scalable cloud computing.
• Elastic load balancing automatically scales request-handling capacity up or down in response to incoming application traffic.
We have designed the new website architecture in such a way that it can seamlessly use the power of auto-scaling and elastic load balancing, to stand up additional back-end servers (on-demand) as an immediate response to increased loads at any time of the day or night.
Running Varnish in the cloud provides a very powerful caching and auto-scaling technology for our web applications, which significantly reduce the number of AWS instances (virtual machines) our website needs, to handle peak loads of traffic, whilst also being cost effective.
As our website grows, and cache hit rates/back-end requests increase, we can rely on Varnish & Auto-scaling to cope with the brunt of the requests that are continuously flowing into our infrastructure, giving us:
• A significant performance increase.
• Increased resilience.
• Information flow becomes faster, cheaper and highly efficient.
In reality, other factors come into play as well, e.g. the device you are using, your browser, RAM memory on your device, your internet ISP speed, ..etc. However, this and other optimisations that we are currently working on will enable our new website to process requests at super-fast speeds, thus reducing bottle-necks on information and data flow from our side.
Rest assured, we’ll continue to tweak and refine this cutting edge design of coupling a high availability cache with on-demand auto-scaling in our website to make every page load even faster, and ultimately make every single journey matter.