Jeremy Onion

The beginner’s guide to HASH (highly available scalable hosting).

Business man relaxing at desk holding tennis ball

The French have a saying, “All cognac is brandy but not all brandy is cognac,” and a similar thing applies when it comes to hosting.

The advent of cloud computing means that ‘highly available scalable hosting’ (HASH) is now available to anyone ­– not just big multinationals with budgets to match.

 

What is high availability and scalability?

Highly available hosting and scalable hosting may sound like the same thing, and they do use some of the same methods to achieve their goals. But there’s a difference between the two, much like brandy and cognac.

 

Scalable hosting.

Scalable hosting means that the hosting solution is able to grow and shrink to meet the demand being placed on it.

 

Highly available hosting.

Highly available hosting, on the other hand, means that if any component fails – from a web server going down to a load balancer dying – the solution will be able to carry on working.

 

How does highly available scalable hosting work?

To demonstrate this concept in true Torpedo fashion, we did a practical demonstration during one of my infamous internal Knowledge Shares.

Hopefully that’s given you a high-level overview of how it works – but how do we achieve this at Torpedo?

 

Recover from failure with highly available hosting.

The goal of highly available hosting is to be able to recover from any component failure within a system. A basic solution might look like the following diagram:

Diagram of a highly available hosting solution

This solution starts with the premise that you can have no single point of failure. The way we achieve this is by ensuring every part of the infrastructure has at least one failover:

  • The load balancer is made up of a number of machines.
  • The website itself is distributed across at least two servers.
  • The database is actually a cluster of machines.
  • The uploaded assets are stored in a shared file system that is replicated across a number of machines.

The entire solution is also spread across at least two separate data centres. This means that even if a data centre goes dark, the machines in another data centre will still be running. It’s also possible to have the system bring up resources in a third data centre, but this is straying into the realms of scalable hosting.

 


“Everything fails, all the time.” Werner Vogels, VP & CTO, Amazon


 

Get the perfect fit with scalable hosting.

The goal of scalable hosting is to allow the solution to grow and shrink to meet demand, a basic solution looks much like the highly available one, but with a few tweaks;

Diagram of a scalable hosting solution

While a number of the elements in this solution are the same, we’re relying on different characteristics of these components:

  • The load balancer monitors the machines in its cluster and scales automatically to meet demand.
  • The website itself is distributed across servers in an auto-scaling group.
  • The database cluster is set up as an auto-scaling group.
  • The shared file system auto-scales out of the box.

The magic that makes the solution a cognac and not just a rather fine brandy is the auto-scaling group. This, once configured, sets up monitoring on the servers (database or web) and fires up an additional server when the monitored metric goes over a certain threshold.

For example, if the Central Processing Unit (CPU) usage across both web servers is over 60% then the system will add an additional server into the mix, increasing the number of servers until the CPU usage drops back down below 60%, or the number of servers hits an upper limit. On the other hand, if the CPU usage drops below 30% then the system will kill off additional servers until the CPU usage goes back above 30%, or the number of servers hits a lower limit.

These upper and lower limits are defined in the configuration. If you set the lower limit to two then you automatically have a ‘highly available’ solution because there will always be at least two web servers. In fact, because of the auto-scaling group lower limit, if there are only two servers and one of them fails, which as Mr Vogels says will happen, then the system will recognise that there’s only one server and increase the number of servers back to two – in another data centre if necessary.

 

Highly available hosting vs. scalable hosting.

Scalable hosting is automatically highly available as the solution will spin up a replacement if part of the solution fails. But a highly available solution is not automatically scalable as the system is only designed to ‘keep running’ which requires intervention when things go wrong, rather than ‘self-repairing’.

 

How much does highly available scalable hosting cost?

I mentioned that with the advent of cloud computing, the cost of these solutions is now within reach for most businesses, however it’s still expensive. You’d be looking at more than five times the cost of standard hosting and there’s more maintenance involved, so this solution should only be considered if uptime is critical. For example, if you have an ecommerce site and downtime stops you from taking orders, you should definitely consider this. You might also consider this type of hosting if there’s a possibility of reputational damage if the site goes down.

 

HASH tags – how we’ve used highly available scalable hosting.

CRM Students

When we built an ecommerce site for CRM Students, we used highly available scalable hosting. We worked with CRM Students, a leading provider of student accommodation, to build them a new website in WordPress that was highly flexible and included ecommerce functionality. The site also needed to integrate with TCAS the third-party student accommodation booking system.

 

Lucy Group

We also incorporated HASH into the corporate websites we created for Lucy Group and each of its 7 different business units. The company was established in Oxford over 200 years ago and has continued to expand and diversify into new markets and regions, now employing over 1,400 people and trading in over 60 countries.

 

Autodesk BIM 360

Another project we worked on that includes HASH is the award-winning BIM 360 website we built for leading software company Autodesk. The website brings together all content relating to BIM 360 software and transforms the user experience, helping every member of Autodesk’s audience quickly and easily find the content they need.

 

About to embark on a digital project? Give us a call to discuss your requirements.

Get in touch

Scroll to top
Close