.withMaxNumServiceInstances(10)
.withMaxNumServiceInstancesPerEndPoint(1)
.withMaxServiceInstanceIdleTime(5, TimeUnit.MINUTES)
.build();
CalculatorServiceFactory serviceFactory = new CalculatorServiceFactory(config.getHttpClientConfiguration());
CalculatorService service = ServicePoolBuilder.create(CalculatorService.class)
.withServiceFactory(serviceFactory)
.withHostDiscovery(new ZooKeeperHostDiscovery(curator, serviceFactory.getServiceName()))
.withCachingPolicy(cachingPolicy)
.buildProxy(new ExponentialBackoffRetry(5, 50, 1000, TimeUnit.MILLISECONDS));
// If using Yammer Metrics or running in Dropwizard (which includes Yammer Metrics), you may want a health
// check that pings a service you depend on. This will register a simple check that will confirm the service