Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 10. Optimizing flowlogs-pipeline resource consumption in large clusters
Use the shared cache architecture to reduce Kubernetes API server load and resource consumption in large-scale flowlogs-pipeline deployments while maintaining network flow visibility.
10.1. Performance challenges in large-scale deployments Link kopierenLink in die Zwischenablage kopiert!
In large-scale deployments, each flowlogs-pipeline instance independently queries the Kubernetes API server to enrich flows with metadata, resulting in a linear increase in API queries as instances scale.
The flowlogs-pipeline component enriches network flow data with Kubernetes metadata, such as pod names, labels, and namespace information. To retrieve this metadata, each flowlogs-pipeline instance independently queries the Kubernetes API server using informers that watch for resource changes.
10.1.1. API server load at scale Link kopierenLink in die Zwischenablage kopiert!
In the default deployment model, the number of API queries increases linearly with the number of flowlogs-pipeline instances:
-
Each
flowlogs-pipelinepod maintains separate informers for pods, nodes, services, and other Kubernetes resources. - Every informer establishes a watch connection to the API server.
-
Resource updates are sent independently to each
flowlogs-pipelineinstance.
For example, in a cluster with 10 flowlogs-pipeline processor pods, the API server handles 10 times the watch connections and update notifications compared to a single instance. As you scale flowlogs-pipeline horizontally to handle increased network traffic, the API server load multiplies accordingly.
10.1.2. Resource consumption patterns Link kopierenLink in die Zwischenablage kopiert!
This architecture creates several performance challenges:
- Memory footprint
-
Each
flowlogs-pipelineinstance maintains a full in-memory cache of all watched Kubernetes resources. In large clusters with thousands of pods and services, this cache can consume significant memory per instance. - CPU utilization
-
Processing redundant API server updates and maintaining separate caches increases CPU usage across all
flowlogs-pipelinepods. - API server impact
-
The cumulative load from multiple
flowlogs-pipelineinstances can degrade API server performance, potentially affecting other cluster components that depend on the API server for critical operations. - Network bandwidth
-
Duplicate resource updates consume network bandwidth between the API server and
flowlogs-pipelineinstances.
These resource consumption patterns become particularly pronounced in clusters with:
- High pod churn rates where applications frequently scale up and down
- Large numbers of namespaces and services
-
Multiple
flowlogs-pipelineinstances deployed to handle high network traffic volumes
10.3. Reduce API server load in large clusters Link kopierenLink in die Zwischenablage kopiert!
To reduce Kubernetes API server load and optimize resource consumption in large clusters, enable the flowlogs-pipeline shared cache. The shared cache is recommended for clusters with more than 3 flowlogs-pipeline replicas, especially when API server load becomes a performance concern.
Prerequisites
- The Network Observability Operator is installed.
-
Access to the cluster as a user with the
cluster-adminrole.
Procedure
-
In the OpenShift Container Platform web console, navigate to Operators
Installed Operators. -
Select the Network Observability Operator, and then click the
FlowCollectortab. -
Click the
clusterinstance, and then click the YAML tab. In the
spec.processorsection, set theinformerCacheProxyconfiguration to enable the shared cache by using the following example:apiVersion: flows.netobserv.io/v1beta2 kind: FlowCollector metadata: name: cluster spec: processor: informerCacheProxy: enabled: true replicas: 2where:
spec.processor.informerCacheProxy.enabled-
Set to
trueto enable the informer cache proxy. The default value isfalse. spec.processor.informerCacheProxy.replicas-
Specifies the number of replicas. For high availability in production environments, the minimum is
2. The Operator enforces this requirement with leader election to prevent a single point of failure.
- Click Save.
Verification
-
Navigate to Workloads
Pods. -
Ensure that the pods beginning with
flowlogs-pipeline-informersare in the Running state. - Verify that one pod shows as the active leader by checking the pod logs for leader election messages.
-
Confirm that the
flowlogs-pipelinepods remain Running and show decreased CPU and memory use in the Metrics tab.