Wednesday, August 14, 2013

Hubot Lock Structure

1. Two kinds of locks :

"Uploading Lock"  single node in zookeeper
"Health"  with two children "targetingA" and "targetingB"

2. Whenever uploading (indexing) one cluster
We acquire "Uploading Lock" and set "Health/targetingA"  false. API cannot read from targetingA any more.
If you set "Health/targetingB" true (we call this "overwrite to targetingB"), that allows API read from targetingB

3. "Uploading Lock" make sure anytime, only one cluster is doing uploading.
"Health" lock mark the one API can use.

No comments:

Post a Comment