This blog discusses how LoxiLB, an open-source, eBPF-based load balancer, addresses challenges in NGAP (NG Application Protocol) Layer 7 load balancing within 5G networks with Free5GC, an open-source implementation of a 5G core network (5GC). Traditional Layer 4 load balancing can lead to issues such as AMF (Access and Mobility Management Function) overload and problematic handovers, especially when gNBs (next-generation Node Bs) serve a large number of UEs (User Equipments). LoxiLB overcomes these challenges by comprehending both NGAP and NAS (Non-Access Stratum) protocols, enabling effective distribution of UEs across stateless AMFs and facilitating seamless handovers. More information about this topic can be found here.
This post provides a step-by-step deployment guide using open-source solutions like Free5GC, LoxiLB, and UERANSIM, all orchestrated in a cloud-native fashion with Kubernetes, to demonstrate this functionality.
LoxiLB is deployed as a load balancer in front of multiple AMFs in a Free5GC deployment to ensure high availability and seamless failover for NGAP connections originating from a gNB (UERANSIM). By proxying NGAP traffic, LoxiLB ensures that if an AMF instance goes down, the gNB's NGAP connection remains intact and continues to function without interruption. Additionally, when a failed AMF instance recovers, LoxiLB replays cached NG Setup requests, etc to restore connectivity automatically.
1. Normal Operation:
2. AMF Failure Handling:
3. AMF Recovery & NGAP Replay:
+-------------------+
| UERANSIM gNB |
| (Simulated gNB) |
+-------------------+
|
NG Setup Req | NGAP Signaling
v
+-------------------+
| LoxiLB |
| (NGAP Proxy/LB) |
+-------------------+
/ | \\
+----------------+ +----------------+ +----------------+
| AMF 1 (UP) | | AMF 2 (DOWN) | | AMF 3 (UP) |
| (Processing) | | (Failure State) | | (Processing) |
+----------------+ +----------------+ +----------------+
|
AMF 2 Recovers |
v
+----------------+
| AMF 2 (UP) |
| (Cache Replay) |
+----------------+
This architecture significantly enhances 5G network reliability by ensuring the NGAP signaling plane remains operational even when individual AMF instances experience failures, making it ideal for production 5G deployments requiring high availability