Aias00 opened a new issue, #7586:
URL: https://github.com/apache/shenyu/issues/7586

   ## Problem
   
   
`shenyu-spring-boot-starter/shenyu-spring-boot-starter-k8s/src/main/java/org/apache/shenyu/springboot/starter/k8s/IngressControllerConfiguration.java`
 hardcodes the controller tuning parameters, so they cannot be adjusted per 
deployment:
   
   - `IngressControllerConfiguration.java:105` — `builder.withWorkerCount(2)` 
for the ingress controller
   - `IngressControllerConfiguration.java:144` — `builder.withWorkerCount(2)` 
for the endpoints controller
   - `IngressControllerConfiguration.java:102` and `:142` — 
`.withResyncPeriod(Duration.ofMinutes(1))`
   - `ControllerManager` is submitted to a bare 
`Executors.newSingleThreadExecutor()`
   
   There is an explicit `// TODO support config in application.yaml` at line 
104 confirming this is a known gap.
   
   Deployments with very large ingress/endpoint sets cannot raise worker 
concurrency to keep reconciliation latency down, and small deployments cannot 
lower the full-resync frequency to reduce API-server load.
   
   ## Suggested fix
   
   Introduce a `@ConfigurationProperties` class (e.g. 
`ShenyuKubernetesControllerProperties`) with `worker-count` and `resync-period` 
fields, and bind both controller beans to it. The TODO at line 104 can then be 
removed.
   
   ## Notes
   
   - Defaults must remain `worker-count = 2` and `resync-period = 1m` so 
behavior is unchanged for existing users.
   - The ingress and endpoints controllers share `ServiceIngressCache` and 
other static caches. Raising the worker counts is safe only because those 
caches are already thread-safe; that assumption should be stated in the 
property's Javadoc so a future change does not silently break it.
   - Consider also making the `ControllerManager` executor configurable (or at 
least naming the thread) while touching this class.
   


-- 
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