Skip to content

14.4 Load Balancing & Scaling Strategy ​

1. Load Balancing Algorithms & Layer 4 vs Layer 7 ​

DimensionLayer 4 (Network Load Balancer)Layer 7 (Application Load Balancer - Chosen)
OSI LayerTransport (TCP/UDP)Application (HTTP/HTTPS)
Routing CapabilityIP and Port onlyPath-based (/api/v1/*), header-based (X-Tenant-ID)
TLS TerminationPass-through or TCP-levelNative SSL/TLS offloading
ThroughputExtreme (Millions req/s)High (Tens of thousands req/s)
  • Why Layer 7: OmniPost routes administrative console traffic and API traffic to specific target groups while terminating TLS certificates at the edge.

2. Say It Out Loud ​

"We employ a Layer 7 Application Load Balancer using a round-robin algorithm with least-outstanding-requests routing. Because our FastAPI nodes are completely stateless, any incoming request can be served by any node without sticky sessions. SSL termination occurs at the load balancer, offloading expensive cryptographic handshakes from application instances."