From 801d52ba8defe2860c7ed5b66dad5d03ad23c4a1 Mon Sep 17 00:00:00 2001 From: Donne Martin Date: Mon, 27 Feb 2017 05:19:11 -0800 Subject: [PATCH] Add Availability patterns section --- README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/README.md b/README.md index b6d9c45..521277d 100644 --- a/README.md +++ b/README.md @@ -617,3 +617,39 @@ This approach is seen in file systems and RDBMSes. Strong consistency works wel ### Source(s) and further reading * [Transactions across data centers](http://snarfed.org/transactions_across_datacenters_io.html) + +## Availability patterns + +There are two main patterns to support high availability: **fail-over** and **replication**. + +### Fail-over + +#### Active-passive + +With active-passive fail-over, heartbeats are sent between the active and the passive server on standby. If the heartbeat is interrupted, the passive server takes over the active's IP address and resumes service. + +The length of downtime is determined by whether the passive server is already running in 'hot' standy or whether it needs to start up from 'cold' standby. Only the active server handles traffic. + +Active-passive failover can also be referred to as master-slave failover. + +#### Active-active + +In active-active, both servers are managing traffic, spreading the load between them. + +If the servers are public-facing, the DNS would need to know about the public IPs of both servers. If the servers are internal-facing, application logic would need to know about both servers. + +Active-active failover can also be referred to as master-master failover. + +### Disadvantage(s): failover + +* Fail-over adds more hardware and additional complexity. +* There is a potential for loss of data if the active system fails before any newly written data can be replicated to the passive. + +### Replication + +#### Master-slave and master-master + +This topic is further discussed in the [Database](#database) section: + +* [Master-slave replication](#master-slave-replication) +* [Master-master replication](#master-master-replication)