Designing your application for growth

One of the most common requests we get is whether it is possible to upgrade a server (Bare Metal or Cloud) because the application hosted is too slow. Upgrading a server is not difficult, but what happens if the server has reached its limit? You would have to either migrate to a more powerful server, or if there isn’t one, find another solution such as employing more servers. In theory, the latter sounds easy to do. The only issue is that once you have built the foundations of your application, it becomes difficult to change. This is why it is important to plan in advance before building the application—to make sure that it can scale the right way, when it needs to.

Scalability is a sensitive matter, which highly affects the development of an application. It is not always the first thing developer’s focus on—but it should be when planning for the future. There are two methods of adding resources for an application and those are vertical (scale up) and horizontal (scale out). In this blog, we’ll go over those two methods as it is important to be prepared when developing an application. There is no right or wrong scaling tactic but the overview below will help you understand the pros and cons of both.

Vertical scaling

Scaling up (or scaling vertically) is the process of adding more resources to a single server or switching to a more powerful one, in order to accommodate the growth of an application. In theory, making the underlying system more powerful should allow it to handle a greater workload. This is considered the simplest way to grow, as there is no impact on architecture complexity—making the infrastructure easier to manage.

Vertical scaling became popular in the 1990s during the rise of dedicated hardware usage and the evolution of uniprocessor architecture. It is still one of the easiest ways to scale a system, as long as your application only needs a single server.

Pros

  • Easier and less challenging to implement
  • Fewer servers to manage
  • For legacy/simple applications, using a single machine can be better than having to deal with the complexity of managing multiple systems

Cons

  • Increased costs
  • No redundancy at server level
  • Limited upgrade options due to hardware constraints
  • Not always possible to get increased performance by adding resources

horizontal and vertical scaling
Horizontal scaling

Scaling out (or scaling horizontally) is the process of expanding the infrastructure by adding more servers—usually relatively inexpensive ones. Scale-out decreases hardware limitations, and theoretically enables infinite expansion. However, this method is dependent on the architecture of the hosted application to be successful. The architecture should be designed in such a way, to allow expandability by adding more nodes. There are a lot of different techniques, methodologies, and tools that allow your system to scale horizontally effectively, depending on your application.

Although horizontal scaling dates back to the 1950s as a concept (cluster computing) and the 1980s (parallel computing). It was used primarily for scientific computing, as well as by professional hobbyists. In the early 2000s, with the advent of modern “cloud” applications, the need to be able to scale by adding more nodes emerged as a solution to the computational limitations of a single system.

Pros

  • Less expensive than vertical because we use less powerful systems
  • Redundancy and load-balancing make the application more resilient
  • Incremental scalability
  • Easier to expand if the underlying architecture supports it
  • Enables scaling over multiple geographical locations

Cons

  • If you need licenses, having multiple servers might increase costs
  • Scale-out needs the application to be structured in such a way that it will enable you to scale horizontally
  • Need to manage multiple systems (often solved by using Chef or Puppet to manage the infrastructure automatically)

What do I need?

Leaseweb has a number of solutions that can help you deliver a scalable application. If you are looking for scale-up (vertical scaling) infrastructure, Leaseweb Private Cloud (offered in two flavours: Cloudstack and VMware) is the product for you. This will give you a pool of resources that you can assign to your instances as you see fit. In case one of your servers needs more CPU capacity or memory, you can simply add it to scale up.

In case you designed your application to be horizontally scalable, any of our (Bare Metal or Cloud) products can help you. Often application developers and system architects need a load balancing solution to allow for easy horizontal scaling. Load balancers are part of any Leaseweb Cloud offering.

Conclusion

These scaling methods are not mutually exclusive. How you want to scale is dependent on how your application is structured and how much infrastructure the application requires. In many cases, scale-out is the preferred model, as the increased flexibility can save a lot of time and effort. In addition, it will make it much easier to grow along with increased application usage or visitor counts. The downside is you will have to do more up-front work in designing your architecture, while taking into account the desired scaling of the infrastructure. In the end, when your application is successful, this will allow you to focus on adding value for your users and visitors, while simply scaling out by adding additional capacity when the popularity of your app surges.

So which method will you use, horizontal, vertical, or a combination? Tell us how and why in the comments.

1 comment
  1. Andreas Perdikis
    Andreas Perdikis
    May 23, 2014 at 13:42

    Very helpful document, really enlighten.

Leave a Reply

Your email address will not be published. Required fields are marked *