RavenDB 2.0: Replication Stats

The Replication bundle now includes a responder for reporting its stats. To access it, make a request to this Url on your raven server: /databases/<database>/replication/info. The response will look something like this:

{
    "Self": "http://johnspc:4001/databases/Hammer",
    "MostRecentDocumentEtag": "00000000-0000-0500-0000-00000000001a",
    "MostRecentAttachmentEtag": "00000000-0000-0000-0000-000000000000",
    "Stats": [
        {
            "FailureCountInternal": 0,
            "Url": "http://johnspc:4002/databases/Hammer",
            "LastHeartbeatReceived": "2012-12-06T16:54:17.2477825Z",
            "LastReplicatedEtag": null,
            "LastReplicatedLastModified": null,
            "LastSuccessTimestamp": "2012-12-06T16:54:17.2477825Z",
            "LastFailureTimestamp": null,
            "FailureCount": 0,
            "LastError": null
        },
        {
            "FailureCountInternal": 0,
            "Url": "http://johnspc:4003/databases/Hammer",
            "LastHeartbeatReceived": "2012-12-06T16:54:14.9300734Z",
            "LastReplicatedEtag": null,
            "LastReplicatedLastModified": null,
            "LastSuccessTimestamp": "2012-12-06T16:54:14.9320268Z",
            "LastFailureTimestamp": null,
            "FailureCount": 0,
            "LastError": null
        }
    ]
}

Each destination server is included in the root object's status collection. This is pretty amazing for getting some idea of how Replication is behaving. For each entry you can see counters, etags, and time stamps. How awesome is that?

Show Comments