feat(dirty): add TTIN/TTOU signal support for dynamic worker scaling#3504
Merged
Conversation
- Remove beta warning from ASGI worker documentation - Add beta warning to Dirty Arbiters documentation - Update README feature list accordingly - Update changelog to reflect stability changes
Add support for SIGTTIN and SIGTTOU signals to the dirty arbiter, allowing dynamic scaling of dirty workers at runtime without restarting gunicorn. Changes: - Add TTIN/TTOU to DirtyArbiter.SIGNALS - Add num_workers instance variable for dynamic count - Add _get_minimum_workers() to enforce app worker constraints - Add signal handlers for TTIN (increase) and TTOU (decrease) - Update manage_workers() to use dynamic count - Add documentation for dynamic scaling - Add unit tests for signal handling - Add Docker integration tests The minimum worker constraint ensures TTOU cannot reduce workers below what apps require (e.g., if an app has workers=3, minimum is 3). Closes #3489
jayaddison
reviewed
Feb 16, 2026
|
|
||
| """Gunicorn configuration for TTIN/TTOU testing.""" | ||
|
|
||
| bind = "0.0.0.0:8000" |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
6 tasks
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.
Summary
Changes
num_workersinstance variable for dynamic count_get_minimum_workers()to calculate minimum required workers from app specsmanage_workers()to use dynamic count instead of configUsage
Minimum Worker Constraint
The dirty arbiter will not decrease below the minimum workers required by app configurations. For example, if an app has
workers = 3, you cannot scale below 3 dirty workers.Closes #3489