Most applications are developed using three tier architecture which consists of presentation layer, business logic layer, and data access layer. The presentation layer contains aspx, html or jsp page and business layer contains services like WCF, Web API or web services and data layer contains code to communicate to databases where the actual data resides.
This is how the application architecture looks.

How scalability comes into picture
The web application is up and running, users are happy and business getting revenue -- everything goes fine when the business is very small, now gradually the users’ level increases to the applications and the traffic to the applications became huge and web applications became very slow. When the application is very slow no user is interested in using the applications and the business loses revenue and reputation, and losing the business is losing everything.
This is where the scalability comes into the picturel how to extend the system to serve significantly high volumes of users. Scalability is not the same as performance scalability is not code issue, it is how we need to extend the application in multiple servers, multiple database, multiple location to server millions users.
When designing any system there are some key considerations which developers and architects should keep in mind. These are:
- Scalability – The number of users system/ session/transaction/ operations it can support.
- Performance – The system should use optimal utilization of resources like CPU, Thread, memory.
- Responsiveness – The time taken per operation should be less. Example: User should not wait a long time to get the information from server. Example -If we are booking tickets and it is very slow in doing a transactions we think what a bad application.
- Availability – The system should be the available at any given point in time. If not fully, it should be partially available ensuring that end users think the system is available.
- Downtime Impact - The impact of the downtime of a server/service/resource - number of users, type of impact should be very minimal.
- Cost – Cost for the system should be within the budget. More cost of the system does not give profit to the organization.
- Maintenance Effort- System must have the very litlle maintenance effort. For example if the system is developed now it must have the features to extend or enhance the feature very easily.
There are some key considerations when designing scalable systems, these considerations are:
- Vertical scaling
- Horizontal Scaling
- Horizontal Partitioning
- Vertical Partitioning
- Load balancing
- Master-Slave setup
- Distributed Caching
- Use NOSQL
- Incremental model development
Vertical
scaling
Vertical scaling means adding hardware to the system i.e., RAM, CPU, processors into the existing machine to increase the processing time in the server. In a virtual machine set up it can be configured virtually instead of adding real physical machines. When increasing the hardware resources we should not change the number of nodes. This is referred to as “Scaling up” the Server.
As an advantage it is simple to implement but as a disadvantage how much hardware we can add to it has a finite limit. Hardware does not scale linearly (diminishing returns for each incremental unit). Adding hardware requires downtime.
Horizontal Scaling
The horizontal scaling means adding more web servers through Load Balancing to the system similar to earlier one. Now multiple machines work together to give quick response and availability of any system including database. After adding multiple machines now we have multiple machines to distribute the work load from time to time.
Each machine works as a different node which is identical in nature here and sometimes multiple nodes are treated as a cluster of servers. This is referred to as “Scaling Out” of the web server.
As an advantage we have multiple servers which can distribute the user traffic, now the synchronization of codes, session management, caching data should be in a proper way to the user.
Horizontal Partitioning
Horizontal partitioning partitions or segments rows into multiple tables with the same columns.
E.g. of horizontal partitioning :- customers with city ABC codes are stored in Customers ABC, while customers with customer city XYZ are stored in Customers XYZ. Here the two partitioning tables can be ABC and XYZ .
This way Database partitioning by value from the beginning into your design is a good approach.
Vertical Partitioning
The term Vertical Partitioning denotes increasing the number of nodes by distributing the tasks/functions. Each node (or cluster) performs separate tasks different from the other. Vertical Partitioning can be performed at various layers,this may be at application /server / Data / Hardware levels. These are Task-based specialization, reduces context switching and we can do the optimization and tuning as much possible. Instead of putting everything into one box put it into different boxes. In Database tables consider we have customer, orders, customer order, and order status in one DB, we can move some of these into another DB.
Load balancing
Load balancing is the process of serving a user his request towards one server that is part of a server farm. In this way the user load is distributed amongst several servers.


Sanjeev RanjanPosted Jun 28, 2020, 5:07 AM
Very nice article. Keep writing good one. All the best
Pradeep SahooPosted Nov 6, 2016, 12:29 AM
Thank you Prakash for reading the article and putting your valuable comment .A good design , easy to make future change with less effort is a key attribute which should be taken care at the design phase of the application .Thanks once again
Prakash TripathiPosted Nov 5, 2016, 10:59 PM
Good one. Just a point on "scalability is not code issue", I beg to differ as scalability also involve at code. For example, If we don't use interfaces or abstract class or good software design, any future change is hard to scale.
Gyani NayakPosted Jun 7, 2016, 4:58 AM
Thanks for sharing. This is a great article on scalability!!
Thiruppathi RPosted Jun 3, 2016, 7:42 AM
Great article...
Atul KumarPosted May 10, 2016, 4:10 AM
Great article! Multiple aspects at one place to build scalable system.
Vignesh ManiPosted Mar 26, 2016, 8:54 AM
good
Kumaresh RajalingamPosted Mar 25, 2016, 9:48 PM
Good one
Saillesh PawarPosted Mar 25, 2016, 12:45 PM
NIce share
Kumaresh RajalingamPosted Mar 25, 2016, 10:57 AM
Good
Ankur MistryPosted Mar 25, 2016, 7:30 AM
Good to know
Debasis SahaPosted Mar 25, 2016, 6:29 AM
Nice share
Sibeesh VenuPosted Mar 25, 2016, 5:40 AM
Nice Share