_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

Load Balancing — L4 vs L7

07. 06. 2025 1 min read intermediate

Load balancing distribuuje provoz pro vyšší dostupnost a výkon.

L4 vs L7

  • L4 — IP + port, rychlý, nezná obsah
  • L7 — HTTP headers, URL, cookies, chytřejší

Algoritmy

  • Round Robin
  • Least Connections
  • IP Hash (sticky)
  • Weighted
  • Random

Exampley

Nginx L4

stream { upstream db { server 10.0.1.1:5432; server 10.0.1.2:5432; } server { listen 5432; proxy_pass db; } }

Nginx L7

upstream api { server 10.0.1.1:3000; server 10.0.1.2:3000; } server { location /api/ { proxy_pass http://api; } }

Tools

  • HAProxy — L4/L7, nejpopulárnější OSS
  • Nginx — L7, L4 přes stream
  • Traefik — cloud-native, auto-discovery
  • Cloud LB — AWS ALB/NLB, Azure, GCP

L4 pro rychlost, L7 pro inteligenci

L4 pro DB/TCP. L7 pro HTTP routing a SSL terminaci.

load balancingl4l7
Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.