Our KRPC implementation currently sends all RPCs, even those to the current host, through a single external IP. There are some cases why we might not want to do this. The immediately motivating issue for me is bugs in some tooling that cause self-RPCs on external IPs to fail. See https://github.com/istio/istio/issues/12551.
There are really two parts to this:
- Listening on the 127.0.0.1 interface
- Intercepting RPCs to the external IP and sending them to 127.0.0.1 instead.
An alternative solution would be to completely bypass the RPC stack, but that would be far more invasive.