~/talk

From Expensive Queries to Smart Caching: A DBA’s Guide for Rails

Talkat XO Ruby Atlanta 2025 · on Saturday, 2025-09-13· [ruby-on-rails, databases]
links:none on file
slides:none on file

Shows concrete fixes: use ProxySQL to front tens of thousands of Rails connections and limit back-end DB sockets, use ReadySet as a CDC-driven smart cache that serves heavy queries at microsecond latency, and keep query rewrites and stats in-place for fast triage. Gives numbers: spikes from 7,000 to 38,000 connections, ReadySet handling ~30,000 reqs/sec and a fleet dropping from 32 cores to ~2 for many workloads. Includes a Docker Compose demo repo and real production wins reducing load and cost.

AI-written summary · about

  1. 0:00Introduction
  2. 2:56Rails and MySQL in production
  3. 3:38Active Record connection pooling
  4. 5:23Viral traffic with MySQL
  5. 6:26Object relation mapping magic frustrations
  6. 7:52Cache invalidation pain
  7. 8:54Smart pooling with ProxySQL
  8. 11:46ProxySQL troubleshooting
  9. 13:55Slow queries with ProxySQL
  10. 15:22SQL commenter for Rails
  11. 16:04ReadySet for smart caching
  12. 18:31ReadySet reduces load
  13. 20:19Offloading reads to ReadySet
  14. 21:03ReadySet handling 30,000 requests per second
  15. 23:10Demo and resources
  16. 23:53Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.