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

[💡 FEATURE REQUEST]: max_workers_unavailable Option for HTTP Plugin #1923

Open
eugene-nuwber opened this issue May 22, 2024 · 0 comments
Open
Assignees
Labels
C-feature-request Category: feature requested, but need to be discussed

Comments

@eugene-nuwber
Copy link

eugene-nuwber commented May 22, 2024

Plugin

HTTP

I have an idea!

I have an idea, listen to me!!

Summary:
Introduce a new configuration option max_workers_unavailable within the http.pool.supervisor section of the HTTP plugin. This option will specify the maximum percentage of workers that can be unavailable (due to restart or other reasons) while ensuring that a certain number of workers remain "alive".

Description:
In the current implementation of the HTTP plugin, managing worker availability during restarts can be challenging, especially under high load. To enhance the reliability and stability of the service, I propose adding a new configuration option max_workers_unavailable to the http.pool.supervisor section. This option will allow users to define the maximum percentage of workers that can be unavailable during a restart process.

Configuration:
The value of max_workers_unavailable can be an absolute number or a percentage of desired workers. This value indicates the exact number or proportion of the total worker pool that can be unavailable at any given time. For instance, setting max_workers_unavailable to 20% means that up to 20% of the workers can be restarted simultaneously, while ensuring that at least 80% of the workers remain operational.
The default value is 100% like it is implemented now.

Example:

http:
  pool:
    supervisor:
      max_workers_unavailable: 20%  # Ensures at least 80% of workers remain "alive"
http:
  pool:
    supervisor:
      max_workers_unavailable: 10  # Ensures only 10 workers can be restarted at once

Benefits:

Increased Stability: By controlling the number of unavailable workers, the system can handle high loads more gracefully without significant performance degradation.
Flexibility: Users can customize the availability threshold based on their specific requirements and load characteristics.
Improved Reliability: This feature will help prevent scenarios where too many workers are restarted simultaneously, leading to potential downtime or performance issues.
Use Case:
Consider a scenario where a service experiences a surge in traffic and needs to restart workers by ttl. With the max_workers_unavailable option, we can ensure that a sufficient number of workers remain operational to handle incoming requests, thus maintaining service availability and performance.

@eugene-nuwber eugene-nuwber added the C-feature-request Category: feature requested, but need to be discussed label May 22, 2024
@eugene-nuwber eugene-nuwber changed the title [💡 FEATURE REQUEST]: [💡 FEATURE REQUEST]: max_workers_unavailable Option for HTTP Plugin May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: feature requested, but need to be discussed
Projects
None yet
Development

No branches or pull requests

2 participants