There are times when we really struggle to troubleshoot the networking behaviour of our applications. The reason behind this is because the application not omitted a networking log stuff, for example what protocol they used, what the source & destination IP, what is the domain they call, etc.
By using Istio service mesh, this purpose can be archived to make troubleshooting, logging, and audit more easy because we can track every incoming or outgoing connection, but this behaviour need to be enabled since it is a additional feature that Istio & Envoy support.
To enabled access or connection logging in all sidecar and gateway. We can create EnvoyFilter that enabled access logging in the sidecar.
The result is pretty awesome logging on the gateway and the sidecar. For example when I try to curl a service via Istio gateway:
In the gateway, we can check the log, and this is the log result:
With this log result, we can get lot of information that might be useful for debugging and auditing. Another example is communicating between workload in Istio mesh, we can check in both of source client and destination service log (container istio-proxy):
source client, you can see there is an outbout connection from the client.
destination service, you can see there is an inbound connection to this service.
May this is help for you who implement Istio and struggling to troubleshoot networking problem in the application.