kenn / standby

Read from standby databases for ActiveRecord
MIT License
87 stars 28 forks source link

Is there a way to connect to multiple slaves? #19

Closed larryzhao closed 6 years ago

larryzhao commented 7 years ago

I couldn't find it in the guide, is it possible to do with Slavery?

kenn commented 7 years ago

At this moment, Slavery does not support multiple slaves. It's certainly doable with an API like:

User.on_slave(:replica2).all

Pull requests are welcome! 😎

Also keep in mind that 3-level DB config is coming.

kenn commented 6 years ago

It's supported in v3.0