nic-6443 opened a new pull request, #13688:
URL: https://github.com/apache/apisix/pull/13688

   ### Description
   
   The `prometheus-metrics`, service-discovery (`kubernetes` / `consul` / 
`nacos`), and `tracing_buffer` shared dicts **reject writes and drop data when 
full** — unlike caches such as `plugin-limit-count` or `balancer-ewma`, they 
have no self-healing eviction. Their current defaults overflow on medium and 
large deployments, producing symptoms that are hard to diagnose: silently 
missing Prometheus series, upstream nodes that never resolve, or lost trace 
spans.
   
   This raises the defaults so a typical deployment works without hand-tuning 
`lua_shared_dict` / `shared_size`:
   
   | Dict | Old | New | Stores | Scales with |
   |---|---|---|---|---|
   | `prometheus-metrics` | 15m (meta) / 10m (http) | 256m | metric series | 
route × label × bucket cardinality |
   | `kubernetes` / `consul` `shared_size` | 1m | 64m | discovered endpoints | 
services × nodes |
   | `nacos` / `nacos-stream` | 10m | 64m | discovered endpoints | services × 
nodes |
   | `tracing_buffer` | 10m | 32m | span backlog awaiting report | in-flight 
span volume |
   
   **Backward compatible.** An explicit size in `config.yaml` (or a discovery 
config's `shared_size`) always overrides the default, so deployments that 
already tune these are unaffected.
   
   **Trade-off.** These are larger reserved zones. On Linux the memory is 
committed lazily as a dict actually fills, so a small/idle deployment does not 
pay the full cost up front, and deployments that don't use a subsystem 
(discovery / tracing) can lower or omit the value. Feedback on the exact 
defaults is welcome — the intent is to pick values that cover the majority of 
deployments rather than the smallest possible footprint.
   
   ### Checklist
   
   - [x] Docs updated (kubernetes discovery `shared_size` default, en + zh)
   - [x] Tests updated (CLI render + kubernetes discovery default assertions)
   - [x] Verified locally that the rendered `nginx.conf` reflects the new 
defaults


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