Firewalls and Load Balancers — Complete Study Notes with MCQs
Exam-focused notes on firewalls and load balancers for SSC, Banking (IBPS/SBI), Railway, UPSC, NIELIT, JAIIB/CAIIB and IT officer papers. Learn types, OSI layers, DMZ, algorithms, L4 vs L7, key differences, and practice with interactive MCQs.
Two Devices, Two Jobs
Do not mix security filtering with traffic distribution
Firewall = Guard
Monitors and filters traffic. Blocks bad/unwanted access between trusted and untrusted networks.
Load Balancer = Traffic Manager
Distributes requests across many servers for speed, scale, and high availability.
1. What is a Firewall?
Barrier between trusted and untrusted networks
A firewall is a security system (hardware, software, or cloud service) that monitors and controls incoming and outgoing network traffic using security rules.
Key points
- Acts as a barrier / guard
- Trusted network (LAN) ↔ Untrusted (Internet)
- Allows or blocks traffic by policy
- Helps stop unauthorized access & many attacks
Exam hot points
- Purpose = security filtering
- Not mainly for server load distribution
- Can be hardware or software
- Works with rules / ACLs / policies
Types of Firewalls
Highest weightage table in this topic
| Type | Layer (exam view) | How it works | Pros | Cons |
|---|---|---|---|---|
| Packet Filtering | Layer 3 (Network) | Filters by IP, port, protocol | Simple, fast | No deep inspection |
| Stateful Inspection | Layer 3/4 | Tracks active connections/sessions | Smarter than basic filter | More resources / a bit slower |
| Proxy / Application Gateway | Layer 7 | Middleman; inspects app data | Deep inspection | Slower |
| Circuit-level Gateway | Session-oriented (exam texts) | Validates connections/sessions | Lower overhead than full proxy | Limited payload inspection |
| NGFW | Multiple layers | Stateful + app control + IPS/threat intel | Advanced protection | Costly / complex |
Hardware firewall
Dedicated physical appliance. Common in medium/large networks and enterprise edges.
Software firewall
Installed on PC/server OS. Good for endpoints and small setups; depends on host resources.
Firewall Techniques & Configurations
Static filtering
Fixed rules set by admin. Predictable and simple.
Dynamic filtering
Rules adapt based on traffic/session behaviour.
DPI
Deep Packet Inspection checks payload content for threats.
Default Deny
Block everything unless allowed. More secure.
Default Allow
Allow everything unless blocked. Less secure.
DMZ
Demilitarized Zone for public servers (web/mail) separated from internal LAN.
2. What is a Load Balancer?
Distributes traffic for performance and availability
A load balancer is hardware or software that distributes incoming client requests across multiple backend servers so no single server becomes a bottleneck.
Why use it?
- High availability (if one server fails, others serve)
- Better performance under load
- Scalability (add more servers)
- Handles traffic spikes (sales, exams result day, etc.)
Exam hot points
- Purpose = distribute traffic
- Not primarily a security filter
- Uses VIP (virtual IP) facing clients
- Works with health checks
Hardware LB
- Dedicated appliance
- Very fast, costly
- Example class: F5 BIG-IP style appliances
Software / Cloud LB
- Runs on servers/cloud
- Flexible and often cheaper
- Examples: HAProxy, Nginx, AWS ELB/ALB/NLB
Load Balancing Algorithms
Match algorithm name → behaviour
| Algorithm | How it works | Best for / note |
|---|---|---|
| Round Robin | Requests go in order: S1 → S2 → S3 → … | Simple; ignores current load |
| Weighted Round Robin | Stronger servers get more requests | Unequal server capacities |
| Least Connections | Send to server with fewest active connections | Better under uneven load |
| Least Response Time | Prefer fastest responding server | Performance-focused |
| IP Hash | Hash client IP → same backend often | Simple session affinity |
Health checks
Probe servers (HTTP/HTTPS/TCP). Unhealthy servers stop receiving traffic.
Sticky sessions
Session persistence — same user stays on same server during a session.
SSL offloading
LB handles TLS encryption/decryption to save backend CPU.
Layer 4 vs Layer 7 Load Balancing
Layer 4 (Transport)
Balances using IP + TCP/UDP port information.
- Fast and efficient
- No deep HTTP content awareness
- Often called network load balancing style
Layer 7 (Application)
Balances using application data (URL, headers, cookies).
- Smarter routing (e.g., /api vs /images)
- More processing overhead
- Common for modern web apps
Firewall vs Load Balancer
Night-before comparison table
| Feature | Firewall | Load Balancer |
|---|---|---|
| Purpose | Security — filter/block | Distribution — share load |
| Focus | Unauthorized access, threats | Performance, availability, scale |
| Typical layers | 3, 4, 7 (depends on type) | 4 and 7 mainly |
| Example action | Block malicious IP / deny port | Send request to healthy server pool |
| Metaphor | Security guard | Traffic manager / queue manager |
Tools (for awareness)
Firewalls
- Cisco ASA, Fortinet FortiGate, Palo Alto
- Host firewalls (OS built-in)
Load balancers
- HAProxy, Nginx, F5 BIG-IP
- Cloud: AWS ELB / ALB / NLB
One-Glance Quick Revision
Firewall
Security barrier · filter traffic
Packet filter
L3 · IP/port/protocol · fast
Stateful
Tracks active sessions
Proxy FW
L7 middleman · deep · slower
NGFW
App awareness + IPS/threat intel
Default Deny
Most secure baseline
DMZ
Public servers zone
DPI
Inspect payload content
Load Balancer
Distribute requests · HA
Round Robin
Sequential servers
Least Connections
Fewest active links
Sticky session
Same user → same server
Health check
Skip unhealthy backends
SSL offload
LB does TLS crypto
L4 LB
IP/port based · fast
L7 LB
URL/header aware · smart
Practice MCQs — Firewalls & Load Balancers
Tap any option to reveal the correct answer and a short explanation.
Exam Tips
Read the verb in the question
Block / filter / deny → Firewall. Distribute / scale / availability → Load Balancer.
Type ladder for firewalls
Packet filter (basic) → Stateful (session-aware) → Proxy (deep) → NGFW (advanced suite).
Algorithm keywords
Sequential = Round Robin. Fewest links = Least Connections. Different power = Weighted. Same server = Sticky/IP Hash.
L4 vs L7 one-liner
L4 sees ports. L7 sees URLs/headers/cookies.
DMZ purpose
Public services outside full internal trust — not “block everything forever”.
Default policy
Default Deny is the secure exam answer unless question says otherwise.
Rank Math SEO Settings (for publishing)
Copy into Rank Math. Hide this box on the live page after setup if you want.
- Focus Keyphrase
- firewalls and load balancers
- Secondary Keywords
- types of firewall, packet filtering firewall, stateful inspection, NGFW, load balancing algorithms, round robin least connections, layer 4 vs layer 7 load balancer, DMZ firewall, firewall vs load balancer MCQ
- SEO Title
- Firewalls and Load Balancers — Types, Algorithms & MCQs | GyanDesk
- Meta Description
- Learn firewalls and load balancers — packet filter, stateful, proxy, NGFW, DMZ, round robin, sticky sessions, L4 vs L7 — with 60 MCQs for competitive exams.
- URL slug
- Keep existing:
basic-concepts-of-firewalls-and-load-balancers - Extra Rank Math tips
-
• Focus keyphrase in first paragraph + one H2
• Internal links to VPNs/proxies, network devices, protocols
• Schema: Article + FAQ (“What is a firewall?”, “Difference between L4 and L7 load balancer?”)
• Breadcrumbs: Home → Information Technology → Firewalls and Load Balancers
Related notes
More free study notes in Information Technology — all part of the GyanDesk study library.
