antrea icon indicating copy to clipboard operation
antrea copied to clipboard

Support multiple replicas for Flow Aggregator in Proxy mode

Open antoninbas opened this issue 6 months ago • 0 comments

In Proxy mode (https://github.com/antrea-io/antrea/issues/6773), the Flow Aggregator is stateless and can be scaled horizontally. Flow records from different Agents (Flow Exporters) can go to different Flow Aggregators. In theory, even records from the same Agent, and even records from the same connection could go to different Flow Aggregators (low risk of re-ordering given that there is a large enough time interval between records).

Given that the Flow Aggregator is exposed to Flow Exporters via a Service, we can just use K8s load-balancing to spread connections from different Agents over the different Flow Aggregator replicas. Each Flow Exporter uses one long-lived connection to the flow-aggregator Service for all record exports, which will be proxied to one of the replicas by kube-proxy (or AntreaProxy depending on Antrea's configuration).

We should also provide the necessary HPA configuration in the flow-aggregator Helm chart, so that the flow-aggregator Deployment can be scaled automatically based on CPU load.

Finally, the Helm chart should reject configurations with multiple replicas (or HPA) when the Flow Aggregator is used in the default Aggregate mode.

antoninbas avatar Apr 22 '25 01:04 antoninbas