1

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

Eric
  • 1,321
  • 2
  • 15
  • 30
  • "finding that the application SQL statements (JDBC) are running really really slowly" - are the statements running slowly OR it takes a long time to return results? Maybe it is an issue with SQL Server instance. Have you tried running a few queries from outside of your app (e.g. SSMS)? – Alex Feb 14 '23 at 00:18
  • Hello Alex, thanks for you comment. The statements were only running slow from the "outside", meaning SSMS was more or less running fine. Either way, I don't know what changes I made, but the performance as improved - it still seems a little slower than before, but it is now acceptable and I'll leave it as is (for now). – Eric Feb 17 '23 at 07:11

1 Answers1

0

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

  • Hello Raul, thanks for your feedback. As the performance of the application has improved (I don't know what I changed), I'll now leave it as is ... however, I will still take a look at the link you provided - for possible future reference, thanks. – Eric Feb 17 '23 at 07:14