aperture
aperture copied to clipboard
Dynamic backend service discovery
(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