This is an automated email from the ASF dual-hosted git repository.

nic-6443 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 2790b2fc0 feat: raise default sizes for non-evictable shared dicts 
(#13688)
2790b2fc0 is described below

commit 2790b2fc08427f8faa62f2f6fd32303dd46cd64d
Author: Nic <[email protected]>
AuthorDate: Fri Jul 10 18:11:11 2026 +0800

    feat: raise default sizes for non-evictable shared dicts (#13688)
---
 apisix/cli/config.lua                  |  6 +++---
 apisix/cli/ngx_tpl.lua                 |  4 ++--
 apisix/cli/ops.lua                     |  2 +-
 apisix/discovery/consul/schema.lua     |  2 +-
 apisix/discovery/kubernetes/schema.lua |  2 +-
 docs/en/latest/discovery/kubernetes.md |  6 +++---
 docs/zh/latest/discovery/kubernetes.md |  6 +++---
 t/cli/test_kubernetes.sh               |  4 ++--
 t/kubernetes/discovery/kubernetes.t    | 10 +++++-----
 9 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/apisix/cli/config.lua b/apisix/cli/config.lua
index 6537344d7..374e259d8 100644
--- a/apisix/cli/config.lua
+++ b/apisix/cli/config.lua
@@ -103,7 +103,7 @@ local _M = {
     },
     meta = {
       lua_shared_dict = {
-        ["prometheus-metrics"] = "15m",
+        ["prometheus-metrics"] = "128m",
         ["prometheus-cache"] = "10m",
         ["standalone-config"] = "10m",
         ["status-report"] = "1m",
@@ -162,7 +162,7 @@ local _M = {
         ["internal-status"] = "10m",
         ["plugin-limit-req"] = "10m",
         ["plugin-limit-count"] = "10m",
-        ["prometheus-metrics"] = "10m",
+        ["prometheus-metrics"] = "128m",
         ["plugin-limit-conn"] = "10m",
         ["worker-events"] = "10m",
         ["lrucache-lock"] = "10m",
@@ -177,7 +177,7 @@ local _M = {
         ["plugin-graphql-limit-count-reset-header"] = "10m",
         ["plugin-ai-rate-limiting"] = "10m",
         ["plugin-ai-rate-limiting-reset-header"] = "10m",
-        tracing_buffer = "10m",
+        tracing_buffer = "32m",
         ["plugin-api-breaker"] = "10m",
         ["etcd-cluster-health-check"] = "10m",
         discovery = "1m",
diff --git a/apisix/cli/ngx_tpl.lua b/apisix/cli/ngx_tpl.lua
index bbc14c3c7..ce4cf8020 100644
--- a/apisix/cli/ngx_tpl.lua
+++ b/apisix/cli/ngx_tpl.lua
@@ -77,7 +77,7 @@ lua {
     {% if status then %}
     lua_shared_dict status-report {* meta.lua_shared_dict["status-report"] *};
     {% end %}
-    lua_shared_dict nacos 10m;
+    lua_shared_dict nacos 64m;
     lua_shared_dict upstream-healthcheck {* 
meta.lua_shared_dict["upstream-healthcheck"] *};
 }
 
@@ -149,7 +149,7 @@ stream {
     lua_shared_dict lrucache-lock-stream {* 
stream.lua_shared_dict["lrucache-lock-stream"] *};
     lua_shared_dict etcd-cluster-health-check-stream {* 
stream.lua_shared_dict["etcd-cluster-health-check-stream"] *};
     lua_shared_dict worker-events-stream {* 
stream.lua_shared_dict["worker-events-stream"] *};
-    lua_shared_dict nacos-stream 10m;
+    lua_shared_dict nacos-stream 64m;
 
     {% if enabled_discoveries["tars"] then %}
     lua_shared_dict tars-stream {* stream.lua_shared_dict["tars-stream"] *};
diff --git a/apisix/cli/ops.lua b/apisix/cli/ops.lua
index 36a2d3bca..d514de4a8 100644
--- a/apisix/cli/ops.lua
+++ b/apisix/cli/ops.lua
@@ -908,7 +908,7 @@ Please modify "admin_key" in conf/config.yaml .
         end
 
         local consul_conf = yaml_conf.discovery["consul"]
-        sys_conf["discovery_shared_dicts"]["consul"] = consul_conf.shared_size 
or "10m"
+        sys_conf["discovery_shared_dicts"]["consul"] = consul_conf.shared_size 
or "64m"
     end
 
     -- fix up lua path
diff --git a/apisix/discovery/consul/schema.lua 
b/apisix/discovery/consul/schema.lua
index 06fa9cabf..57080ee7b 100644
--- a/apisix/discovery/consul/schema.lua
+++ b/apisix/discovery/consul/schema.lua
@@ -27,7 +27,7 @@ return {
         shared_size = {
             type = "string",
             pattern = [[^[1-9][0-9]*m$]],
-            default = "1m",
+            default = "64m",
         },
         token = {type = "string", default = ""},
         fetch_interval = {type = "integer", minimum = 1, default = 3},
diff --git a/apisix/discovery/kubernetes/schema.lua 
b/apisix/discovery/kubernetes/schema.lua
index 0aa39c6bd..7de087ace 100644
--- a/apisix/discovery/kubernetes/schema.lua
+++ b/apisix/discovery/kubernetes/schema.lua
@@ -102,7 +102,7 @@ local default_weight_schema = {
 local shared_size_schema = {
     type = "string",
     pattern = [[^[1-9][0-9]*m$]],
-    default = "1m",
+    default = "64m",
 }
 
 local watch_endpoint_slices_schema = {
diff --git a/docs/en/latest/discovery/kubernetes.md 
b/docs/en/latest/discovery/kubernetes.md
index 6777cf0b7..a2f137c39 100644
--- a/docs/en/latest/discovery/kubernetes.md
+++ b/docs/en/latest/discovery/kubernetes.md
@@ -90,7 +90,7 @@ discovery:
       first="a",second="b"
 
     # reserved lua shared memory size,1m memory can store about 1000 pieces of 
endpoint
-    shared_size: 1m #default 1m
+    shared_size: 64m #default 64m
 
     # if watch_endpoint_slices setting true, watch apiserver with 
endpointslices instead of endpoints
     watch_endpoint_slices: false #default false
@@ -222,7 +222,7 @@ discovery:
       first="a",second="b"
 
     # reserved lua shared memory size,1m memory can store about 1000 pieces of 
endpoint
-    shared_size: 1m #default 1m
+    shared_size: 64m #default 64m
 
     # if watch_endpoint_slices setting true, watch apiserver with 
endpointslices instead of endpoints
     watch_endpoint_slices: false #default false
@@ -402,7 +402,7 @@ Which will yield the following response:
         "port": "6443",
         "schema": "https"
       },
-      "shared_size": "1m"
+      "shared_size": "64m"
     }
   ]
 }
diff --git a/docs/zh/latest/discovery/kubernetes.md 
b/docs/zh/latest/discovery/kubernetes.md
index 9e0b721cc..b769400c3 100644
--- a/docs/zh/latest/discovery/kubernetes.md
+++ b/docs/zh/latest/discovery/kubernetes.md
@@ -90,7 +90,7 @@ discovery:
       first="a",second="b"
 
     # reserved lua shared memory size, 1m memory can store about 1000 pieces 
of endpoint
-    shared_size: 1m #default 1m
+    shared_size: 64m #default 64m
 
     # if watch_endpoint_slices setting true, watch apiserver with 
endpointslices instead of endpoints
     watch_endpoint_slices: false #default false
@@ -221,7 +221,7 @@ discovery:
       first="a",second="b"
 
     # reserved lua shared memory size,1m memory can store about 1000 pieces of 
endpoint
-    shared_size: 1m #default 1m
+    shared_size: 64m #default 64m
 
     # if watch_endpoint_slices setting true, watch apiserver with 
endpointslices instead of endpoints
     watch_endpoint_slices: false #default false
@@ -399,7 +399,7 @@ GET /v1/discovery/kubernetes/dump
         "port": "6443",
         "schema": "https"
       },
-      "shared_size": "1m"
+      "shared_size": "64m"
     }
   ]
 }
diff --git a/t/cli/test_kubernetes.sh b/t/cli/test_kubernetes.sh
index f60f856b5..c74718409 100755
--- a/t/cli/test_kubernetes.sh
+++ b/t/cli/test_kubernetes.sh
@@ -45,7 +45,7 @@ if ! grep "env TOKEN_ENV" conf/nginx.conf; then
   exit 1
 fi
 
-if ! grep "lua_shared_dict kubernetes 1m;" conf/nginx.conf; then
+if ! grep "lua_shared_dict kubernetes 64m;" conf/nginx.conf; then
   echo "kubernetes discovery lua_shared_dict inject failed"
   exit 1
 fi
@@ -100,7 +100,7 @@ if ! grep "env PRO_TOKEN" conf/nginx.conf; then
   exit 1
 fi
 
-if ! grep "lua_shared_dict kubernetes-dev 1m;" conf/nginx.conf; then
+if ! grep "lua_shared_dict kubernetes-dev 64m;" conf/nginx.conf; then
   echo "kubernetes discovery lua_shared_dict inject failed"
   exit 1
 fi
diff --git a/t/kubernetes/discovery/kubernetes.t 
b/t/kubernetes/discovery/kubernetes.t
index 503f04135..56e4e6692 100644
--- a/t/kubernetes/discovery/kubernetes.t
+++ b/t/kubernetes/discovery/kubernetes.t
@@ -144,7 +144,7 @@ GET /compare
     "token": "${KUBERNETES_CLIENT_TOKEN}"
   },
   "watch_endpoint_slices": false,
-  "shared_size": "1m",
+  "shared_size": "64m",
   "default_weight": 50
 }
 --- more_headers
@@ -179,7 +179,7 @@ GET /compare
     "token": "${KUBERNETES_CLIENT_TOKEN}"
   },
   "watch_endpoint_slices": false,
-  "shared_size": "1m",
+  "shared_size": "64m",
   "default_weight": 50
 }
 --- more_headers
@@ -251,7 +251,7 @@ GET /compare
     "token": "${KUBERNETES_CLIENT_TOKEN}"
   },
   "watch_endpoint_slices": false,
-  "shared_size": "1m",
+  "shared_size": "64m",
   "default_weight": 33
 }
 --- more_headers
@@ -304,7 +304,7 @@ GET /compare
     },
     "watch_endpoint_slices": false,
     "default_weight": 50,
-    "shared_size": "1m"
+    "shared_size": "64m"
   },
   {
     "id": "release",
@@ -354,7 +354,7 @@ GET /compare
     "token": "${KUBERNETES_CLIENT_TOKEN}"
   },
   "watch_endpoint_slices": true,
-  "shared_size": "1m",
+  "shared_size": "64m",
   "default_weight": 33
 }
 --- more_headers

Reply via email to