changed 8 months ago
Published Linked with GitHub

LoxiLB survey

What is LoxiLB

an open-source, cloud-native load balancer designed specifically for Kubernetes environments. It leverages eBPF technology, a powerful tool that allows for efficient packet processing within the Linux kernel, enhancing network performance and security

Advantages

Dual Layer Load Balancing

Key advantages of LoxiLB is its ability to operate as both an L4 and L7 load balancer.

Client → L7LB → L4LB → Backend servers

L7LB:
- Can route based on URL paths (/api, /images)
- Can route based on HTTP headers
- Can handle content-based routing
L4LB: 
- Routes based on IP address and port
- Doesn't read application data
- Faster than L7 but less feature-rich

then to Backend servers

eBPF Technology

Integration with Kubernetes

TBD


kube-loxilb


NGAP Load Balancing with LoxiLB

NGAP

Part of the NG interface、key signaling protocol in 5G networks used between two main network components:

  • gNB (next-generation NodeB), 5G base station
  • AMF (Access and Mobility Management Function), critical element in the 5G core network.

Key Functions of NGAP:

  • Connection Management: Establishing and releasing connections between the UE and network.
  • Mobility Management: Supporting mobility functions like handover between gNBs, for users moving across different network areas.

NGAP load-balancing problems

L4 load balancing operates at the transport layer, distributing traffic based on IP and port information without understanding the protocol’s inner workings.

  • High Load on Single AMF: When a specific gNB handles a high number of UEs, all associated NAS (Non-Access Stratum) messages route through one AMF, causing performance bottlenecks.
  • Handover Inefficiencies: UEs switching gNBs require handover, which may lead to disconnections if an AMF lacks UE context information. This issue especially impacts stateful AMFs

L4 Load Balancing Limitation

  • L4 Load Balancing: decisions are made based on the packet’s network information, like IP address and port, without visibility into the data content. For NGAP traffic, this means sessions from a gNB are sent to a single AMF based on basic transport-layer rules.

L7 Load Balancing with LoxiLB

Practical Implementation

  • Deploy kube-loxilb
  • Install mongodb
  • Install UERAN simulator
  • Deploy Open5gs Core to EKS using helm

5G SCTP LoadBalancer Using LoxiLB Applying on free5GC

ip address

  1. SCTP VIP that is configured in LoxiLB: 20.20.20.1
    a. acts as a logical endpoint within LoxiLB for incoming traffic.

  2. LoxiLB address: 10.100.200.101
    a. Once the traffic hits the VIP (20.20.20.1), it is internally managed by LoxiLB, which operates at the address 10.100.200.101 (LoxiLB instance)

  3. Depending on the load balancing decision, traffic is then forwarded

    • AMF-1 address: 10.100.200.102
    • AMF-2 address: 10.100.200.103

Config

  ueransim:
    container_name: ueransim
    image: free5gc/ueransim:latest
    command: bash -c "ip route add 20.20.20.1/32 dev eth0 via 10.100.200.101 && \
      sleep infinity"
  • When the UERANSIM container has packets to send to 20.20.20.1, it routes these packets to 10.100.200.101 first. The gateway (LoxiLB) then processes these packets, performing actions such as load balancing, and forwards them to the appropriate destination based on its configuration.
  • Using ./nr-ue -c ./config/uecfg.yaml: This command starts a simulation of a 5G User Equipment (UE).

references

Select a repo