electric-sql / electric-sql/electric

Feature request: Need a public interface to stop the Electric Connection

Open
#3,258 5 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.