njs icon indicating copy to clipboard operation
njs copied to clipboard

Add support for global permanent variables

Open porunov opened this issue 6 years ago • 3 comments

It would be very useful to have an ability to create, update and read permanent variables in njs. In such case more complex logic could be build. For example, we could dynamically change a secret key for hmac building mechanism.

porunov avatar Jul 08 '19 19:07 porunov

I'm planning to build a data collecting system based on njs: clients post small binary data to nginx, and njs needs to append the received data to a local file. In this scenario it's better to have a worker-process-scoped shared buffer to store the received data, and perform batch write to file to reduce # of calls to fs.appendFileSync.

yc-huang avatar Mar 10 '22 07:03 yc-huang

I would love this sort of functionality. It would allow me to add support to Dokku for starting/stopping docker containers automatically when a request comes in, caching the container status as necessary.

josegonzalez avatar Sep 24 '22 02:09 josegonzalez