首页 > 解决方案 > 提高 Springboot 中同步 SOAP API 的性能

问题描述

SYNC SOAP在 Spring Boot 中有一个基于 API。根据早期呼叫的输出,基本上有 3 个呼叫。我们去计算它可以处理的事务数,tps对于每秒发送 100 个 5000 个事务的负载,它甚至没有超过 30 个。我正在使用嵌入式 tomcat 容器来处理请求。

我最终找到了以下spring-boot属性,这些属性有助于将性能提高到 40 以上,但仍然无法与每分钟发送 100 笔交易相提并论。

# Core number of threads. Default is 8
spring.task.execution.pool.core-size=10

# Maximum allowed number of threads. Default is 1
spring.task.scheduling.pool.size=5
  1. 是否有任何其他 spring-boot 配置可以帮助更有效地处理多个请求?
  2. 我们能知道如何设置这些值吗

标签: javaspringspring-bootperformance-testing

解决方案


推荐阅读