Readyset Weekly: Issue 36
Attack Replica Lag at the Source
Replica lag isn't always a replication problem. It's usually excess work on the primary. If replicas are falling behind, start here:
- Reduce write amplification first: Extra index updates and redundant writes increase what replicas must replay. Audit high-write tables for unused indexes, noisy updates, and ORM-driven full-row writes.
- Keep transactions short and predictable: Long transactions delay replica visibility and increase replay latency. Avoid unnecessary read/write mixing, eliminate idle-in-transaction sessions, and commit early. Replication only moves forward once transactions are finalized.
- Watch for reads sneaking back to the primary: When reads fall back to the primary under load, CPU pressure increases and commit throughput slows, worsening replica lag. If the primary is doing read-heavy work, replication is already losing. Protecting the primary is one of the fastest ways to stabilize replicas.
- Eliminate high-frequency reads that don't need to hit the database: Frequent point reads and existence checks add CPU pressure on the primary and slow commits, worsening replica lag. These queries are stable, repetitive, and ideal to offload.
- Treat replica lag as a workload problem, not a replication problem: Replication tuning helps at the margins, but it won't fix excessive write churn or a saturated primary. Lag is a symptom, not the disease.
Replica lag isn't solved by adding replicas. It's solved by reducing unnecessary work at the source. When the primary stays lean and predictable, replicas stay closer to real time. That's exactly what SQL-level caching is designed to do: offload repetitive reads and protect the primary without changing application code.
🔍 What We're Watching in the Database Ecosystem
You Don't Need to Spend $100/Month on Claude
A practical breakdown of how teams overspend on LLMs by defaulting to premium models for every task, regardless of complexity. As application logic becomes increasingly agent-driven, database and infrastructure load will be generated by software, not humans. Cost-aware model selection matters because inefficient agents don't just burn tokens, they amplify downstream backend work.
The Year Data Centers Went From Backend to Center Stage
After years of being "someone else's problem," data centers are back in focus. Power constraints, AI workloads, and latency sensitivity are forcing teams to think harder about where compute runs relative to data. For databases, this means locality matters again, moving data or queries unnecessarily is becoming both a cost and performance liability.
Vibe-Coding Startup Lovable Raises $330M at a $6.6B Valuation
Lovable's rise underscores how fast AI-generated applications are entering production. The interesting part isn't the tooling, it's the traffic pattern: accelerated feature shipping creates more endpoints, more queries, and more repetitive load. Databases and backend systems will feel that pressure before developers notice it.
In Case You Missed It
2025 was a year of learning and clarity for us. As systems grew more dynamic, we started noticing new patterns in production and in conversations across the Postgres and MySQL communities. AI-generated code is changing how queries are written and how workloads evolve, and it's pushing database infrastructure in new directions. Those insights reshaped how we think about performance and directly influenced what we built this year. We shared the full story, the lessons, and what's next in our 2025 reflection.
Get Readyset Weekly in your inbox
One email a week — what shipped, what we learned, and what is worth reading.