Readyset Weekly: Issue 28
Being Aware of Latency-Aware Routing
When replicas span regions or clouds, round-robin and simple read/write splitting hit their limits. Latency-aware routing uses live query and health metrics to direct traffic to the lowest-latency replica that's still up-to-date.
- Start by measuring real latency: Ping times only capture network delay, not query execution or replica lag. Track query-level latency from your proxy and weight replicas using a smoothed average, so reads flow naturally to the fastest healthy node.
- Include replication lag in routing decisions: A fast but stale replica is worse than a slower fresh one. In Postgres, monitor
pg_stat_replication; in MySQL, checkSeconds_Behind_Master. Reduce a replica's weight as lag increases instead of cutting it out abruptly. - Stabilize route changes: If routing reacts to every latency spike, you'll get thrashing as sessions jump between replicas. Use moving averages or short smoothing intervals so routing adjusts gradually and predictably.
- Test real-world conditions: Inject latency with
tcornetemand observe how routing adapts. A healthy setup rebalances smoothly without oscillation or connection drops.
Latency-aware routing pays off most in multi-region or high-concurrency workloads where every millisecond counts. But routing alone can't overcome network distance.
At Readyset, we see it as the next scaling milestone: distribute work intelligently, then eliminate it entirely. QueryPilot builds on that by caching hot queries so fewer requests ever reach the database.
🔍 What We're Watching in the Database Ecosystem
Text to SQL is Dead — Long live Text to SQL
As LLMs creep closer to the data layer, Exasol digs into how to keep them in check. "Governed SQL" keeps AI from freelancing in your warehouse by enforcing read-only queries and full on-prem control.
Faster Database Queries: Practical Techniques
A sharp, hands-on guide to squeezing more speed out of your queries; covering smarter indexing, subquery rewrites, and execution-plan tuning that actually moves the needle in production.
The glaring security risks with AI browser agents
AI-powered browsers are blurring the line between automation and access control. This piece exposes how prompt-injections and credential leaks could turn convenience into a new attack surface.
In Case You Missed It
Does Your Black Friday Database Scaling Strategy Involve Duct Tape and Prayers?
Tanmay and Bianchi go live next Thursday to unpack why most Black Friday database plans collapse under load and how to prevent it. They'll share practical steps for scaling MySQL predictably with query caching, replica routing, and smarter automation. Register here.
Get Readyset Weekly in your inbox
One email a week — what shipped, what we learned, and what is worth reading.