Understanding AWS Public Edge Services: ALB, NLB, GWLB, API Gateway and CloudFront

Tolgahan Demirbaş
bestcloudforme
Published in
5 min readSep 19, 2023

In cloud computing, it is important to manage incoming and outgoing traffic efficiently. AWS offers a set of public edge services that can help you do this. These services can help your applications run faster, more securely, and more reliably.

In this article, we will discuss the different AWS public edge services, their uses, and how to choose the right one for your needs.

AWS Application Load Balancer (ALB)

Application Load Balancer (ALB) is a managed load balancing service that operates at the application layer (Layer 7) of the OSI model. It is designed to distribute incoming application traffic across multiple targets, such as Amazon EC2 instances, containers, and IP addresses, based on criteria like URL path, hostname, and HTTP headers. ALB is a critical component of building highly available and scalable web applications on AWS.

Use case examples:

  1. Elastic Web Applications: ALB is ideal for web applications that need to scale dynamically based on traffic. For example, an e-commerce site experiences increased traffic during holiday sales. ALB ensures that incoming requests are distributed efficiently among the web servers, maintaining responsiveness even during peak periods.
  2. Microservices Architecture: ALB’s path-based routing feature is invaluable for microservices-based applications. Each microservice can have its dedicated path, allowing for easy scaling and management. This is especially useful for companies adopting a container-based architecture.
  3. Multi-Tier Web Applications: ALB can handle complex, multi-tier web applications. Consider a setup with a frontend, application servers, and a database backend. ALB can route requests to different tiers, ensuring optimal resource allocation and fault tolerance.

AWS Network Load Balancer (NLB)

Network Load Balancer (NLB) is a managed load balancing service that operates at the transport layer (Layer 4) of the OSI model. NLB is designed to efficiently distribute network traffic across multiple Amazon EC2 instances, containers, and IP addresses within a Virtual Private Cloud (VPC).

Use case examples:

  1. High-Volume IoT Data Ingestion: In scenarios where a massive number of IoT devices send data to the cloud, NLB shines. For instance, a smart city’s IoT sensors continuously collect data that’s sent to a centralized server. NLB efficiently handles these high-volume, low-latency connections.
  2. Real-Time Gaming: Online gaming requires low-latency connections and the ability to handle thousands of simultaneous players. NLB can route gaming traffic to backend servers with precision, ensuring smooth gameplay experiences.
  3. High-Frequency Financial Trading: In financial industries, where every millisecond counts, NLB can direct trading data from various sources to backend servers. This low-latency handling is critical for high-frequency trading platforms.

AWS Gateway Load Balancer (GWLB)

AWS Gateway Load Balancer (GWLB) is an Elastic Load Balancing (ELB) service that allows you to insert third-party virtual appliances such as firewalls, intrusion detection and prevention systems (IDS/IPS), network observability tools, and others, transparently into the traffic path. GWLB supports both TCP and UDP traffic, and it can be used to load balance traffic across multiple Availability Zones. GWLB uses a distributed hash table (DHT) to distribute traffic across its targets. The DHT is a distributed data structure that stores a mapping of IP addresses to target instances. When a client sends traffic to a GWLB endpoint, GWLB uses the DHT to lookup the target instance for the client’s IP address and routes the traffic to that instance.

Use case examples:

  1. Centralized Firewall Management: Organizations with a dispersed network infrastructure benefit from GWLB’s centralized firewall rule management. All traffic passes through the GWLB, where security policies are enforced consistently across the network.
  2. Multi-Protocol Handling: GWLB is versatile when it comes to protocol support. Consider a scenario where a company needs to route both TCP and UDP traffic while ensuring high availability. GWLB simplifies this complex task.
  3. Hybrid Cloud Deployment: When deploying applications across both on-premises and cloud environments, GWLB helps streamline traffic routing. It acts as a bridge between these two worlds, ensuring seamless communication and security.

Amazon API Gateway

API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. API Gateway acts as a “front door” for applications to access data, business logic, or functionality from your backend services. These backend services can be running on Amazon Elastic Compute Cloud (Amazon EC2), AWS Lambda, any web application, or real-time communication applications.

Use case examples:

  1. Serverless Microservices: For serverless architectures built on AWS Lambda, API Gateway offers a straightforward way to expose these functions as APIs. It enables rapid development of RESTful and WebSocket APIs, making it ideal for serverless microservices.
  2. Partner Integration: Suppose your organization wants to provide external partners access to specific APIs securely. API Gateway’s robust authentication and authorization features make it a suitable choice for enabling partner integration while maintaining security.
  3. IoT Device Communication: Managing communication between IoT devices and the cloud can be challenging. API Gateway simplifies this by acting as an intermediary, allowing devices to securely interact with cloud resources via APIs.

Amazon CloudFront

Amazon CloudFront is a content delivery service offered by Amazon Web Services (AWS). It is designed to deliver content, including web pages, images, videos, and other assets, to end-users with low latency and high data transfer speeds. CloudFront has a global network of edge locations, which are distributed around the world. When a user requests content that is delivered by CloudFront, the request is routed to the edge location that is closest to the user, which reduces latency.

Use case examples:

  1. Global Content Delivery: CloudFront is indispensable for websites serving content globally. Whether it’s web pages, images, or videos, CloudFront caches and serves content from edge locations, reducing latency and improving user experience worldwide.
  2. Static Website Hosting: If you hosting a static website on AWS S3, CloudFront can front-end your S3 bucket, providing HTTPS support, custom domain routing, and distributed content delivery for a static site.
  3. Live Streaming Events: For live streaming events such as webinars or sports broadcasts, CloudFront helps deliver content to viewers with minimal latency. It can distribute live streams to global viewers from the nearest edge location.

Conclusion

We have explored various Amazon Web Services (AWS) tools for cloud computing. These tools help with tasks like managing web traffic, delivering content, controlling APIs, and handling network data.

Remember, the right AWS tool depends on your specific needs. By using these tools wisely, you can make your cloud-based projects work better.

--

--