Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 28 days ago
JSON representation

ngx_bumpylife sets the randomized limit of requests to be processed for each worker process.

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).