System Design is the core concept behind the design of any distributed systems. System Design is defined as a process of creating an architecture for different components, interfaces, and modules of the system and providing corresponding data helpful in implementing such elements in systems.
the
standard terms and key concepts of system design and performance, such as:
·
Latency,
·
Throughput,
·
Availability,
·
Redundancy,
·
Time
·
CAP Theorem
· Lamport’s Logical Clock Theorem.
Latency:
Latency is
defined as the amount of time required for a single data
to be delivered successfully.
Latency is measured in milliseconds (ms).
There is a
certain amount of time required for user input over the website and there is a
certain amount of time for the response from the web application to the user.
So the delay between user input and web application response to the
same input is known as latency.
Reasons
for high Latency
Now you
must be wondering about the factors that are responsible for delays. So high
latency mainly depends on 2 factors:
- Network
Delays
- Mathematical
Calculation Process Delays
Latency =
Mathematic Calculation Delays
In distributed
systems, there is a networks over which signals are passed to and fro hence
there will for sure be network delay.
Latency =
Mathematic Calculation Delays + Network Delays
How to
Reduce latency:
- Use a content delivery network
(CDN): CDNs
help to cut down on latency. In order to shorten the distance between
users and reduce the amount of time that data must travel over great
distances, CDN servers are situated at various locations.
- Upgrading computer
hardware/software: Improving
or fine-tuning mechanical, software, or hardware components can help cut
down on computational lag, which in turn helps cut down on latency.
- Cache: A cache is a high-speed
data storage layer used in computers that temporarily store large amounts
of transient data. By caching this data, subsequent requests for it can be
fulfilled more quickly than if the data were requested directly from its
original storage location. This lessens latency as well.
Throughput is defined as the measure
of amount of data transmitted successfully in a system, in a certain
amount of time. In simple terms, throughput is considered as how much
data is transmitted successfully over a period of time. The unit of
measure for throughput is bits per second or bps.
Availability is
the percentage of time the system is up and working for the needs.
How
to increase Availability?
- Eliminate
SPOF(major and important)
- Verify
Automatic Failover
- Use
Geographic Redundancy
- Continue
upgrading and improving.
From
the above understanding, we can land up with two conclusions:
- Availability
is low in monolithic architecture due
to SPOF.
- Availability
is high in distributed architecture due to redundancy.
Redundancy is defined as a concept where
certain entities are duplicated with aim to scale up the
system and reduce over all down-time.
Consistency is referred to as data
uniformity in systems.
When a
user requests data, the system always returns the same data, regardless of the
user’s location, time, etc. Before a user receives data from any node, the
server at which the data is updated or changed should successfully replicate
the new data to all the nodes.
Time:
Time is
a measure of sequences of events happening which is measured here in seconds in
its SI unit.
It is
measured using a clock which is of two types:
- Physical
Clock: responsible for the time between systems.
- Logical
Clock: responsible for the time within a system.
Three
desirable characteristics of distributed systems with replicated data are
referred to as CAP: partition tolerance, availability, and consistency.
Lamport’s
Logical Clock is
a process to ascertain the sequence in which events take place. It acts as the
foundation for the more complex Vector Clock Algorithm. A logical clock is
required because a distributed operating system (Lamport) lacks a global clock.
No comments:
Post a Comment