coreos/etcd — pull request #582 by benbjohnson (2014-02-19 23:21:25+00:00)
Title: wip(Proxy)

## Overview

This pull request adds the ability for nodes to join as proxies when the cluster size limit is reached.

## Changes

- Peer & Proxy Management added to Registry.

- Mode added to PeerServer. This can be either PeerMode or ProxyMode.

- JoinCommand sets overflow nodes as proxies.

- RemoveCommand removes proxies in addition to peers.

- Leader responses return X-Leader-Peer-URL & X-Leader-Client-URL headers.

- New Error (402): Proxy Internal Error

## TODO

- [ ] Add Configuration API.

- [ ] Update proxy urls on leader change.

- [ ] Promote proxies to peers.

## Questions

### How should we update the proxy urls?

I would like to minimize the internal state that proxies have to hold and make them as dumb as possible. Currently it retrieves the proxy url via the initial join command. It can also update the proxy urls if the leader changes but the original leader is still available. However, it doesn't handle a leader failure.

My thought is to simply have a new leader continually ping the proxies after leader change until all proxies have been notified.

The other option would be to maintain a cluster configuration within the proxies but that means that we're maintaining more state.

/cc @philips @xiangli-cmu