views:

9

answers:

0

I need to manage connections to a number of services, hosted across a number of servers. Each service is available on more than one server for redundancy.

What I'd like to do is build a client, similar to memcached or beanstalkd clients, that can connect to the services in a round-robin fashion; if a connection goes down it tries the next one until it has gone through the list N times and no servers are responding.

What (design) patterns should I be researching to implement this? The method of connecting to a service is similar to the others, so is there a pattern that can encompass this also?