Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
apiserver: rate-limit logsink receives #7474
Conversation
mjs
approved these changes
Jun 14, 2017
This looks great. Thanks.
How did you decide on the default rate limiting values?
| + LogSink: apiserver.LogSinkConfig{ | ||
| + RateLimitBurst: apiserver.DefaultLogSinkRateLimitBurst, | ||
| + RateLimitRefill: apiserver.DefaultLogSinkRateLimitRefill, | ||
| + }, |
mjs
Jun 14, 2017
Contributor
It might be nicer if LogSink was a pointer. Then if it's nil then the defaults could be used. This might be preferable to having to specify the defaults all over the place.
axw
Jun 15, 2017
Member
I've done that in my other PR that makes the db logging parameters configurable. I'll rebase this once that has landed.
Pretty arbitrarily; 1000 log messages/s per agent seems like quite a lot already to me. I tested this with canonical-kubernetes, and it didn't cause any backing up. I'll put it in the cards to do some scale testing before we release 2.2.1. |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Generating tarball failed |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
axw commentedJun 8, 2017
Description of change
Update the logsink handler so that it will
rate-limit receipt of log messages. Rate-limiting
defaults to a burst of 1000 messages, after
which we allow 1 message per millisecond. This
is configurable by modifying the controller
agent's agent.conf. If we find that users
need to configure it regularly, we can promote
the configuration to controller config.
QA steps
Observe that the logs come in quickly.
LOGSINK_RATELIMIT_REFILL: 1sundervalues.Observe that the log messages come in quickly to begin with (up to 1000 messages), and then they are limited to 1 per second.
Documentation changes
Probably not until we know that people need to tweak the defaults, at which point we can add controller-config.
Bug reference
None.