blackpearlsystems/scamandrios — pull request #2 by ceejbot (2013-09-11 21:07:46+00:00)
Title: Add connection monitoring

A connection pool monitor timer fires every 15 seconds & exercises each active client with a query against the system keyspace. If this query responds with an error or times out, the client is removed from the active pool & added to the dead pool. The dead pool is re-checked every time the monitor function executes, so cassandra nodes that die & revive can be re-added to the pool.

Previously there was no way to detect or remove dead nodes from the pool, so it would cheerfully go on handing out dead clients to any users.

While I was there, cleaned up connection pool to use foo.prototype.bar = function() syntax, which is more common in our code base.