A presentation
on
Scalable System Design
1
Presented by:
Md. Hasan Ansari
MSCS/071/655
Inroduction
2
Scalability is ability of a system, network, or process to
handle a growing amount of work in a capable manner.
For example, it can refer to the capability of a system to
increase its total output under an increased load when
resources (typically hardware) are added.
It is a highly significant issue in electronics systems,
databases, routers, and networking. A system, whose
performance
improves
after
adding
hardware,
proportionally to the capacity added, is said to be a
scalable system.
Measuring the scalability of a system
3
There have also been different perceptions on how to
measure scalability:
maximum number of simultaneous users supported by
the system or
maximum transactions processed per unit of time by the
system.
For example, the requirement could say that the system
initially should be able to support 50 simultaneous users,
but it should be scalable enough to support up to 500
simultaneous users.
Measuring the scalability of a system
4
The throughput of the
system usually iincreases
initially as the system is
exposed to an increasing
load.
After a certain limit the
throughput of the system
decreases from Knee
point.
Measuring the scalability of a system
5
This may happen due to
many reasons
like the system may be
feeling the scarcity of
hardware resources
After adding hardware
knee point is shifted.
Scalable System Design Patterns
6
Optimize Algorithm
Add Hardware
Introduce Parallelism
Optimize Decentralization
Control Shared Resources
Optimize Algorithm
7
The key to the solution is to identify the areas those can be
optimized for performance when the input load increases.
The aim is to identify tasks which can be completed in a
shorter period to save processing time. This shall result in
overall throughput improvement of the system by allowing
the saved CPU time to be allocated for growing work.
These areas can in some cases be identified by carrying a
code walkthrough to identify areas where smarter
algorithms can help improving the performance.
Optimize Algorithm
8
If code walkthrough does not help, then certain tools can be used
to identify the areas which are consuming most of the time
during processing.
These tools (like IBM Rational Quantifier) help identifying the
areas (functions) which are eating up most of the CPU time.
Using an alternate algorithm which shall result in keeping the
end result same but complete the same task in a shorter duration.
Known Uses: Running time of Insertion sort is O (n*n), while
that of Quick sort is O(n lg n). Hence, quick sort scales better
with n as compared to insertion sort as depicted in the Figure 4.
Optimize Algorithm
9
Add Hardware
10
The key to the solution is to identify the hardware resources
which are becoming scarce for the system. The scarce hardware
resources can be identified by using resource monitoring tools
(like prstat/top).
Once the scarce hardware resources are identified, the next step
is to add them in efficient quantity. The hardware resources can
be added to the same existing physical hardware or it may be
added as a new physical hardware.
Adding hardware to the existing physical node will result in what
is commonly known as vertical Scalability, where as, adding
hardware as a separate new node will result in enhanced
horizontal scalability.
Add Hardware
11
Known Uses:
Adding RAM to the existing machine incase it is
detected that the system requires more memory.
Adding a separate machine to a cluster in case it is
found that all the existing machines in the cluster are
being utilized to their full capacity.
Introduce Parallelism
12
How can a system maintain its performance with
increasing input load?
System that does not want to deteriorate its
performance when the load increases and has the
capability to split the work in to pieces which can
be completed simultaneously.
Introduce Parallelism
13
The key to a scalable design is to process multiple
transactions in the system simultaneously. The
system should do parallel processing in order to
maintain the throughput with the increasing load.
The work should be divided in to pieces that can be
done simultaneously so as to do more processing in
the same time.
Introduce Parallelism
14
Introduce Parallelism
15
Parallelism can come in different forms:
- A system can have multiple threads (Intra-process
scalability)
- Or, it can have multiple processes (Inter-process
scalability)
- Or, a system can have mix of both of the above
(Hybrid scalability) in order to process multiple
transactions simultaneously.
Introduce Parallelism
16
Known Uses:
Apache-Tomcat cluster having multiple Tomcat
nodes each one of them processing
HTTP requests independently. However, these
different instances may be talking to the same
database instance.
Broadband Remote Access Server
A Case Study in Nepal Telecom
17
A broadband remote access server (BRAS) routes
traffic to and from broadband remote access devices
such as digital subscriber line access
multiplexers (DSLAM) on an Internet service
provider's (ISP) network. BRAS can also be referred to
as a Broadband Network Gateway (BNG).
The BRAS sits at the core of an ISP's network, and
aggregates user sessions from the access network. It is
at the BRAS that an ISP can inject policy management
and IP Quality of Service (QoS).
Broadband Remote Access Server
18
Broadband Remote Access Server
19
The specific tasks include:
Aggregates the circuits from one or more link access devices
such as DSLAMs
Provides layer 2 connectivity through either transparent
bridging or PPP sessions over Ethernet or ATM sessions
Enforces quality of service (QoS) policies
Provides layer 3 connectivity and routes IP traffic through
an Internet service providers backbone network to the
Internet
Broadband remote access server
20
A DSLAM collects data traffic from multiple subscribers into a
centralized point so that it can be transported to a switch or
router over a Frame Relay, ATM, or Ethernet connection.
The router provides the logical network termination. Common
link access methods include PPP over Ethernet (PPPoE), PPP
over ATM (PPPoA, bridged ethernet over ATM.
The BRAS is responsible for assigning network parameters such
as IP addresses to the clients.
The BRAS is also the interface to authentication, authorization
and accounting systems.
References
21
Reliable Distributed Systems, Technologies, Web
Services and Applications by Kenneth P Birman.
Design, performance and scalability of the
distributed enterprise systems, by Janusz Kowalik.
Distributed systems: principles and paradigms by
Andrew S. Tenanbaum.
http://en.wikipedia.org/wiki/Scalability
22
Thanks
Queries?