Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apisix/cli/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions apisix/cli/ngx_tpl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"] *};
}

Expand Down Expand Up @@ -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"] *};
Expand Down
2 changes: 1 addition & 1 deletion apisix/cli/ops.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apisix/discovery/consul/schema.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
2 changes: 1 addition & 1 deletion apisix/discovery/kubernetes/schema.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
6 changes: 3 additions & 3 deletions docs/en/latest/discovery/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -402,7 +402,7 @@ Which will yield the following response:
"port": "6443",
"schema": "https"
},
"shared_size": "1m"
"shared_size": "64m"
}
]
}
Expand Down
6 changes: 3 additions & 3 deletions docs/zh/latest/discovery/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -399,7 +399,7 @@ GET /v1/discovery/kubernetes/dump
"port": "6443",
"schema": "https"
},
"shared_size": "1m"
"shared_size": "64m"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions t/cli/test_kubernetes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions t/kubernetes/discovery/kubernetes.t
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -304,7 +304,7 @@ GET /compare
},
"watch_endpoint_slices": false,
"default_weight": 50,
"shared_size": "1m"
"shared_size": "64m"
},
{
"id": "release",
Expand Down Expand Up @@ -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
Expand Down
Loading