TAS 4.0.20+ has ability to limit the log rate (bytes/sec) of applications to avoid having a single application overwhelm the logging system in Cloud Foundry.
The general settings or ways to configure logging limits are:
- "Default log rate limit per app" in the TAS tile under App Developer Controls
- CF org/space quotas
- log-rate-limit-per-second app setting
The global default setting is just that, a default. It's the same as setting the per-app log-rate-limit-per-second
on
every single app in the foundation. This is not a way to keep devs from overriding this value. Devs can override
the global default value with a higher or lower log-rate-limit-per-second
value.
NOTE - If you've implemented quotas with log rate limits, it's important this setting isn't too large compared to the quota or you may unintentionally cause
cf push
to fail for entire orgs/spaces.
The log rate quota value behaves just like any other quota value, setting a cap on shared resources within an org/space.
Setting a log rate limit in a quota is not the same as setting a log-rate-limit-per-second
value. The quota value
is the MAX value the log-rate-limit-per-second
can be set to and since the global default is essentially the same
as setting this per app, the quota applies to the global setting as well.
What does that mean? If you set an org log quota of 2048 bytes/sec but you set the global default to 4096 bytes/sec, you'll get a cf push error "organization's log rate limit exceeded: staging requires 4096 bytes per second".
The other thing to note about the quota log rate limit value is that it takes into account all apps within the assigned
org/space when calculating whether you have enough headroom. If you set an org log quota of 2048 bytes/sec and have two
apps with a log-rate-limit-per-second
of 1024 bytes/sec - everything is fine (1024 + 1024 = 2048), at least until you try to push a 3rd
app (1024 + 1024 + 1024 = 3072).
Just remember the quota is not implementing the log rate limit, it's capping the log rate limit settings within the org/space.
This is the value that can be set per app in the application manifest as log-rate-limit-per-second
or via the cf scale
command after the fact. This value by default is unlimited (unset) unless a default global log rate limit has been set. A dev
can override this value to any setting below or even above the default value - the global value is just a default. The
important thing to keep in mind is that cf quotas can limit the max this value can be set to, and needs to fit within
the org/space quota alongside all other apps within the org/space.