Skip to content

Need a way to alter the hosts/endpoints at runtime? #157

Description

In order for services to behave themselves while the underlying etcd cluster is mutating (old nodes being replaced by new nodes) how can I tell my Etcd3 instance to abandon certain endpoints and adopt new ones?

As I understand it, ClusterClient is for altering the shape of the cluster itself, which is not what I want.
I just want to just read/write data from the cluster, and to adapt the shape of a cluster after it has changed.

Presently, I use an SRV record to initialize the client with something like:

      ...
      let result = await resolveSrv(cfg.discoverySrv);
      cfg.hosts = result.filter((r) => r.port == 2379).map((r) => `https://${r.name}:${r.port}`);
      const root = new etcd3(cfg);
      ...

I would like to periodically check the SRV record at runtime, and update the hosts value in the Etcd client, but I don't see a way to do that.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions