im hacking an app using RoR and Redis.
The Redis infrastructure wil have one master ( Writer ) and 3 slaves ( Readers ) and using HAProxy as load balancer to the Slaves.
What approach , you guys, are using in this scenario?
Should I have two Redis Client , one to MASTER and other to SLAVE (load balancer) ?
what is the best approach ?
Thanks
I would recommend using a wrapper on top of the redis connection. This way you can transparently implement the logic for implement writer/reader and use any scenario you want (this could be environment specific).
This way you can either call it direcly
or build a layer on top of it (think something like
remodel).