Skip to content
ML SystemPart 2: InfrastructureChapter 2
Infrastructure CH.02 ~25 min

Infrastructure

DNS, CDNs, Load Balancers, and Reverse Proxies.

DNSCDNLoad BalancerReverse Proxygateway
  • Explain the roles of DNS and CDN in the request flow.
  • Distinguish between Layer 4 and Layer 7 load balancing.
  • Identify security benefits of using a reverse proxy.
  • Design a basic topology using a load balancer for redundancy.

01 DNS and CDN: User Entry Points Viz

Definition

DNS

The internet's phone book that matches domain names with server IP addresses.

Definition

CDN

A collection of servers across various geographic locations to speed up content delivery.

When to Use a CDN?

Use a CDN for all static assets. Some modern CDNs can even help speed up dynamic content through network path optimization.

Latency reduction

Reducing wait time by bringing data closer to the user.

Edge Computing

Running logic or storing data on the server closest to the user (the 'edge').

02 Load Balancer: System Traffic Police

  • **SSL Termination**: The load balancer can handle HTTPS encryption so the servers behind it are not burdened.
  • **Health Checks**: The load balancer automatically stops sending traffic to servers that are currently failing.
  • **Session Persistence**: Ensuring that the same user is always directed to the same server (if necessary).

Deeper InsightWith multiple servers, your system will not go down completely just because one computer fails. Click to collapse

03 Reverse Proxy vs. Load Balancer

Comparison of Load Balancer and Reverse Proxy.
FeatureLoad BalancerReverse Proxy
Main GoalLoad distributionAccess control & Security
ScaleRequires many serversCan be for just 1 server
ExamplesF5, AWS ELBNginx, Apache

Comparison of Load Balancer and Reverse Proxy.

Both are Important

In modern architectures, Nginx is often used as both a reverse proxy and a software-layer load balancer.

Key Takeaways

  1. 1CDNs are the easiest way to reduce global latency.
  2. 2Load balancers are essential for High Availability.
  3. 3Reverse proxies protect internal infrastructure from direct public access.
  4. 4Health checks in load balancers automatically handle failed servers.

CH.02

Chapter Complete

Up next:Data Strategies

Chapter Progress

Reading
Exercise

Interact with the visualization

Quiz

Infrastructure Quiz

Test your understanding of DNS, CDN, Load Balancers, and Reverse Proxies.

Ready to test your knowledge?

5 questionsRandomized from pool70% to pass