3.2 Azure Application Gateway
📘Microsoft Azure Networking Solutions (AZ-700)
1. What is Azure Application Gateway?
Azure Application Gateway is a Layer 7 (HTTP/HTTPS) load balancer. It is used to manage traffic to web applications, providing features like:
- Load balancing across multiple backend servers (like web servers).
- SSL termination for secure HTTPS traffic.
- Web Application Firewall (WAF) protection against common threats.
- URL-based routing (send different URLs to different backend pools).
Think of it as a “traffic controller” for your web applications in Azure.
2. Why scaling matters
Web applications have varying traffic:
- Sometimes traffic is low (e.g., at night).
- Sometimes traffic is high (e.g., during product launches or events).
Scaling ensures that the Application Gateway can handle all the traffic without overloading or wasting resources.
Azure Application Gateway offers two scaling options:
- Manual Scaling
- Autoscale
3. Manual Scaling
Manual scaling means you define the number of instances yourself.
- Instance: Think of an instance as one copy of Application Gateway running. More instances = can handle more traffic.
- You must monitor traffic and manually increase or decrease instances when needed.
Key points for Manual Scaling
- You choose a fixed number of instances (e.g., 2, 3, or 5).
- If traffic suddenly spikes, performance may degrade because it cannot scale automatically.
- If traffic drops, you might be paying for more instances than needed, which increases cost.
- Useful when:
- You know the traffic pattern is predictable.
- You want full control over instance count.
- You have compliance or security reasons to limit scaling.
Example in IT environment
You have a web application for internal employees that only has traffic during office hours. You set 2 instances manually. Outside office hours, traffic is low, but you still pay for 2 instances.
4. Autoscale
Autoscale lets Azure automatically adjust the number of instances based on traffic.
How it works
- You set a minimum and maximum number of instances (e.g., min 2, max 10).
- Azure monitors traffic:
- If traffic increases, it adds instances (scale out).
- If traffic decreases, it removes instances (scale in).
- Ensures performance is maintained without manual intervention.
Key points for Autoscale
- Reduces manual effort – Azure does scaling automatically.
- Optimizes cost – you pay only for the number of instances actually used.
- Handles unpredictable traffic spikes effectively.
- Recommended for public-facing applications or apps with variable traffic.
Example in IT environment
A company has an e-commerce website. During a sale, traffic can spike unexpectedly. Using autoscale:
- Azure increases instances from 2 to 8 automatically.
- After the sale, instances decrease back to 2, saving costs.
5. Comparison Table – Manual vs Autoscale
| Feature | Manual Scaling | Autoscale |
|---|---|---|
| Control | Full manual control | Automatic based on traffic |
| Traffic spikes handling | Limited (manual adjustment) | Excellent (automatic scaling) |
| Cost efficiency | Low if traffic varies | High (only pay for needed instances) |
| Ideal scenario | Predictable traffic | Variable or unpredictable traffic |
6. Exam Tips
For the AZ-700 exam, remember:
- Manual scaling = set fixed instances; you control it.
- Autoscale = Azure adjusts instances automatically based on traffic.
- Choose manual when traffic is predictable or strict control is needed.
- Choose autoscale for variable traffic to maintain performance and reduce cost.
- Settings to know in autoscale:
- Minimum instance count
- Maximum instance count
Tip: If a question mentions cost optimization or unpredictable traffic, the correct answer is usually Autoscale.
7. Quick IT Scenario to Remember
- Internal HR portal → predictable traffic → Manual scaling.
- E-commerce website → unpredictable traffic → Autoscale.
