The Single Load Balancer (LB) controller enables centralized load balancing for Network Performance Monitoring (NPM) on the OpsRamp NextGen Gateway.
When you enable this feature, the system provides a virtual IP for NPM collector service from the provided address pool and automatically distributes traffic across collector pods. This improves scalability, simplifies configuration, and removes dependency on node-level networking.
Scope and limitations
- The Single LB controller applies only to NPM collector workloads.
- Gateway services continue to run in their existing mode and their service IPs will also be unchanged. They aren’t not affected when the feature is enabled.
Key Capabilities
- Provide a single entry point (virtual IP) for all NPM traffic.
- Enable automatic horizontal scaling of NPM collector pods, defaults to a maximum of 5 pods and can be modified using Helm commands.
- Distribute traffic across pods using a centralized load balancer.
Problem
Without the Single LB controller:
- NPM uses NodePorts (30000–32767). Using default ports requires updating the NodePort range and restarting Kubernetes (K8s/K3s).
- Exporters must send traffic to specific node IPs, which change when pods move.
- A single collector pod handles ~25K flows/sec, with no automatic scaling.
Solution
When you enable the Single LB controller:
- A dedicated load balancer controller pod is deployed.
- A virtual IP (VIP) is assigned to the NPM service.
- All incoming flow traffic is sent to this VIP.
- The controller distributes traffic across NPM collector pods.
- The system automatically scales pods using HPA (horizontal pod autoscaling).
- Traffic uses standard ports (for example, 4739, 6343, 2055, 9996) via the VIP.
Prerequisites
- You are running NextGen Gateway version 21.2.0 or later.
- You have configured MetalLB or an equivalent Kubernetes load balancer on your cluster.
- You use a dedicated gateway for NPM workloads for optimal performance (recommended).
- The NPM service must receive an EXTERNAL-IP from the MetalLB pool.
Deployment scenarios
Case 1: New deployment
- Install the gateway using the collector-start binary.
- Enable Single LB controller in the configuration YAML.
- Install NPM collector → runs in LB mode automatically
Case 2: Existing gateway without NPM
- Upgrade the gateway to version 21.2.0 or later.
- Run Helm upgrade using the following command:
helm upgrade nextgen-gw \
oci://us-central1-docker.pkg.dev/opsramp-registry/gateway-cluster-charts/nextgen-gw \
--set global.useSingleLBController=enable \
--version 21.2.0 \
--reuse-values- Install NPM collector in LB mode.
Case 3: Existing gateway with NPM
Upgrade the gateway to version 21.2.0 or later using the following command:
helm upgrade nextgen-gw \
oci://us-central1-docker.pkg.dev/opsramp-registry/gateway-cluster-charts/nextgen-gw \
--set global.useSingleLBController=enable \
--version 21.2.0 \
--reuse-values- Upgrade NPM collector:
helm upgrade npm-collector \
oci://us-central1-docker.pkg.dev/opsramp-registry/gateway-cluster-charts/npm-collector \
--set useSingleLBController=enable \
--version 3.0.0 \
--reuse-valuesYou must upgrade both gateway and NPM collector.
Case 4: Existing beta users
- No manual changes required.
- Your existing load balancer (LB) configuration is preserved after the upgrade. Previously, Gateway services shared the same IP and operated under the same LB mode. After the upgrade, Gateway services operate independently, and only NPM uses the LB model. Ensure that you verify IP address assignments for Kubernetes services accordingly.
Verify configuration
- Run the following commands to validate setup:
kubectl get svc -n <namespace> | grep LoadBalancer- Verify NPM service shows an EXTERNAL-IP
kubectl get pods -n <namespace> | grep npmkubectl get hpa -n <namespace>kubectl get pods -n kube-system | grep metallbConfirm:
- NPM pods are running
- HPA is active
- MetalLB components are running