samedi 9 mai 2020

How can I let a node in my cluster know other nodes are in a specific/desired state?

I have a node in my cluster (let's call it "master" for a lack of a better term) that when it starts up, it needs to start up an external service as well, but only if other nodes in cluster have both started up, and initialized their own external services.

Looks like we can use a database that's shared between nodes, and have each node update its state when it becomes ready. Master node will continue polling the database until it sees all other nodes have become ready. Only then master will start its own external service.

Above approach seems to be working fine. However I'm curious to know if there any other approaches, design patterns, or best practices.

Aucun commentaire:

Enregistrer un commentaire