High Availability Patterns Flashcards
What is Active-Active Replication
Active-Active Replication
In this pattern, multiple identical instances of the system are actively serving traffic simultaneously. Each instance maintains its own copy of data, and changes are propagated across all instances. This pattern ensures load balancing, fault tolerance, and scalability.
What is Master-Slave Replication
Master-Slave Replication
In master-slave replication, one instance (the master) is responsible for processing read and write operations, while one or more standby instances (slaves) replicate data from the master. If the master fails, one of the slaves can be promoted to the new master, ensuring continuity of service.
What is a Failover Cluster?
Failover Cluster
Failover clusters consist of multiple servers or nodes working together to provide high availability. If one node fails, another node in the cluster takes over its responsibilities, ensuring uninterrupted service. This pattern is commonly used in database clusters and web server clusters.
What is load balancing
Load Balancing
Load balancing patterns distribute incoming traffic across multiple servers or resources to prevent any single component from becoming overloaded. Techniques such as round-robin, least connections, or weighted distribution ensure optimal resource utilization and fault tolerance.
Give some examples of Redundant Components
Redundant Components
Introducing redundancy at various levels of the system, including hardware, software, and network infrastructure, ensures that if one component fails, there are backup mechanisms in place to maintain service availability. Redundant components can include servers, storage devices, network links, and power supplies.
What is database sharding
Database Sharding
In database sharding, large databases are horizontally partitioned into smaller, more manageable shards. Each shard is distributed across multiple servers, enabling parallel processing and improved scalability. Sharding helps distribute the load and prevents bottlenecks in high-traffic scenarios.
What is Health Endpoint Monitoring?
Health Endpoint Monitoring
In the cloud, an application can be impacted by several factors like latency, provider issues, attackers and application issues. It is necessary to monitor that application is working at regular intervals.
What is Queue-Based Load Leveling
Queue-Based Load Leveling
A service can be overloaded by heavy load / frequent requests which could affect the availability. By queuing such requests and processing them asynchronously will help improve the stability of the system.
What is Throttling
Throttling
Limit the number of resources utilized by a Service or its components or its clients such that the Service can continue to function meeting SLAs even during extreme load
What is the Bulk Head Pattern?
Bulk Head
Isolate application components such that failure of one doesn’t impact others. Bulk Head denotes a ship sectioned partitions of a ship. If one partition is compromised, water will only in that partition, saving the ship from sinking
What is the Circuit Breaker Pattern
When a service is deemed to have failed and can negatively impact other applications if it were to continue to run, it should throw exception and can be resumed later when the problems appear to be fixed, the service can be resumed
E.g. Hystrix
What is the Compensating Transaction Pattern?
In a distributed system, Strong Consistency is not always optimal. Eventual consistency yields better performance and integration of components. When something fails, it is necessary to undo the previous steps.
What is the Leader Election Pattern?
Leaders coordinate the actions performed by multiple similar instances. For example, several instances may be doing similar tasks and may need coordination and also avoid contention to shared resources. In some other cases, it may be needed to aggregate the results of work of several similar instances.
E.g. Zookeeper
What is the Retry Pattern?
Enable the application handle transient failures by retrying a failed operation to improve the stability of the Application
E.g. Retry4J, Spring Retry
What is the Scheduler Agent Supervisor Pattern?
Scheduler Agent Supervisor
Coordinate a larger operation. When things fail, try to recover for example using Retry pattern and succeed, but if the system is not recoverable, undo the work so that the entire operation fails or succeeds in a consistent fashion.