NLB
계층 4 로드 밸런서. 초고성능·고정 IP·TCP/UDP
이게 뭔가요? / What is this?
NLB는 물리 장비가 아니라, 요청 내용을 들여다보지 않고 IP·포트 정보만으로 초고속으로 트래픽을 나눠주는 가상의 4계층 로드밸런서입니다. 우편물의 봉투를 뜯지 않고 주소만 보고 분류해 던지는 초고속 우편 분류기와 비슷해서, 내용을 해석하는 ALB보다 훨씬 빠르고 고정된 주소(고정 IP)를 가질 수 있습니다.
개요 / Overview
NLB는 TCP·UDP·TLS를 초당 수백만 요청 규모로 처리하며 AZ마다 고정 IP를 제공합니다. HTTP 라우팅 기능은 없지만 지연시간이 가장 낮습니다.
동작 원리 / How it works
NLB는 계층 4에서 동작해 TCP·UDP·TLS 연결을 대상으로 전달합니다. HTTP를 파싱하지 않으므로 오버헤드가 거의 없고 초당 수백만 연결을 처리하며 지연시간이 가장 낮습니다. AZ마다 하나의 고정 IP(원하면 Elastic IP)를 가지므로 방화벽 화이트리스트에 등록할 수 있습니다.
기본적으로 클라이언트 IP를 그대로 보존해 대상에 전달하므로, 애플리케이션이 X-Forwarded-For 없이도 실제 소스 IP를 봅니다. 대신 이 때문에 대상의 보안 그룹은 클라이언트 IP 대역을 허용해야 합니다.
시험은 무엇을 보는가 / What the exam is testing
NLB는 신호가 명확합니다 — 고정 IP, 비-HTTP 프로토콜, 극한의 성능·지연시간. 이 셋 중 하나라도 명시되면 ALB 선택지를 제거합니다.
시험 포인트 / Exam points
"방화벽 화이트리스트에 등록할 고정 IP가 필요하다"가 나오면 ALB가 아니라 NLB입니다. Elastic IP를 AZ별로 붙일 수 있습니다.
MQTT, 게임 서버 UDP, 데이터베이스 프로토콜처럼 HTTP가 아닌 트래픽은 NLB만 처리할 수 있습니다.
NLB는 원본 클라이언트 IP를 그대로 전달하므로 애플리케이션이 X-Forwarded-For 없이도 실제 IP를 봅니다.
ALB·NLB와 목적이 다릅니다. GWLB는 트래픽을 방화벽이나 IDS/IPS 같은 서드파티 가상 어플라이언스로 투명하게 통과시키는 3계층 장비입니다. GENEVE 캡슐화를 쓰고 원본 패킷을 그대로 보존하며, 엔드포인트를 통해 라우팅 테이블에 끼워 넣습니다. "모든 트래픽을 보안 어플라이언스로 검사"가 요구되면 GWLB이고, 애플리케이션 트래픽을 분산하는 문제면 ALB나 NLB입니다.
자주 틀리는 함정 / Common traps
경로 기반 라우팅이나 WAF 연동을 NLB로 하려는 것 — 계층 4라 HTTP를 보지 못합니다.
Network Load Balancer
Layer 4 load balancer for extreme throughput, static IPs, and TCP/UDP
이게 뭔가요? / What is this?
An NLB is not physical hardware — it is a virtual layer-4 load balancer that sorts traffic at extreme speed using only IP and port information, without opening the request. It is like a high-speed mail-sorting machine that never opens an envelope, just reads the address and flings it onward — faster than an ALB, which reads the contents, and capable of holding a fixed address (a static IP).
개요 / Overview
An NLB handles TCP, UDP, and TLS at millions of requests per second and offers a static IP per AZ. It has no HTTP routing but the lowest latency.
동작 원리 / How it works
An NLB operates at layer 4, forwarding TCP, UDP, and TLS connections. Not parsing HTTP means almost no overhead, millions of connections per second, and the lowest latency. It holds one static IP per AZ (optionally an Elastic IP), so it can be whitelisted in a firewall.
By default it preserves the client IP through to the target, so applications see the real source without X-Forwarded-For. The consequence is that target security groups must allow the client IP ranges.
시험은 무엇을 보는가 / What the exam is testing
NLB signals are explicit: static IP, non-HTTP protocol, or extreme performance and latency. Any one of them eliminates the ALB option.
시험 포인트 / Exam points
"A static IP to whitelist in a firewall" means NLB, not ALB. Elastic IPs can be assigned per AZ.
Non-HTTP traffic such as MQTT, game-server UDP, or database protocols can only be balanced by an NLB.
An NLB passes the original client IP through, so applications see the real address without X-Forwarded-For.
It serves a different purpose from ALB and NLB. Gateway Load Balancer transparently steers traffic through third-party virtual appliances such as firewalls and IDS/IPS. It uses GENEVE encapsulation, preserves the original packet, and is inserted into route tables through endpoints. "Inspect all traffic with a security appliance" means GWLB; distributing application traffic means ALB or NLB.
자주 틀리는 함정 / Common traps
Expecting path-based routing or WAF integration from an NLB — at layer 4 it cannot see HTTP.
AWS SAA Hub Pro는 독립 학습 자료이며 Amazon Web Services, Inc.의 공식 서비스가 아닙니다. 시험 정책과 서비스 사양은 AWS 공식 문서를 기준으로 확인하세요.