Save 37% off PRO during our Black Friday Sale! »

Building highly available and fault tolerant sites on a budget

Building highly available and fault tolerant sites on a budget

How to easily build systems that are fault-tolerant enough and available-enough so that you're not a slave to your servers' uptime.

382b18eebb1386e80ff7e20fd1eb784e?s=128

Senko Rašić

October 04, 2015
Tweet

Transcript

  1. Building highly available and fault tolerant sites on a budget

    Senko Rašić, Good Code
  2. None
  3. None
  4. If your server crashes I feel bad for you son

    I got 99% problems but the uptime ain’t one
  5. Delegate

  6. None
  7.  Ƭ

  8.  Ƭ  Ƭ

  9. DNS master.example.com A 192.168.1.100 slave.example.com A 192.168.1.101 www.example.com CNAME master.example.com

    TTL 300
  10. Reverse Proxy ǃ Ý Ý master slave haproxy nginx …

  11. Round-robin DNS master.example.com A 192.168.1.100 slave.example.com A 192.168.1.101 www.example.com CNAME

    master.example.com TTL 300 www.example.com CNAME slave.example.com TTL 300
  12. Load Balancing ǃ Ý Ý master slave haproxy nginx …

    50% 50%
  13. ǃ   master slave Ƭ State

  14. image credit: http://myopia.podbean.com/

  15. Warm Standby + Streaming Replication Replication Manager - http://repmgr.org/

  16. Row-based replication with Global Transaction Identifiers (GTIDs) Automatic health monitoring

    & failover - mysqlfailover
  17. Replica sets - http://docs.mongodb.org/manual/replication/

  18. Master-slave replication (SLAVEOF) + Sentinel Redis Cluster

  19. Budget Digital Ocean Linode Heroku* Azure* GCP* S3* (assets) DNS

    2 x $5/mo 2 x $10/mo $3/mo Reverse Proxy 3 x $5/mo 3 x $10/mo $3/mo PaaS $16/mo $50/mo $36/mo
  20. Future considerations • Backup • Crash recovery • Logging •

    Datacenter-wide failures
  21. CLOSE ENOUGH