uber-node / ringpop-node

Scalable, fault-tolerant application-layer sharding for Node.js applications
http://uber.github.io/ringpop/
MIT License
1.18k stars 146 forks source link

[Feature] Key consistent forwarding #310

Closed thanodnl closed 7 years ago

thanodnl commented 7 years ago

Currently ringpop can be configured to compare the hashring when a request is forwarded and drop the request if the hashrings are inconsistent. This causes a lot of requests that are actually forwarded to the correct node to fail, resulting in a lot of timeout and errors on rolling restarts.

The PR will add the possibility to loosen the requirement from ring consistency to key consistency eg. if the key from the forwarded request is believed to be owned by the receiving node based on a hashring lookup it will execute the request. When this happen both the forwarder and the receiver of the forwarded request agree on the key ownership for the key to the receiving end.

This showed a huge improvement in performance of a ringpop application during a rolling restart.

CLAassistant commented 7 years ago

CLA assistant check
All committers have signed the CLA.

thanodnl commented 7 years ago

Tests look good as well