Historical Context
Before the Internet became common, most of the web applications were written for a relatively small group of users. For example, sales department of a company, HR department of a company, etc. With such business applications, the maximum number of users using the application was limited to all employees of the company for which the application was being deployed. In such case, a single powerful server could fulfill the requirement of that one company. With the advent of the Internet, now companies could reach hundreds of millions of users across the world. For really popular applications, this meant that at one time millions of users could be active on your web application. With such kind of traffic, one single server, no matter how powerful, will not be able to serve all of the active users. So software architects tried to handle this problem with clustering web application servers behind load balancers. Shared Nothing Architecture is a set of guidelines which allow you to design web applications that can scale to millions of users.Vertical Scaling vs. Horizontal Scaling

- Vertical ScalingVertical Scaling is a technique in which you increase the throughput of your deployment by increasing the physical hardware on a single machine. For example, you have a server with 2 CPU cores and 4GB RAM. Once you find that this server is reaching to its capacity, you can replace the server with a bigger machine, let's say, with 4 CPU Cores and 8 GB RAM. However, there is a limit to such kind of scaling. Let's say you have a machine with the highest possible configuration. If that machine can’t handle the load you have, then this solution can’t work.
- Horizontal ScalingIn Horizontal Scaling, you increase the throughput by increasing the number of servers. If the application is architected in a right way, there is no limit to what your application can scale up to. This technique, according to Google is by far the most popular in modern times. To support horizontal scaling you need to implement Shared Nothing Architecture, as all the big social applications use it.
Shared Nothing Architecture
According to the definition by Wikipedia, “A shared-nothing architecture (SN) is a distributed computing architecture in which each node is independent and self-sufficient, and there is no single point of contention across the system. More specifically, none of the nodes share memory or disk storage.”Simplified Web Application Architecture

Shared Nothing at Application Layer

Shared Nothing with Cache and Search System

Stack Overflow Architecture

Shared Nothing with Read Replicas for DB
