Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic backend service discovery #13

Open
guggero opened this issue Nov 18, 2019 · 0 comments
Open

Dynamic backend service discovery #13

guggero opened this issue Nov 18, 2019 · 0 comments

Comments

@guggero
Copy link
Member

guggero commented Nov 18, 2019

(from chat)

Possible working path:

  • modify LSAT to not read the services from disk anymore (well have the option, but a new interface), instead it accesses etcd to get the current working config set
  • there's an entry for each service it proxies to (key hierachy ofc flexible), it then watches those key sets for changes, when they change it updates its in-memory forwarding/service table
  • we have the normal 3f+1 instance of the naut server itself active
  • upon start up, they each attempt to grab win the election by grabbing the underlying mutex w/ a lease (https://godoc.org/github.com/coreos/etcd/clientv3/concurrency#Election)
  • the leader then sets a bit in their etcd service discovery config, which updates the LSAT proxy to direct traffic as needed
  • anytime they instance die or become unavailable (fail the hearbeat, or their lease expires), then the election restarts

docs on their election API: https://github.com/etcd-io/etcd/blob/master/Documentation/dev-guide/api_concurrency_reference_v3.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant