jagerzhang opened a new issue #6188:
URL: https://github.com/apache/apisix/issues/6188


   ### Issue description
   
   APISIX配置中默认开启了keepalive提高性能:
   ```
   upstream:
         keepalive: 320
         keepalive_requests: 1000
         keepalive_timeout: 60s
   ```
   
   开启后,想在特定的 upstream 中关闭keepalive, 比如尝试在upstream里面添加如下配置:
   ```
   "keepalive_pool": {
       "idle_timeout": 0,
       "requests": 1000,
       "size": 320
     }
   ```
   添加后,idle_timeout 会被过滤掉,最终还是用的配置里面的keepalive_timeout。
   
   **请问下,APISIX本身就是这样设计的么?有没有办法在全局开启keepalive的情况下关闭指定upstream的keepalive?**
   
   目前看只能反过来实现,全局关闭keepalive:
   ```
   upstream:
         keepalive: 320
         keepalive_requests: 1000
         keepalive_timeout: 0s  #  设置为0
   ```
   
   然后在需要开启的upstream中打开keepalive。
   
   ### Environment
   
   - apisix version (cmd: `apisix version`): 2.11.0
   - OS (cmd: `uname -a`): docker-centos
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to