You may get connection failures on some machines.
Sending the load to http://127.0.0.1:12345 does work.
You may have to be using a machine that supports both IPv4 and IPv6
Tentative theory:
- Because IPv6 is available, Nighthawk resolves localhost to the IPv6 address ::1.
- The Envoy is explicitly listening only on IPv4 (0.0.0.0) (if I understand correctly).
- Connecting to ::1 on port 12345 does not reach the Envoy, which is only listening on all IPv4 addresses.
That is, the issue could be with how Nighthawk resolves "localhost" on a dual IPv4/IPv6 machine.