electric-sql / electric-sql/electric
Feature request: Need a public interface to stop the Electric Connection
Open
feature request
triage
- Dominant language
- TypeScript
- Stars
- 10.4k
- Forks
- 375
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 18
Description
During a rolling deploy, we have the old node holding its advisory lock to ensure only one consumer of the replication slot, and we have the new node waiting for that lock to be released. The new node starts serving traffic but will respond with 503s until the old node is killed, which could take minutes.
We would like to be to detect when a new node is deploying (e.g. with libcluster), and then automatically stop the Electric Connection on the old node, thus releasing the lock.
For now, we are using `GenServer.whereis` to find the Connection.Manager and using `GenServer.stop`, but this doesn't feel quite right.
Contributor guide
Assessment
This issue has not been assessed yet.