可落地示例(Spring Cloud Gateway 关键片段)
- 路由缓存
- spring.cloud.gateway.route-cache-duration=30s
- 连接池与超时
- spring.cloud.gateway.httpclient.pool.max-connections=500
- spring.cloud.gateway.httpclient.pool.max-idle-time=30000
- spring.cloud.gateway.httpclient.connection-timeout=2000
- spring.cloud.gateway.httpclient.response-timeout=5000
- 启用 HTTP/2 与压缩
- server.http2.enabled=true
- server.compression.enabled=true
- server.compression.mime-types=application/json,application/xml,text/html
- server.compression.min-response-size=1024