Avito's database platform team has enabled read operations from PostgreSQL replicas after six years of restricting traffic to primary nodes only. The platform manages three-node clusters where replicas were previously reserved exclusively for failover scenarios to ensure capacity for potential primary node promotion.
The transition to standardized database profiles made vertical scaling limits more apparent, prompting the team to allow read distribution. The platform now offers three logical connection paths: one for read-write operations, one for read-only without fallback, and one for read-only with a fallback to the primary node.
The system uses a declarative configuration where application owners enable read-only routes. The platform's discovery mechanism automatically updates routes based on node roles and replication lag, excluding nodes that exceed defined lag thresholds. Synchronous replicas are excluded from read pools to maintain cluster consistency.
The platform does not guarantee specific data freshness or replication latency, as these depend on write intensity and WAL volume. Applications must manage read-your-writes consistency and route selection, as the infrastructure does not automatically filter SQL queries or prevent write attempts on promoted nodes.





