Repository navigation
fix(bbb-graphql-middleware): share the Hasura balancer's connection counts between nginx workers - #26248
Merged
antobinary merged 1 commit intoOct 30, 2026
Conversation
…ounts between nginx workers Without a zone, each nginx worker keeps its own least_conn counts for the hasura upstream, so a worker with no open connections picks the first server. Right after an nginx start or reload, joins that land on different workers mostly go to the first Hasura instance. With a shared zone the counts are global and the connections are split evenly. nginx needs a zone of at least 8 memory pages (32k with 4k pages); 512k also fits systems with 64k pages.
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review: 4
Please check the settings in the CodeRabbit UI or the
|
Tainan404
approved these changes
Oct 30, 2026
⏳ Automated tests are running... |
antobinary
merged commit Oct 30, 2026
c90e70a
into
bigbluebutton:v4.1.x-develop
72 of 77 checks passed
antobinary
added a commit
to antobinary/bigbluebutton
that referenced
this pull request
Nov 3, 2026
v4.1.x-develop gained bigbluebutton#26219, bigbluebutton#26267, bigbluebutton#26217, bigbluebutton#26248, bigbluebutton#26348 and three Dependabot image bumps since 9fffe59. They merge cleanly; the merge is here so that the two commits that follow can change bigbluebutton-web/Dockerfile and build-all-images.yml as those files now are on 4.1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follows the question on #26217 about balancing over two Hasura instances.
The
hasuraupstream usesleast_connbut has nozone, so each nginx worker keeps its own connection counts, and a worker that has no connections yet sends to the first server. Right after nginx starts or reloads (which is when a second instance gets added), connections mostly go to the first Hasura.Test: nginx with this file and two websocket backends, a client opening N long-lived websockets one by one, fresh nginx before each run, 5 runs each (Ubuntu 24.04 nginx 1.24.0 and nginx 1.30.6, 22 and 24 workers):
zone: N=12 → 12/0 in every run; N=40 → 32/8 (24 workers) and 30/10 (22 workers)zone hasura 64k;(the runs; the size does not change the balancing): N=12 → 6/6; N=40 → 20/20, every runThe same holds when the server is one name that resolves to two addresses.
nginx -tpasses on both versions. nginx needs at least 8 memory pages (32k with 4k pages); 512k also fits systems with 64k pages. The docs example in customize.md gets the same line, so copies keep it.