Traefik performance sucks... In my bench, it is like 6 times slower than haproxy on an AWS instance.
It eats up a huge amount of memory and burns all the cups....
As well, traefik configuration is not flexible enough to match haproxy power...
But nginx does not do basic load balancing related features such as health checking, persistence (some apps still need that), DNS service discovery, stats, observability, etc...
Well this looks doable with Lua, as an http action probing an api that would let it now if the destination service is available and where.
One point about routing, do you mean that server for handling /foo/bar may not exist yet in haproxy's configuration? If so, we could enforce the destination IP at runtime, based on the response provided at the step above.