Setting up highly-available
systems
Marian Marinov <mm@yuhu.biz>
Marian Marinov <mm@yuhu.biz>
Who am I?
Who am I?
➢ Sysadmin with more then 25y of
experience
➢ Director of Engineering at Web Hosting
Canada
➢ a FOSS dude :)
Agenda
Agenda
➢ Basics
➢ Application
➢ Network
➢ Storage
➢ Decision making
Basics
Basics
➢ Distributed vs. HA systems
Basics - Distributed
Basics - Distributed
➢ Distributed vs. HA systems
DataCenter 1 DataCenter 2
Basics - Distributed
Basics - Distributed
➢ Distributed vs. HA systems
DataCenter 1 DataCenter 2
Basics - Distributed
Basics - Distributed
➢ Distributed vs. HA systems
DataCenter 1 DataCenter 2
Basics - HA systems
Basics - HA systems
➢ Distributed vs. HA systems
Basics - HA systems
Basics - HA systems
➢ Distributed vs. HA systems
Basics - HA systems
Basics - HA systems
➢ Distributed vs. HA systems
➢ Most software is not build for
either of them
Application
Application
➢ Static web application like WordPress
➢ Single DB
➢ Sessions
➢ Uploaded content
Application - DB
Application - DB
➢ MySQL Replication works
➢ Combine it with:
➢ MariaDB MaxScale
➢ MySQL Router
➢ or ProxySQL
Application - Sessions
Application - Sessions
➢ Redis/Valkey/DragonflyDB + HAproxy or
Sentinel
Application - Sessions
Application - Sessions
➢ Redis/Valkey/DragonflyDB + HAproxy or
Sentinel
➢ do not use MySQL for sessions
Application - Sessions
Application - Sessions
➢ Redis/Valkey/DragonflyDB + HAproxy or
Sentinel
➢ do not use MySQL for sessions
➢ do not use a shared/distributed FS
Application - shared data
Application - shared data
➢ Eventual consistency
➢ Strong consistency
Application - shared data
Application - shared data
➢ Eventual consistency - rsync :)
➢ osync
➢ bsync
➢ unison
➢ unisync
➢ syncthing
Application - shared data
Application - shared data
➢ Strong consistency - file system
➢ DRBD+OCFS2
➢ OCFS2/GFS2 with remote block storage
➢ OrangeFS (previously PVFS2)
➢ GlusterFS
➢ MooseFS
➢ Lustre
➢ CephFS
➢ StorPool (distributed block storage)
Network
Network
➢ 2 separate networks
➢ public traffic (and backup for storage)
➢ storage & cluster traffic
Network
Network
➢ 2 separate networks
➢ public traffic (and backup for storage)
➢ storage & cluster traffic
➢ DC redundancy is possible
➢ BGP
➢ Cloud Load Balancer
➢ DNS balancing (not advisable)
Storage - DB
Storage - DB
➢ Replicated or Distributed DB
➢ MySQL or PostgreSQL with Master-Slave
➢ Redis or Cassandra for NoSQL
➢ etcd for distributed DB
Centralized vs. Distributed Storage
vs. Synchronized
Synchronized
Centralized
Centralized
➢ exported over NFS
➢ block dev over:
FC/iSCSI/FCoE/NVMe-oF/NVMe-oRDMA
Distributed
Distributed
Distributed
Distributed
➢ DRBD+OCFS2 (small)
➢ GlusterFS/MooseFS (slow but scalable)
➢ OrangeFS
➢ StorPool
➢ Ceph (but requires big cluster)
Synchronized
Synchronized
➢ rsync
➢ osync
➢ bsync
➢ unison
➢ unisync
➢ syncthing
Decision making
Decision making
➢ Hashicorp Nomad
➢ Kubernetes StatefulSets
➢ Corosync + Pacemaker
DEMO
Marian Marinov <mm@yuhu.biz>
Questions?
Marian Marinov <mm@yuhu.biz>

Thinking about highly-available systems and their setup