Please enable JavaScript.
Coggle requires JavaScript to display documents.
General Architecture - Coggle Diagram
General Architecture
SPOF
Application Level SPOF: Web servers, databases, queues, other critical modules (authentication/IAM)
Network Level SPOF: physical network like: Network switches, Routers, Proxy servers, Storage Servers.
It can be fixed by Redundancy (duplication of components) and use load balancers.
ex: Replication for data nodes.
-
part of the system, if fails, it would stop the entire system from functioning.
Distributed Architecture
Computer workload/data nodes are spread across serveral nodes. It contains redundant nodes to ensure high availability in case of node failure
1- Fault Tolerance:
if machine was performing computational workload/storing data and it fails, then another machine should be able to perform the same commutation. and data should be available in another machine.
2- Know and Act:
System should know about any node added/removed without manual intervention. (service registry)
-
-
Fault Handling:
It is common for systems to fail. Failures could be network failures, application logic failures, storage failure, infrastructure failures etc.
It is important for systems to handle failures gracefully and make the system robust enough.
Fail Fast
fails quickly if there is a fault and is allowed to disrupt the normal functioning of the application. (Circuit Breaker)
Fail Safe in such away that it doesn't affect the overall system behavior and doesn't disturb normal functioning. (temp hide the problem)
Retry mechanisms in fault handling
system A would retry the same invocation, with the same request data periodically, until system B responds successfully.
Chatty Apps
Application point of view:
Disadvantage: require a lot of network round trip
Advantage: avoid exchange huge amount of data in every request. Analyze the use case, whether the client needs all the data at one shot or not?
tradeoff between response time per request and network/server load
Network point of view:
Waiting acknowledgement before sending new requests could affect system performance.
Use WAN optimizer / accelerate tools to minimize the number of round trips (caching responses)
Scalable Architecture
App Scaling is a process of adding (or removing) resources to an application, so that it can handle a growing (or shrinking) workload.
-
Horizontal scaling or 'Scale-Out':
where we add (or remove) machines and connect them together to form a distributed computing system.
Benefits:
- No limitation on scaling capacity
- Doesn't require app down time
- Inexpensive
Challenges:
Distributed computing introduces its own set of challenges, like Fault tolerance etc.
Master-Slave Architecture
master control slave nodes.
Communication direction is always from master to slave except in failure conditions. When master node fails, one of the slaves would take over as a master without impacting the system.
master control slave nodes.
Communication direction is always from master to slave except in failure conditions. When master node fails, one of the slaves would take over as a master without impacting the system.
Slave can be chosen based on:
- Configurations (configure a slave node to act as master)
- Voting (initial voting procrss amongst the slave nodes to choose the master)
Slave node should be aware of the state of the master before it went down (periodic synchronization=> and the time period of sync is depend on the use case and the criticality of the system)
Implementation:
Databases like MySQL could be configured in a Master- Slave setup. The master node could be read-write node whereas the slave nodes could provide read only operations