aospina/lb ? reverse-engineered prompt

Reverse engineered prompt

Build me a simple Nginx load balancer config for a couple of backend servers.

I want it to route incoming traffic to multiple app instances, spread requests evenly, and keep working if one backend goes down. Please set it up so it’s easy to change the backend addresses and port numbers later, and make sure the usual forwarded headers are included so the app can see the real client IP and original host.

If there’s a sensible way to add a basic health check or failover behavior with Nginx, include that too. Keep the config clean and ready to drop into a server, and if you need to look up current Nginx docs online to make sure the syntax is right, go ahead.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab