CartoDB/node-cartodb-redis — pull request #9 by zenitraM (2014-06-18 16:28:07+00:00)
Title: Add getDBAsyncSlaves, getDBSyncSlaves

We're going to introduce support for database slaves on our infrastructure.
They are identified by the IP of their master cluster. They're also to be read from the same Redis database as the user_metadata, with keys:
`db:[database_ip]:sync_slaves`
`db:[database_ip]:async_slaves`
This introduces support for reading them.

Use of these slaves is optional and only used for performance matters: the "original" database_ip is assumed to be always available, and the keys may return empty (due to not being set).

- If we're using *only* read queries and require consistency, it is permissible to balance between the master DB and their synchronous slaves.
- If we're using *only* read queries and can manage (or don't care about) replication lag, it is permissible to balance between sync_slaves, async_slaves and the master<.