Read replication


#1

Does Adonis/Knex support read replication? From my googling the answer appears to be no but I wanted to make sure.


#2

Are you talking about read replicas? If yes, shouldn’t they be created at database level?


#3

Hi @virk

It’s for amazon RDS clustering. They provide two URLs. One for reading and one for writing.

Cheers.


#4

In that case, you need to define 2 database connections in your config/database.js file and use them separately.

But I agree, switching connections at runtime with Lucid models will be pretty hard. This RFC will make it possible in the future, however will take some time :slight_smile: