Availability
To support a high availability, there are two complemenrary problems.
Fail-Over
Active-passive | Active-active | |
---|---|---|
Entity | An active server and a passive server | Two active servers |
Running Pattern | heartbeats are sent between the active and the passive server on standby | both servers are managing traffic, spreading the load between them. |
Feature | When the heartbeat is interrupted, the passive server takes over the active’s IP address and resumes service. | 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. |
- Disadvantage
- 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 vs master-master
Sequence vs Parallel
For sequence
$Availability_{Total}= Availability_{Foo} \times Availability_{Bar}$
If both Foo
and Bar
each had 99.9% availability, their total availability in sequence would be 99.8%.
For parallel
$Availability_{Total} = 1 - (1 - Availability_{Foo}) \times (1 - Availability_{Bar})$
If both Foo
and Bar
each had 99.9% availability, their total availability in parallel would be 99.9999%.
The content is cited from System design primer – Avalability Patterns.