Current ZookeeperLoadBalancerConfiguration implementation caches service instances for 35 seconds by default.
If any instance get down in this period we will load balance on it anyway.
Of course, we can disable service instance cache, but it is not good by performance reasons (and zookeeper possible downtime).
In our project we implemented ServiceInstanceListCacheInvalidator which is subscribed to TreeCache from ZookeeperServiceWatch.
It removes single service instances (one cache entry) from cache when it is notified about that service instances change.
With this feature we can safely increase cache ttl to a relative big value (15 minutes or more).
What do you think about it? Can i make pull request with this feature?