Search code examples
load-balancingfinagle

Finagle KetamaShardingServiceBuilder is unknown


We're using finagle as a rest api and as we need to have some exotic loadbalancing we used Finagle's KetamaShardingServiceBuilder available in 19.3

I tried updating finagle version to 20.10 but the KetamaShardingServiceBuilder seems gone. No indications in the changelog, and hardly any reference on the world wide web. It appears ShardingService (with KetamaShardingServiceBuilder) has completely been removed from com.twitter.finagle.core.service after version 20.3, without documentation or deprecation.

Hopefully any more insights here?


Solution

  • jerry, it looks the question got answered in gitter, I will try to also close the loop here.

    The ShardingService along with KetmaShardingServiceBuilder was removed in 20.3.0, changelog here, with the reason we believe it is a duplication of PartioningService, apologize not making it deprecated first to raise a warning.

    Depends on which protocol you are using, more sophisticated partitioning APIs are provided as alternatives, more docs

    http://twitter.github.io/finagle/guide/Clients.html#partition-aware-client http://twitter.github.io/finagle/guide/PartitionAwareClient.html

    I believe the HashingPartitioningStrategy would provide an equivalent algorithm (if use the Ketama as the hasher) with KetamaShardingServiceBuilder as you are seeking.