localshred/protobuf — pull request #105 by devin-c (2013-07-15 19:06:12+00:00)
Title: Add a ping mechanism

Checks for an environment variable `PB_RPC_PING_PORT` that the client will attempt to connect to before sending a request. If the connection succeeds, the request is sent; otherwise, the client loops until it finds a server that it can successfully connect to on the `PB_RPC_PING_PORT`.

The current implementation does not provide the ping server. It is expected that users of this mechanism will provide their own. This is meant to facilitate zero-downtime deploys at the networking layer, e.g., the server's ping port is blocked via firewall or other mechanism preventing client's from sending requests, at which point the server can shutdown cleanly and restart.