
Contents
Introduction
In modern cloud applications, reliable traffic routing and efficient distribution of workloads are essential for performance, scalability, and user experience. When building scalable, secure, and highly available applications on AWS, developers rely heavily on networking fundamentals. On AWS, these goals are achieved through Domain Name System (DNS) services powered by Amazon Route 53 and a variety of load balancer offerings under the Elastic Load Balancing (ELB) family. For developers, understanding how DNS integrates with load balancers, and how to design these systems for availability and performance, is critical to building applications that scale globally while staying resilient to failures.
Articles in this series
Before reading this article, I recommend that you read the previous articles in this series to understand the basics of AWS Networking.
AWS Networking for Developers: Part 1 – Core Components
AWS Networking for Developers: Part 2 – AWS Global Network
AWS Networking for Developers: Part 3 – Advanced Connectivity
AWS Networking for Developers: Part 4 – DNS, Load Balancers and Content Delivery

Domain Name System (DNS)
What is DNS?
The Domain Name System (DNS) acts as the “phone book” of the internet. Instead of remembering complex IP addresses, DNS allows users to access applications using easy-to-remember domain names.
Route 53
Route 53 is AWS’s scalable DNS and domain management service. Developers use it to route end-user traffic to AWS services like ALBs, S3 static websites, and CloudFront distributions. It supports advanced routing policies such as latency-based routing, geolocation, and failover. Understanding how DNS works is vital for developers deploying APIs or apps that need to be reachable globally. Route 53 integrates with load balancers, CloudFront, and health checks to ensure availability and performance.
Amazon Route 53 is a global service. Unlike most other networking components, it isn’t tied to a specific region or AZ. It handles DNS resolution, domain registration, and routing policies globally. That said, it can route traffic based on region, latency, or geolocation using its routing policies.
Key Features of Amazon Route 53
- Domain Registration: Purchase and manage domains directly.
- DNS Routing: Map domain names to AWS resources like EC2, S3, or load balancers.
- Health Checks: Automatically route traffic away from unhealthy endpoints.
- Routing Policies: Simple, weighted, latency-based, failover, and geolocation routing.
Routing Policies
- Simple Routing: Directs traffic to a single resource.
- Weighted Routing: Distributes traffic across multiple resources by weight (e.g., 70% to one server, 30% to another).
- Latency-Based Routing: Directs users to the lowest-latency region.
- Geolocation Routing: Routes traffic based on user location.
- Failover Routing: Ensures high availability by directing traffic away from unhealthy endpoints.
Developer Use Cases
- Direct users to the nearest application endpoint with latency-based routing.
- Build multi-region failover for disaster recovery.
- Manage domain names for microservices hosted on multiple endpoints.
Load Balancers
What is a Load Balancer?
A Load Balancer evenly distributes incoming traffic across multiple servers or application instances, ensuring no single instance is overwhelmed. This helps with scalability, reliability, and fault tolerance.
Load balancers distribute traffic across multiple targets (like EC2, Lambda, or containers) to increase fault tolerance and scalability. Load balancers often live in public subnets and direct traffic to private ones, bridging the outside world with internal services. They also work closely with target groups, security groups, and auto-scaling groups. Developers should understand how to register targets, configure listeners, and apply rules for routing.
Load balancers are regional, but they span multiple Availability Zones within a region. When you configure a load balancer, you specify which AZs it should operate in. The load balancer then automatically distributes traffic across those AZs for high availability.
AWS offers several load balancing options:
Application Load Balancer (ALB)
An Application Load Balancer (ALB) is a Layer 7 load balancer provided by AWS as part of the Elastic Load Balancing (ELB) service. It is designed to distribute incoming HTTP and HTTPS traffic across multiple targets, such as EC2 instances, containers (ECS), Lambda functions, or IP addresses, based on application-level information like request paths, headers, and query strings.
Key Features of ALB:
- Path-based Routing: Directs traffic to different services based on URL paths (e.g.,
/api/*
vs/images/*
). - Host-based Routing: Routes requests based on the domain name (e.g.,
api.example.com
vswww.example.com
). - Native support for containers: Works seamlessly with ECS (especially with dynamic port mapping).
- HTTP/2 and WebSocket support: Enables modern web communication protocols.
- SSL Termination: Offloads SSL/TLS processing to the ALB to reduce the burden on backend services.
- Sticky Sessions: Maintains session affinity for stateful applications.
Network Load Balancer (NLB)
A Network Load Balancer (NLB) is a Layer 4 load balancer in the AWS Elastic Load Balancing (ELB) family, designed to handle high-performance, low-latency TCP, UDP, and TLS traffic at scale. It operates at the transport layer (OSI Layer 4), routing traffic based on IP address and port rather than application-level information.
Key Features of NLB:
- Preserve Source IP: Unlike ALB, NLB preserves the original client IP, which is essential for applications that require IP-based filtering or logging.
- Ultra-Low Latency: Ideal for applications requiring high-speed packet processing, such as gaming, IoT, or real-time communications.
- Millions of Requests per Second: Designed to handle sudden and volatile traffic patterns at scale.
- Static IP Support: Each NLB can be assigned Elastic IPs per Availability Zone, or use a single DNS name backed by static IPs.
- TLS Termination: Supports TLS offloading at the load balancer to enhance security and reduce backend CPU load.
- Zonal Isolation: Preserves traffic within the same Availability Zone when possible for improved reliability and performance.
Gateway Load Balancer
A Gateway Load Balancer (GWLB) is a specialized type of AWS load balancer that operates at Layer 3 (Network Layer) and is designed to simplify the deployment and scaling of third-party virtual appliances, such as firewalls, intrusion detection/prevention systems (IDS/IPS), deep packet inspection (DPI) tools, and traffic analyzers.
While GWLB is often used by network and security engineers, developers building secure, enterprise-scale cloud applications should understand how it fits into the architecture. If your application traffic must pass through a security stack or be inspected (e.g., for compliance, logging, or policy enforcement), GWLB can be a vital part of the network path. It allows third-party or custom appliances to operate without being tightly coupled to the app code or underlying infrastructure.
Developer Use Cases
- Scale web applications using ALB with path-based routing.
- Handle real-time gaming or IoT traffic with NLB for low latency.
- Deploy centralized network security with GWLB.
Content Delivery Networks (CDN)
What is CDN?
A Content Delivery Network (CDN) is a globally distributed network of servers that work together to deliver web content such as images, videos, scripts, and static files, to users quickly and efficiently. Instead of serving content from a single origin server, a CDN caches copies of content at multiple edge locations around the world, reducing latency by delivering data from the server closest to the user. This not only improves website speed and user experience but also reduces the load on the origin server, enhances availability, and provides resilience against traffic spikes or Distributed Denial of Service (DDoS) attacks.
What is CloudFront?
Amazon CloudFront is AWS’s Content Delivery Network (CDN) that caches and delivers content (static, dynamic, streaming, and APIs) through a network of Edge Locations worldwide.
Key Features
- Global Content Distribution: Reduce latency by serving content from the nearest edge location.
- Security Integration: Built-in DDoS protection with AWS Shield and encryption with AWS Certificate Manager (ACM).
- Customizable Caching: Define caching policies for static assets, dynamic APIs, or video streaming.
- Integration with Route 53 & ELB: Frontend for applications and services running behind ALB/NLB.
Developer Use Cases
- Speed up delivery of static assets like CSS, JS, and images.
- Deliver video streaming at scale with minimal buffering.
- Optimize API performance by caching responses at the edge.
- Protect applications from malicious traffic with AWS Shield + CloudFront.
How They Work Together: Route 53, ELB, and CloudFront
- Route 53 resolves the DNS name of your application to either a Load Balancer or a CloudFront distribution.
- Elastic Load Balancer distributes traffic among multiple backend instances across AZs for availability and scalability.
- CloudFront caches static and dynamic content at edge locations, reducing latency for global users.
Conclusion
DNS, Load Balancers, and CloudFront are essential building blocks for building highly available, resilient, and performant applications on AWS. Together, they ensure that traffic is routed correctly, workloads scale seamlessly, and users experience fast, secure content delivery, whether they’re across the street or across the globe. For developers, mastering these services means delivering scalable, fault-tolerant, and user-friendly applications on AWS.
[…] AWS Networking for Developers: Part 4 – DNS, Load Balancers and Content Delivery […]
[…] AWS Networking for Developers: Part 4 – DNS, Load Balancers and Content Delivery […]