Scalable architecture

What is scalable architecture? Systems are often designed based on initial number of users in consideration. Few users to millions of users may be using the system. But there is possibility over the period of time the number may go up or usage may be high some times during the day or some days in a week or few months in  a year.  To support such usage the system should be designed to sustain any kind of usage or load. Both hardware and software should able to handle any increase in work loads. That is the core of scalable architecture.

Vertical scaling(scale-up_ is increasing the hardware like CPU power, memory etc to handle the workload. Horizontal scaling(scale-out) is adding more servers with similar hardware configuration or distributing different tasks to different servers minimizing the impact on one or few servers. The choice is always depending on the application requirements and no system is designed the same way.

Start everything in one Single Server for example web application, API, database including cache if needed. But not suggested, database should be on a different server(see next picture) for efficient use of compute resources. Then scale out depending on the usage, high availability etc.

But that's not a suggested architecture to start with (above picture). Preferably add a separate database server to be minimum where web application interacts with database for write and read operations.


Better scalable architecture with load balancer(preferred and used in most of the general applications). Web servers can be added and removed as needed if no sticky sessions are used. If sticky sessions are used then new requests needs to be stopped redirecting to the server that is to be removed and when there are no sessions the server can be safely removed.



Popular posts from this blog

Generating unique string in C#

Internet Information Services (IIS) on Load Balancer and shared folder for files

SQL Query Optimization