You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see that Trillian currently supports leader election using etcd or Chubby. Given that there is also a requirement for an ACID database store (Spanner/MySQL/CockroachDB), would it be reasonable to add an election implementation based on rows in a SQL database with a schema like the following?
CREATETABLEIF NOT EXISTS leader_election (
leader_name varchar(255) NOT NULLPRIMARY KEY,
node_name varchar(255) NOT NULL,
election_expiry datetime NOT NULL
);
The leader could do conditional updates of election_expiry based on node_name being the same, and non-leader nodes could do a periodic (e.g. 1s) query for expired elections they could claim.
This would have the advantage of reducing t he set of required Trillian dependencies, at a cost of somewhat more database traffic.
The text was updated successfully, but these errors were encountered:
That sounds like a good idea indeed. If you're going to use this, it will be better understood and maintained by you. Would you be okay to send PRs and maintain this in the long run? The election interface is defined in util/election2/election.go, and I'm assuming it would implement it. We'd add a sub-directory in util/election2, and we'd make you a owner of this directory in CODEOWNERS.
I see that Trillian currently supports leader election using etcd or Chubby. Given that there is also a requirement for an ACID database store (Spanner/MySQL/CockroachDB), would it be reasonable to add an election implementation based on rows in a SQL database with a schema like the following?
The leader could do conditional updates of
election_expiry
based onnode_name
being the same, and non-leader nodes could do a periodic (e.g. 1s) query for expired elections they could claim.This would have the advantage of reducing t he set of required Trillian dependencies, at a cost of somewhat more database traffic.
The text was updated successfully, but these errors were encountered: