https://github.com/cubicdaiya/ngx_bumpylife
ngx_bumpylife sets the randomized limit of requests to be processed for each worker process.
https://github.com/cubicdaiya/ngx_bumpylife
nginx
Last synced: 4 months ago
JSON representation
ngx_bumpylife sets the randomized limit of requests to be processed for each worker process.
- Host: GitHub
- URL: https://github.com/cubicdaiya/ngx_bumpylife
- Owner: cubicdaiya
- License: mit
- Created: 2015-11-07T20:02:50.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-31T12:13:48.000Z (almost 10 years ago)
- Last Synced: 2025-04-01T16:11:25.877Z (9 months ago)
- Topics: nginx
- Language: C
- Size: 6.84 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ngx_bumpylife
`ngx_bumpylife` sets the randomized limit of requests to be processed for each worker process.
It is inspired by [`ap-mod_bumpy_life`](https://github.com/hirose31/ap-mod_bumpy_life).
# Status
Early development phase
# Directives
## bumpylife
|Syntax |bumpylife on | off |
|-------|--------------------|
|Default|off |
|Context|http |
Enables or disables `ngx_bumpylife`.
## bumpylife_min
|Syntax |bumpylife number |
|-------|-----------------|
|Default|0 |
|Context|http |
Sets the minimun value for the limit of requests to be processed.
## bumpylife_max
|Syntax |bumpylife number |
|-------|-----------------|
|Default|0 |
|Context|http |
Sets the max value for the limit of requests to be processed.
# Behavior
If `ngx_bumpylife` is enabled, each worker process increments own counter and
sets `ngx_http_bumpylife_target_pid` in shared memory own pid when the number of requests to be processed overs the limit.
Moreover, checks the variable `ngx_http_bumpylife_target_pid` in shared memory and
sends `SIGQUIT` the process which pid is `ngx_http_bumpylife_target_pid`.
The limit of requests to be processed is randomized in the `bumpylife_min` to `bumpylife_max` range.
And `ngx_bumpylife` does not work in the cases below.
* `bumpylife_min` or `bumpylife_max` is zero.
* `bumpylife_min` is higher than `bumpylife_max`.
# Quick Start
```nginx
http {
bumpylife on;
bumpylife_min 500;
bumpylife_max 800;
...
}
```
# License
See [LICENSE](https://github.com/cubicdaiya/ngx_bumpylife/blob/master/LICENSE).