Add Availability patterns section

pull/5/head
Donne Martin 2017-02-27 05:19:11 -08:00
parent 156ddb11b7
commit 801d52ba8d
1 changed files with 36 additions and 0 deletions

View File

@ -617,3 +617,39 @@ This approach is seen in file systems and RDBMSes. Strong consistency works wel
### Source(s) and further reading ### Source(s) and further reading
* [Transactions across data centers](http://snarfed.org/transactions_across_datacenters_io.html) * [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)