June 2024
Intermediate to advanced
456 pages
11h 34m
English
Let’s configure the basics of Active Record Rails 6 multiple databases for read and write splitting. This requires the streaming replication you just set up in earlier sections. You’ve already solved the initial database operational challenges by enabling live replication between the instances. You set up the replica to receive changes, but you haven’t yet configured the application to connect to multiple databases. Let’s do that now!
Rideshare is currently configured for a single database. To change that, you will first need to edit config/database.yml, setting up connections to each of db01 and db02.
From the “Multiple Databases with Active Record”[345] page, config/database.yml is changed from ...
Read now
Unlock full access