Professional Documents
Culture Documents
System Design & Architecture
System Design & Architecture
Redundancy
Is the creation of functionally identical or comparable resources of a
technical system for a trouble free fail safe operation.
Types of Redundancy
Hot redundancy means that the system perform the function of multiple
systems in parallel.
Cold redundancy means that in the system, several functions are
available in parallel, but only one is working.
Standby redundancy or passive redundancy adds additional resources
which will be turned on only in case of failure or malfunction in the execution of
the tasks of the already operating unit.
N +1 redundancy means that a system of n number of functional units
which are active at a time and consists of a passive standby unit.
Scalability
Scalability by decoupling the use of swings and infrastructure limitations
(scalability).
Types of Scalability
patial scalability has a system or application when the memory
requirement in an increasing number of elements to be managed not in at an
unacceptably high levels.
Temporal spatial scalability comprises by increasing the number of
objects which a system will not significantly affect its performance.
Structural scalability is distinguished from others, its not an
implementation, increasing the number of objects within a defined area even
hindered significantly.
The constraints of the cloud environment, that make up the "cloud operating model,"
include:
Applications are limited in the ability to scale vertically on commodity
hardware which typically leads to having many isolated autonomous services (often
called microservices).
All inter-service communication takes place over unreliable networks.
You must operate under the assumption that the underlying hardware can fail
or be restarted or moved at any time.
The services need to be able to detect and manage failure of their peers—
including partial failures.
Strong consistency and transactions are expensive. Because of the
coordination required, it is difficult to make services that manage data available,
performant, and scalable.
USL scalability
The Three Cs: Concurrency, Contention and Coherency
The three coefficients, α, β, γ, in eqn. (3) can be identified repectively
with the three Cs [Gunther 2018,SF ACM 2018]:
CONCURRENCY or ideal parallelism (with proportionality γ), which can also be
interpreted as either:
the slope associated with linear-rising scalability, i.e., the line X(N) = γ
N in Fig. A when α = β = 0
the maximum throughput attainable with a single load generator, i.e., X(1) =
γ
CONTENTION (with proportionality α) due to waiting or queueing for shared
resources
COHERENCY or data consistency (with proportionality β) due to the delay for
data to become consistent, or cache coherent, by virtue of point-to-point exchange
of data between resources that are distributed
NOTE: When β = 0 and γ = 1, eqn. (3) reduces to Amdahl's law. See Section
1.3.1.
Advantages/Benefits of Microservices
1. Independent Development and Deployment
2. Small Focused Team
3. Small CodeBase
4. Mix of Technologies
5. Fault Isolation
6. Scalability
7. Data Isolation
Best Practices
1. You can model the services around the business domain
2. We have discussed that individual teams are assigned for specific
services, so there is no need to share the code or data schemas.
3. For each service data storage should be private.
4. Each service in microservice should communicate through well-designed
APIs.
5. Coupling should be avoided between the services.
6. You should keep domain knowledge out of the gateway.
7. There should be loose coupling and high functional cohesion between the
services.
CAP theorem - a distributed system can only provide two of three properties
simultaneously
consistency,
availability,
and partition tolerance