Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give mastodon a better understanding of database replication lag #30176

Open
smiba opened this issue May 5, 2024 · 0 comments
Open

Give mastodon a better understanding of database replication lag #30176

smiba opened this issue May 5, 2024 · 0 comments
Labels
suggestion Feature suggestion

Comments

@smiba
Copy link

smiba commented May 5, 2024

Pitch

Right now, mastodon goes pretty much sideways the moment the replication lag grows unacceptably, however it's entirely unaware this is happening.

This happened on my instance while I was asleep (unfortunately), the replica ran out of disk space and postgres decided it would just keep working but stop applying new records. This lead to everything seemingly being "ok", but the instance was obviously rather unusable as it would constantly 404 on posts you'd swear you just saw a moment ago on your timeline.

It would be nice if mastodon could monitor replication lag, and warn, or at least temporarily backlist the failing SQL server from the pool.

Motivation

I think everyone running a bigger instance, or even everyone using a primary/replica setup will benefit greatly from this.

Obviously this can be prevented with additional monitoring outside of mastodon, or if anyone is on-call (as replication lag is probably something you'd monitor for). However I don't think it would be too unreasonable to add some intelligence to mastodon to monitor this :)

@smiba smiba added the suggestion Feature suggestion label May 5, 2024
@smiba smiba changed the title Give mastodon a better understanding of replication lag Give mastodon a better understanding of database replication lag May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion Feature suggestion
Projects
None yet
Development

No branches or pull requests

1 participant