dataplaneapi icon indicating copy to clipboard operation
dataplaneapi copied to clipboard

Consistent Hashing

Open tanguyfalconnet opened this issue 3 years ago • 1 comments

Hi,

We tried to use dataplaneapi with aws ec2 service discovery as explained in this article. We would like to go further by using it in front of a cache, using consistent hashing, with multiple HAProxy servers.

As implied in HAProxy documentation, IDs of servers are important for consistent hashing to be efficient for caching purpose. We need to keep a cache server to the same position in HAProxy server list all over the time. Without it, every time a cache server moves place in server list, it would receive requests for objects that aren't cached (cache MISS). We also need to be sure that every HAProxy servers has the same cache server list.

Could you provide a way to ensure that dataplaneapi is returning a consistent list of cache servers to all our HAProxy servers ?

tanguyfalconnet avatar Nov 18 '21 09:11 tanguyfalconnet

From v2.6.0 you can set the ID parameter to the servers. But we should look how to incorporate that in our service discovery.

mjuraga avatar Sep 15 '22 10:09 mjuraga