OpenSource For You

Best practices in Web app scalabilit­y

-

Practice# 1: Ensure that an applicatio­n can handle traffic surges by scaling compute resources.

The solution is to scale compute resources.There are two types of scalabilit­y – vertical and horizontal.

Vertical scalabilit­y is when the applicatio­n is running in one server and the server’s resources are increased, e.g., increased RAM, a better CPU or a much bigger HDD. All such resources can lead to the better performanc­e of an applicatio­n, but vertical scalabilit­y has the following drawbacks: Downtime is required in order to scale up the machine. With all eggs in one basket – if something happens to this ultimate machine, the business is at risk! How much can a single machine scale anyway? There are limits to scale the resources in a machine. Horizontal scaling on the other hand is bliss — one can put in identical resources (in this case, identical machines with the same applicatio­n server) together and let them handle the traffic. Whenever traffic grows, just add up more identical resources together and let them handle the traffic via load balancers.

To segregate the load to applicatio­n server clusters, the load balancer will be required in the front of the cluster, which will balance the load based on certain algorithms like Round-Robin, or IP Affinity, to direct the traffic towards the machines behind the load balancers. There are many open source software based load balancers. A few popular ones that are easy to work with are Apache (a module for load balancing is available as mod_proxy_balancer), Nginx (also has a balancer built-in), Pound, Squid (which is also a proxy server), or Inlab.de’s Balance.

Advantages: 1. Scale up as required by adding more compute resources

and reduce those resources to scale down.

Newspapers in English

Newspapers from India