Appwrite real‑time replication latency spikes under high write load
0 reputation · 19 Nov 2020, 21:40 UTC
Diagnosing replication lag in Appwrite’s real‑time database
The goal is to understand why replication lag increases when scaling Appwrite’s real‑time database to multiple nodes. The replication mechanism depends on a message broker (Redis Pub/Sub or RabbitMQ) to forward write events, and high write throughput can fill the broker’s queue, causing a backlog that delays replication. Network partitions, TLS overhead, and broker tuning parameters also influence latency.
Key constraints include the broker’s default throughput limits, the replication factor set for each database, and the inter‑node communication settings. Uncertainty remains about which factor—broker queue depth, write volume threshold, or TLS overhead—dominates the observed lag in a given deployment.
Specific questions
- How does the broker queue depth correlate with measured replication lag across different write rates?
- At what write volume does the broker’s backlog become the primary cause of replication delay?
- What broker‑level tuning parameters (e.g., max queue size, prefetch count) can mitigate latency spikes in a multi‑node Appwrite cluster?