Optimizing Latencies with SpiceDB's Dist...
# spicedb
p
Hello folks, I'm trying to wrap my head a bit around how spicedb dispatch works. https://authzed.com/blog/consistent-hash-load-balancing-grpc mentions that > SpiceDB dispatches to the next N "clockwise" nodes in the ring. This N is often called the spread. And, my understanding is that if N>1 , the request will be dispatched to N nodes, is that right? (BTW, is this were request hedging happens? we race these N requests to other nodes). The reason I'm wondering this is that I want to know how protected are we from having hot partitions in SpiceDB (not in the underlying cockroachdb), and my understanding is that, if we forward dispatch requests to N nodes, we'd be more protected than if we only dispatched to 1 node that could be congested.
y
afaiu it's more the idea that there are N possible nodes to dispatch to, and which of those nodes the dispatch will go to is based on a hash identifier of the dispatch request
with the idea that the same problem being dispatched within the same ring should land on the same node, which should increase the likelihood that that node already has the answer in its cache
i think there is technically a possibility for a pathological behavior if you're consistently missing the cache and the particular way that a certain kind of request gets broken down lands more heavily on a single node
but i don't think you're likely to encounter that in normal operation
p
I see, thanks @yetitwo
y
sure thing
4 Views