6. L4 Load Balancer vs MetalLB

Which one to use? It depends on what you need to achieve. MetalLB is highly distributed and provides extreme performance, but it has downsides.

  • If a cluster node is added/removed/failed, you should expect all active connections to your service to be broken (users will see “Connection reset by peer”).
  • Usage of the IP address pool is not ideal: L3 is unaware of TCP/UDP ports, so every service will consume a dedicated IP address.

L4 Load Balancer is stateful, so it handles failovers better, re-uses IP addresses, it’s performance is limited to single NFV node (100Gbps subject to CPU/RAM resources), it’s current high availability is active/standby across NFV nodes per site.

L4 Load BalancerMetalLB
Kubernetes API awareyesyes
Services per IP address65K1
Stateful yesNo 
High AvailabilityActive/StandbyActive/Active
TCP sessions break on each re-balancenoyes
Performance100Gbps Many Tbps+