How to easily build systems that are fault-tolerant enough and available-enough so that you're not a slave to your servers' uptime.
Building highly availableand fault tolerantsites on a budgetSenko Rašić, Good Code
View Slide
If your server crashesI feel bad for you sonI got 99% problemsbut the uptime ain’t one
Delegate
Ƭ
ƬƬ
DNSmaster.example.com A 192.168.1.100slave.example.com A 192.168.1.101www.example.com CNAME master.example.com TTL 300
Reverse ProxyǃÝÝmasterslavehaproxynginx…
Round-robin DNSmaster.example.com A 192.168.1.100slave.example.com A 192.168.1.101www.example.com CNAME master.example.com TTL 300www.example.com CNAME slave.example.com TTL 300
Load BalancingǃÝÝmasterslavehaproxynginx…50%50%
ǃmasterslaveƬState
image credit: http://myopia.podbean.com/
Warm Standby + Streaming ReplicationReplication Manager - http://repmgr.org/
Row-based replication with Global Transaction Identifiers (GTIDs)Automatic health monitoring & failover - mysqlfailover
Replica sets - http://docs.mongodb.org/manual/replication/
Master-slave replication (SLAVEOF) + SentinelRedis Cluster
BudgetDigitalOceanLinode Heroku* Azure* GCP*S3*(assets)DNS 2 x $5/mo 2 x $10/mo $3/moReverseProxy3 x $5/mo 3 x $10/mo $3/moPaaS $16/mo $50/mo $36/mo
Future considerations• Backup• Crash recovery• Logging• Datacenter-wide failures
CLOSEENOUGH