backend.ai icon indicating copy to clipboard operation
backend.ai copied to clipboard

feat: Leader election based GlobalTimer

Open rapsealk opened this issue 3 years ago • 2 comments

This PR resolves(partially) lablup/backend.ai#415.

Using aioraft-ng, this PR removes a dependency onDistributedLock from GlobalTimer and ensures that GlobalTimer ticks only run on the leader process.

rapsealk avatar Aug 31 '22 05:08 rapsealk

When running a cluster with 5 nodes, it tolerates up to 2 failures. Also, a GlobalTimer joins when its process becomes a leader and leaves when it steps down.

https://user-images.githubusercontent.com/14137676/188081676-2f0d7204-a936-455c-b7a7-b258b95e3ec8.mov

rapsealk avatar Sep 02 '22 07:09 rapsealk

Need to find a way to transfer RootContext and PrivateContext objects to the leader process using Redis.

rapsealk avatar Sep 08 '22 03:09 rapsealk

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Mar 26 '23 03:03 CLAassistant

aioraft-ng is superseded by raftify.

achimnol avatar Aug 01 '23 09:08 achimnol