Need a way to alter the hosts/endpoints at runtime?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 546
- Forks
- 76
- Avg merge
- 22h 46m
- Merged PRs (30d)
- 13
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the Etcd3 instance is constructed from cfg.hosts and how endpoint connections are maintained. Compare that behavior with the stated ClusterClient scope and the SRV-discovery example. Done means a client can abandon old endpoints and adopt new ones at runtime while continuing reads and writes without recreating the instance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grpc, nodejs, typescript
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100