I just ran the test below and got these times. This is from my local machine to the Netflix 5 instance cluster at AWS. The first timing makes sense as the connection has to get set up. As a check, I also did the test with a raw ZooKeeper handle just creating some nodes. The average round trip was ~100ms.
CuratorFramework client = CuratorFrameworkFactory.newClient(..., new ExponentialBackoffRetry(100, 3));
client.start();
try
{
for ( int i = 0; i < 10; ++i )
{
long start = System.currentTimeMillis();
InterProcessMutex lock = new InterProcessMutex(client, "/lock");
Assert.assertTrue(lock.acquire(10, TimeUnit.SECONDS));
System.out.println("Elapsed " + i + ": " + (System.currentTimeMillis() - start));
lock.release();
}
}
finally
{
client.close();
}