Skip to content

Commit

Permalink
fix(clustering): disable privileged agent for inc sync (#13846)
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw authored Nov 11, 2024
1 parent 2cd6c2d commit 08a7730
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions kong/global.lua
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,21 @@ function _GLOBAL.init_worker_events(kong_config)
"negative impact on Kong's response latency and memory usage")
end

local enable_privileged_agent = false
if kong_config.dedicated_config_processing and
kong_config.role == "data_plane" and
not kong.sync -- for incremental sync there is no privileged_agent
then
enable_privileged_agent = true
end

opts = {
unique_timeout = 5, -- life time of unique event data in lrucache
broker_id = 0, -- broker server runs in nginx worker #0
listening = listening, -- unix socket for broker listening
max_queue_len = 1024 * 50, -- max queue len for events buffering
max_payload_len = max_payload_len, -- max payload size in bytes
enable_privileged_agent = kong_config.dedicated_config_processing
and kong_config.role == "data_plane"
or false,
enable_privileged_agent = enable_privileged_agent,
}

worker_events = require "resty.events.compat"
Expand Down

1 comment on commit 08a7730

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong:08a77303e99138c491c4f1d6efbc5adce494d95b
Artifacts available https://github.com/Kong/kong/actions/runs/11774310090

Please sign in to comment.