News for hackers. Stuff that matters.
Re:Nginx Unit – Universal web app server by shawabawa3 on Sunday September 10, 2023 @03:16PM (#37459013)
but this is the opposite of infrastructure-as-code

This is infrastructure-as-state

You have to manage automatically loading configs and keeping in sync with what you have in code, instead of deploying with a static configuration file

Re:Nginx Unit – Universal web app server by notnmeyer on Sunday September 10, 2023 @04:50PM (#37459943)
it’s not hard to imagine a use case where there are backend configurations stored in a database somewhere and you want to apply them. i’m picturing it as data vs static configuration.
Re:Nginx Unit – Universal web app server by everforward on Tuesday September 12, 2023 @02:53PM (#37485958)
I think they intend for you to run something idempotent like Ansible that coerces configs into the intended state.

In this case, I think Nginx is trying to avoid the in-fighting that happens between platform teams and the various teams that they serve. Most platforms with static configuration don't make it easy to ACL the platform so that one user can't mess with another user. E.g. it would be hard to automatically prevent one user from trying to take another's domain name.

This config API could be ACL'ed so that you can update your application code, but not change it's domain name or IP. Or whatever else the platform team wants to cut off. This hopefully comes with ACLs like that, but if it doesn't you could always add it in a standard way with a reverse proxy that has ACLs. That's a lot easier to do than trying to write an nginx config parser to make sure platform users aren't tinkering with a particular setting in their config.