spicedb icon indicating copy to clipboard operation
spicedb copied to clipboard

Upstream consistent hashring implementation to gRPC

Open jim3ma opened this issue 3 years ago • 2 comments

Hi, every one, I'm member of Dragonfly.

We are looking for consistent hash ring balancer in gRPC, and we found this article https://authzed.com/blog/consistent-hash-load-balancing-grpc/ and this great project.

For more universal, we want to merge consistent hash ring code into go-grpc-middleware

I have updated code in my forked go-grpc-middleware repo and made little code changes.

I want to get the authorization of spicedb, so I create this issues for help.

Many Thanks Jim Ma

jim3ma avatar May 19 '22 03:05 jim3ma

Glad you're interested in the hashring balancer!

For now, would it suffice to import it from spicedb?

We can look for a better place to contribute the balancer, but most of the common balancer implementations live in grpc-go, not go-grpc-middleware. We could see if the grpc-go maintainers would be open to including a new balancer.

ecordell avatar May 19 '22 13:05 ecordell

Yes, you're right. We need create a proposal first in https://github.com/grpc/proposal.

jim3ma avatar May 19 '22 15:05 jim3ma

it seems like @ecordell attempted to upstream this in https://github.com/grpc/grpc-go/pull/5376 but faced some resistance as it required cross-language design.

@ecordell perhaps this is something we could extract into its own repository instead of upstreaming to grpc?

vroldanbet avatar Sep 22 '22 11:09 vroldanbet