Hacker News new | past | comments | ask | show | jobs | submit login

In the free version, you have to rewrite the config and restart the service. That's not fun if you expect services to come and go as part of your natural life-cycle

If that's happening super-frequently I could see the problem, but in practice I'd expect you to use `consul-template` and issue a `reload` to nginx to make it reload configurations with no downtime. This is the solution I've used and it works pretty well.




>This is the solution I've used and it works pretty well.

Just make sure consul-template never writes bad config as that will stop everything reloading. That's bit me a couple of times.


Can't you just run a nginx -t to run the config test and see if it passes before you reload?


nginx does that already. The problem is it'll stop you being able to reload configuration on other bits of config. Once there's a config error nothing can reload.

Limited blast radius don't really apply when it comes to nginx config errors (which given its origins is understandable). One error in one bit of config and it all stops.


Old workers stay around until all the connections for them or their grace period has expired. So i hope you're not too close to the resource limit to handle many generations of workers sticking around. also if you have many services behind a single port with path based routing and do a deploy the connection will stick around on the old workers until everything dies.

It's super fun with haproxy :(


Kind of bad, but what's the alternative? Cut everyone off on reload?


Have a better proxy that doesn't need to create a new generation of workers for config changes.

Like traefik or envoy or nginx when you pay for it or use the lua shit to do backend discovery (haproxy also has lua shit iirc)


Could you elaborate on what's wrong with using lua with ningx, especially as used by kong?


I think GP means Lua "shit" in a nonderogative manner (synonymous to Lua stuff).


kong. uses lua. has a wonderful API.


You can also use the consul k-v store as your source of traefik config and then update the config in consul and it updates in traefik instantly without any restart.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: