Modify scaling.md to no longer use pgbouncer environment wide, but only for Sidekiq #1852
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current recommendation to run pgbouncer for the whole mastodon environment didn't sit entirely right with me.
This change in my opinion simplifies administration as it doesn't require the admin to take precaution with db:migrate, and keeps prepared_statements=true for mastodon-web.
Please let me know your opinion, and if changes are needed. This is just a quick writeup on what we're currently using over on our instance.
Of note:
DB_HOSTconfigured this will not connect to the local (pgbouncer) machine setup in the explanation, might be worthwhile including aDB_HOSTenv in the Sidekiq service file changes suggested, to make sure people are alert of this being relevant.DB_PORTcauses an issue where sidekiq tries to also connect to the replica on this port. This is already an issue on the existing page, as it's not documented anywhere that sidekiq also makes use of the replica DB. (I remember this being explicitly not allowed in the past?) -- This can be resolved by also running an instance of pgbouncer on the replica on the same port though.In general I believe these instructions should serve as an introduction for any admins, with further changes made to the configuration as they see fit for their setup.