I'm in the process of shifting an application from one VM Instance to another within the Azure cloud. The new instance is now hosted behind (multi?) firewalls. For HTTPS I had to configure -Dhttps.proxyHost=my.https.proxy
and for a required SFTP connection I had to configure -DsocksProxyHost=my.socks5.proxy
in both cases the required connections seem to be working fine.
However, I am now finding that the application SQL statements (JDBC) are running really really slowly. The MSSQL Server is located on the same server as the Java application, so the connection uses localhost
. I did some searching and found a post (somewhere) which claimed that the option -Dhttp.nonProxyHosts="localhost|127.*|[::1]"
could be used to bypass the socks proxy, even though it is not stated within the documentation, see:
https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/net/doc-files/net-properties.html
I've now tested the nonProxyHosts
and noticed zero performance improvements.
My suspicion is that the issue is being cause by the SQL network traffic being routed out to the Socks proxy and back again, I don't know - maybe the performance issue lies somewhere else?
If socks is the issue, how can I bypass it for localhost connections? If socks isn't the issue, then what can I do to try and find out why the JDBC is soooo slooooow?
Thanks
Without knowing what those firewalls are doing it is like shooting with the eyes closed, maybe you can try to disable the firewall for loopback traffic
https://superuser.com/questions/948084/pf-firewall-how-to-disable-all-filtering-on-loopback-interface-except-specific