Javascript Concepts

How to Scale Website | CDN | Load Balancers | Walmart Interview

In order to Scale Website, you need to ensure that your website remains accessible even if website traffic grows exponentially i.e website/application should be able to handle more and more concurrent requests. I was asked this question in my Walmart Interview for Frontend Engineer position.

How to scale website

Let’s see what are the ways to scale website:

  1. CDN – Content Delivery Network or CDN comes as big rescue if you want scale website. CDN helps you to serve all your static and dynamic assets through its servers across the world. Even if traffic is increasing exponentially, CDN makes sure that all requests are distributed across the world with requests being served from nearest servers. This also decreases load time. Your servers can focus on other stuff.
  2. Load Balancing – Load balancing is very effective in scaling a website. As the name suggests, load balancing is a process of distributing network traffic across different servers. In this way, if one server is free then load balancer will direct traffic to that server decreasing the load on current servers. This process is done by using couple of algorithms like round robin, IP hash etc.
  3. Caching – Local Caching which involves storing external resources locally and looking up next time when same resources are requested. Centralized Caching focuses on loading data once and sharing it across multiple devices. All can connect to same store and pull in resources, Redis can be using for this purpose
  4. More servers – It’s a no-brainer. Bigger and better server always help in handling more traffic
  5. Reduce Bandwidth usage – Whenever your server receives a lot of traffic, it’s important to decrease bandwidth usage. This effectively leads to increase in page speed, as load on server decreases. This can be done by compressing your code and other resources.
There are couple of other ways to scale website but that involves coding the application in a specific way. From frontend/javascript interview perspective, you may get a question on ways to scale website.
Read my interview experience on Walmart, Amazon, Flipkart, MS, Paytm, MMT, OYO, Intuit, etc.
Links:

I hope, you liked my article on How to Scale Website. Please comment and share your knowledge as well. Also, let me know if you want a entire blog post on my Walmart Frontend Interview experience.

Leave a Reply

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

Subscribe to receive helpful content for your next Front End Interview. No Junk. No Spam.

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

FE / JS will use the information you provide on this form to be in touch with you and to provide updates and marketing.