antirez/redis — pull request #1782 by mattsta (2014-05-28 19:38:27+00:00)
Title: 5 short clusterables

Yesterday I wrote a quick note about adding cluster support to clients, but it raised some interesting issues.

Here's an attempt at fixing some cluster implementation difficulties.

Four new things:
- Use the local bind IP (if available) instead of reporting `:0` for the `myself` IP
- Provide a `CLUSTER SLOTS` command with Redis-formatted output of the relevant parts of `CLUSTER NODES`
- Add `COMMANDS` so clients can discover key position information for each command, allowing better client-side key to slot mapping.
- `PUBLISH` to `__cluster__:state` when the cluster state changes so clients can automatically re-fetch their node map without waiting for timeouts or failures. Channel name was chosen arbitrarily. Open to suggestions for proper naming.

For more details, see each individual commit message/essay.