More Resilient and More Scalable: Upstash with Multi-Zone Replication
Blog post from Upstash
Multi-zone replication capability enhances database high availability and scalability by replicating data across multiple availability zones, ensuring that applications remain unaffected by zone failures as requests are redirected to healthy zones, and reducing failover time from minutes to seconds. The architecture employs a single leader replication model where each key is managed by a leader replica, with backup replicas supporting write operations and providing read scalability, while the failure detection mechanism triggers a leader election when the current leader fails, causing minimal unavailability. Consistency is maintained through two modes: eventual consistency, which offers better scalability but may return stale data, and strong consistency, which ensures data safety and disk sync before responses but reduces scalability. Upgrades to multi-zone replication are managed via the Upstash Console with no downtime, though minor performance degradation may occur during migration, which varies in duration depending on the database size.