Postgres & Rails 6 Multi-DB: Pitfalls, Patterns, Performance
summary
Rails 6 multi-DB support lets Rails split reads and writes but it forces real choices: replicas lag from massive WAL on Write-heavy primaries (millions of users, hundreds of millions of updates per day), moving characters and sharding quotes reduces primary load but creates network hops and application-layer joins that slow tail latency. The talk demos partitioning with Postgres 11, sharding a quotes DB, visibility via Heroku CLI and data.heroku.com, and recommends PgBouncer and Rails 6 multi-DB guardrails like thresholds and circuit breakers.
AI-written summary · about
chapters (9)
- 0:00Intro
- 2:40Super Secret Social interest platform revisited
- 4:09Let's Talk about the CAP...Theorem
- 9:59Interest Outlet: Our favorite Characters Performance: Optimizing Read Replicas
- 15:39Interest Outlet: Inspirational Quotes Performance: Partitioning Large Tables
- 22:25Consideration: What about connection pools?
- 24:23Refresher: My data is too big for DB Caches, what happens now?
- 27:33Food For Thought
- 32:49Heroku Connection Pooling: PgBouncer Beta
related talks
56mScaling Rails API to Write-Heavy Traffic
30mPuny to Powerful PostgreSQL Rails Apps
26mBiggish Data With Rails and Postgresql
43mJust Use Postgres.
25mSaaS on Rails on PostgreSQL
51mScaling Postgres to the next level at OpenAI
34mBeyond CRUD: the PostgreSQL techniques your Rails app is missing.
30mUsing Multiple Databases with Active Record
