简体   繁体   English

如何为 spring 引导应用程序上的数据库连接设置 TCP NODELAY

[英]How to set TCP NODELAY for db connections on a spring boot application

I have a java web application built on spring boot and spring data using Hikari pool, deployed in azure Kubernetes cluster, connecting to azure postgres database. I have a java web application built on spring boot and spring data using Hikari pool, deployed in azure Kubernetes cluster, connecting to azure postgres database. To solve a performance issue the Azure team has advised to set TCP NODELAY for this application.为了解决性能问题,Azure 团队建议为此应用设置 TCP NODELAY。 Can you please advise how to configure this for the spring application您能否建议如何为 spring 应用程序配置它

Current version of PostgreSQL JDBC Driver (42.3.1) does not support TCP_NODELAY option.当前版本的 PostgreSQL JDBC 驱动程序 (42.3.1) 不支持 TCP_NODELAY 选项。 But next version (42.3.2) will be supported.但将支持下一个版本(42.3.2)。

After 42.3.2 version you can use TCP_NODELAY option by adding 'tcpNoDelay=true' at the end of the JDBC URL like jdbc:postgresql://localhost:5432/postgres?tcpNoDelay=true After 42.3.2 version you can use TCP_NODELAY option by adding 'tcpNoDelay=true' at the end of the JDBC URL like jdbc:postgresql://localhost:5432/postgres?tcpNoDelay=true

The issue link: https://github.com/pgjdbc/pgjdbc/issues/2324问题链接: https://github.com/pgjdbc/pgjdbc/issues/2324

The commit link: https://github.com/pgjdbc/pgjdbc/commit/2a8ecbe2321ed92bc7051d3415a0484a5464346b#diff-af76c66c8a01becfcbfe739ba0cc2e4333e7d27865cb67cbb63db2e6f534801a The commit link: https://github.com/pgjdbc/pgjdbc/commit/2a8ecbe2321ed92bc7051d3415a0484a5464346b#diff-af76c66c8a01becfcbfe739ba0cc2e4333e7d27865cb67cbb63db2e6f534801a

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM