supraj.dev
Networking

Layer 4 vs layer 7

Can a load balancer see which page you asked for, or just where the request is going?

28 s loop7 sentencesSilent, read alongScene: Journey
Read the story, sentence by sentence 7 sentences

What you'll be able to say

  1. A layer 4 load balancer, like AWS Network Load Balancer, forwards TCP or UDP traffic by IP address and port, without reading HTTP.
  2. A layer 7 load balancer, like AWS Application Load Balancer, reads the HTTP request’s host, path and headers to choose servers by rules.
  3. The numbers come from the OSI model of networking: layer 4 is transport (TCP, UDP), layer 7 is application (HTTP).