gapwatch: crash-test how many database changes your app misses when its connection drops #53345
Dakokodaripon
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I built a small open-source CLI to measure something I kept running into with real-time apps: when a connection drops, database changes sent during the gap just disappear, with no error.
gapwatch writes numbered changes to your database, listens the way an app does, cuts the listener's connection on purpose, and reports exactly what never arrived.
I ran it against a free Supabase project from Brazil (database in Ohio, through the Session pooler):
Two things surprised me:
To be clear about scope: version 0.1 tests Postgres LISTEN/NOTIFY on a Supabase database, not Supabase Realtime itself. Realtime support is next on the roadmap.
Try it on a test project:
pip install gapwatch
gapwatch run --dsn "your Session pooler string" --count 600 --rate 5
gapwatch cleanup --dsn "..."
Use the Session pooler, not the Transaction pooler, which doesn't support LISTEN.
Repo: https://github.com/Dakokodaripon/gapwatch
I'd really like to hear if you'd use a real-time version, and which failure cases matter most to you: reconnects, server restarts, slow networks?
All reactions