Read replication


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


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


Hi @virk

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



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: