Preventing One Noisy Pod from Overloading kubernetes_logs Source in Vector #22040
-
Our SetupWe run pods from different services on the same Kubernetes node and use a Vector daemon pod on the node to collect logs using the kubernetes_logs source, apply some transformation, and eventually send to the datadog_logs sink. The ProblemIf one service was buggy and generated a large volume of logs, we observed that the kubernetes_logs source could consume excessive memory, leading to an OOM. We are looking for a way to achieve "fair sharing" or "resource isolation" so that a single misbehaving service does not impact the log collection of other colocated pods. What We Have Tried
Related issues#17123 Limit memory usage for sources - Make vector 'resource aware': If this issue is resolved, it would help prevent our Vector daemon from OOMing. However, in addition to that, we also want to enforce "fair sharing", which remains unsolved by the solutions proposed in that issue. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I think if you set https://vector.dev/docs/reference/configuration/sources/kubernetes_logs/#oldest_first to |
Beta Was this translation helpful? Give feedback.
I think if you set https://vector.dev/docs/reference/configuration/sources/kubernetes_logs/#oldest_first to
false
it will read from the inputs fairly rather than getting pegged reading from the noisy pod. Vector will hold open the files until it reads them all, though, so you may want to also set https://vector.dev/docs/reference/configuration/sources/kubernetes_logs/#rotate_wait_secs to drop the noisy pod log files after rotation.