Ask HN: Should I choose NJS or Lua to extend Nginx

1 points by mitjafelicijan ↗ HN
I am working on a simple key value store for a project. I want to avoid messing with python server like uwsgi and having a reverse proxy and would like to take this opportunity to work with nginx.

I noticed that they added NJS, and they are heavily promoting that. Which one should I use? I will be saving and retrieving files from a disk (cca 200mb per file).

3 comments

[ 2.4 ms ] story [ 19.3 ms ] thread
Nginx does that natively. The key is the file name and the store is the disk. You can transform URLs using config files, if needed.
There are nginx modules for interacting with Redis and memcached.
I know about the ngx_http_keyval_module. I, however, would need to make this distributable with something like Raft consensus protocol. Or something similar to that, and I would like to avoid coding this in C if possible.

Maybe the solution could be something hybrid between already existing plugins and then do only the distribution part of the thing.