Modifying the configuration(create services, routes, upstream etc) can result in a significant increase in the cpu.Is there a way to solve this problem?
One thing would be to use:
KONG_WORKER_CONSISTENCY=eventual
This used to be named differently:
KONG_ROUTER_CONSISTENCY=eventual
(the default is strict). In general I would always run with eventual on production.
Then also raise:
KONG_WORKER_STATE_UPDATE_FREQUENCY=10
(or KONG_ROUTER_UPDATE_FREQUENCY=10)
See:
https://github.com/Kong/kong/blob/next/kong.conf.default#L1127-L1166
Or:
https://github.com/Kong/kong/blob/master/kong.conf.default#L990-L1025
On next branch even the upstreams and targets can now be built eventually.
thank you very much! I tested again today. cpu usage reduced by half ( 26% -> 13% ).
Most helpful comment
One thing would be to use:
KONG_WORKER_CONSISTENCY=eventualThis used to be named differently:
KONG_ROUTER_CONSISTENCY=eventual(the default is
strict). In general I would always run witheventualon production.Then also raise:
KONG_WORKER_STATE_UPDATE_FREQUENCY=10(or
KONG_ROUTER_UPDATE_FREQUENCY=10)See:
https://github.com/Kong/kong/blob/next/kong.conf.default#L1127-L1166
Or:
https://github.com/Kong/kong/blob/master/kong.conf.default#L990-L1025
On
nextbranch even theupstreamsandtargetscan now be builteventually.