nginx / njs

A subset of JavaScript language to use in nginx
http://nginx.org/en/docs/njs/
BSD 2-Clause "Simplified" License
1.14k stars 148 forks source link

Add support for statefiles to js_shared_dict_zone. #709

Open jo-carter opened 5 months ago

jo-carter commented 5 months ago

For persistently storing the state of the shared dictionary across stop & starts of nginx, and to support loading a pre-defined set of key-value pairs into a shared dictionary without hacks.

There are certain cases where nginx must be stopped & started to make configuration changes, such as when adjusting the limit_req_zone's key. This feature would preserve shared_dictionary's values in those cases.

This would work in a similar fashion to NGINX Plus's Keyval Zone.