SaveMyCert
Log in
5 of 5 free questions left today·for unlimited practice
Design High-Performing Architectures

Scalable Networks: CloudFront vs Global Accelerator, Transit Gateway, ALB vs NLB

19 min readSAA-C03 · Design High-Performing ArchitecturesUpdated

Task 3.4 covers making the network fast and making it scale: choosing between CloudFront and Global Accelerator at the edge, picking the right load balancer — ALB, NLB, or Gateway Load Balancer — for the traffic type, sizing CIDR ranges and subnet tiers so the design survives growth, placing EC2 instances with cluster, spread, or partition placement groups, and connecting VPCs at scale with peering, Transit Gateway, or PrivateLink — plus the hybrid links, Direct Connect and Site-to-Site VPN, viewed through a performance lens. It sits in Design High-Performing Architectures, worth 24% of SAA-C03, and its questions are selection problems: several connectivity or edge options genuinely work, and a constraint — non-HTTP protocol, static IP requirement, hundreds of VPCs, transitive routing — makes exactly one of them right. By the end of this lesson you will be able to read those constraints and land on the correct edge service, load balancer, placement group, and connectivity pattern without second-guessing.

What you’ll learn
  • Choose between CloudFront and Global Accelerator from the protocol, caching, and failover requirements
  • Select ALB, NLB, or Gateway Load Balancer by matching the workload's protocol, latency, and routing needs
  • Design CIDR ranges and subnet tiers that scale, avoid overlap, and survive multi-AZ growth
  • Pick cluster, spread, or partition placement groups for HPC, critical instances, and distributed systems
  • Choose VPC peering, Transit Gateway, or PrivateLink for connectivity at scale — and spot the non-transitive peering trap
  • Select Direct Connect or Site-to-Site VPN for hybrid links and use latency-based routing for global performance

Edge performance: CloudFront vs Global Accelerator

Both services put user traffic onto AWS's global edge network close to the user and carry it to your origin over the AWS backbone instead of the public internet — and because both promise "better global performance," SAA-C03 makes you tell them apart constantly. The separation is what each actually does with the traffic.

Amazon CloudFront is a content delivery network: it caches content at edge locations. Static assets — images, video, downloads, JavaScript bundles — are served from the edge without touching the origin at all, which is both the latency win and an origin-offload win. CloudFront also accelerates dynamic, non-cacheable content by terminating connections at the edge and reusing optimized connections to the origin, so "CloudFront is only for static content" is a distractor claim. CloudFront speaks HTTP and HTTPS; its origins can be S3 buckets, load balancers, or any HTTP server.

AWS Global Accelerator does not cache anything. It gives you two static anycast IP addresses announced from every edge location: users connect to the nearest edge, and the accelerator routes the connection over the AWS backbone to the optimal healthy endpoint — an ALB, NLB, or EC2 instance in one or more Regions. Because it works at the connection layer, it carries TCP and UDP, including protocols that are not HTTP at all — game servers, VoIP, MQTT, custom TCP. Health checks make cross-Region failover near-instant, without waiting for DNS caches to expire.

The decision rule: cacheable or HTTP-based content → CloudFront; non-HTTP protocols, static IP requirements, or deterministic fast regional failover → Global Accelerator. "UDP," "gaming," "VoIP," "fixed IP addresses for firewall allowlisting," and "fail over between Regions in seconds" are Global Accelerator phrases; "reduce load on the origin," "serve images and video globally," and "cache at the edge" are CloudFront phrases.

The exam tests this as a straight selection, usually seasoning the stem with one disqualifying detail — a UDP port, or an enterprise customer who must allowlist fixed IPs — that eliminates CloudFront even when the workload otherwise sounds web-shaped.

Load balancer selection: ALB vs NLB vs Gateway Load Balancer

Elastic Load Balancing questions are protocol questions in disguise: identify what the traffic is, and the load balancer picks itself.

The Application Load Balancer (ALB) operates at layer 7 and understands HTTP. That awareness is its entire value: it routes by path (/api/* to one target group, /images/* to another), by host header (multiple domains on one load balancer), and by other request attributes; it supports WebSockets, HTTP/2, and Lambda functions as targets. When a scenario describes microservices behind one entry point, content-based routing, or serverless HTTP backends, the ALB is the answer. Its trade-off: it terminates and inspects HTTP, so it is not built for raw-socket workloads.

The Network Load Balancer (NLB) operates at layer 4 and forwards TCP and UDP connections with ultra-low latency at extreme scale — millions of requests per second. It is the answer when the stem says any of: non-HTTP protocol, "millions of connections," "lowest possible latency," "static IP address per Availability Zone" or "attach an Elastic IP" (the ALB cannot do either), or "preserve the client source IP" at the connection level. NLB also supports TLS passthrough — forwarding encrypted traffic untouched so targets terminate TLS — which matters when compliance requires end-to-end encryption without the load balancer decrypting.

The Gateway Load Balancer (GWLB) is the specialist: it sits inline in the traffic path and distributes flows across a fleet of third-party virtual appliances — firewalls, intrusion detection and prevention systems, deep packet inspection — scaling and health-checking the appliance fleet for you. The trigger phrase is unambiguous: "inspect traffic with third-party security appliances" means GWLB, full stop.

One shared concept is worth recognizing: cross-zone load balancing, which lets a load balancer node in one Availability Zone send traffic to targets in every AZ rather than only its own. The ALB has it always on; the NLB has it off by default, and enabling it evens out traffic across unevenly sized target groups at the price of cross-AZ data transfer. A stem describing targets in one AZ receiving disproportionate traffic behind an NLB is pointing here.

The exam's favorite discriminators are the NLB-only features. A question that seems ALB-shaped until it mentions a fixed IP for customer firewall rules, a UDP workload, or single-digit-millisecond latency requirements has just switched its answer to NLB. Read the protocol and the IP requirement before admiring the routing features.

Design the address space to scale: CIDR, subnet tiers, and IP exhaustion

Network architectures fail to scale for a mundane reason: the address plan was too small or overlapped with something it later had to connect to. Task 3.4 tests this at design-review depth.

A VPC's CIDR block can range from /16 (65,536 addresses) down to /28. The scaling rule is to size for the future, not the present: address space is free, and re-addressing a live VPC is painful, so a /16 for a VPC that "only needs a few hundred addresses today" is prudent, not wasteful. Just as important, CIDR ranges must be non-overlapping across every VPC and on-premises network you might ever connect — VPC peering and hybrid routing cannot function between overlapping ranges, because a route can only point one way for a given prefix. An organization that gives every VPC 10.0.0.0/16 by default has built a fleet of networks that can never be peered; carving a company-wide IP plan (distinct ranges per VPC, per environment, per site) is the design answer.

Inside the VPC, subnets form tiers repeated across Availability Zones: public subnets for load balancers and NAT gateways, private subnets for application instances, isolated subnets for databases — one of each per AZ, so every tier survives an AZ failure. Subnets cannot be resized after creation, and AWS reserves five addresses in each, so tier sizing follows growth too: the application tier that will run large Auto Scaling groups gets the big subnets, and remember that every ENI consumes an IP — container platforms and Lambda-in-VPC configurations consume addresses far faster than an instance count suggests.

When a VPC does run out of addresses, recognize the escape valve: you can associate secondary CIDR blocks with an existing VPC and add subnets from the new range.

The exam tests this as cause-and-effect: a peering or VPN option that silently fails because ranges overlap, or a "cannot launch instances" symptom traced to subnet exhaustion. When two connectivity options differ only in that one requires re-addressing, the stem's CIDR details are the answer key.

Placement groups and enhanced networking: performance inside the data center

Placement groups control where EC2 places instances relative to each other, trading latency against blast radius. There are exactly three strategies, and the exam maps each to a workload by keyword.

StrategyPlacementOptimizes forExam trigger
ClusterInstances packed close together in a single Availability ZoneLowest network latency and highest per-flow throughput between instancesHPC, tightly coupled compute, "node-to-node latency," "highest network throughput"
SpreadEach instance on distinct underlying hardware; limited to seven instances per AZ per groupIsolating a small number of critical instances from correlated hardware failure"Critical instances must not fail together," small count, maximum separation
PartitionInstances grouped into partitions (up to seven per AZ); partitions do not share hardwareLarge distributed systems that need failure isolation between replica groupsHadoop, HDFS, Kafka, Cassandra, "hundreds of instances," rack-style isolation

The trade-offs are the testable nuance. A cluster group buys latency by giving up resilience — everything sits in one AZ, close together, so an AZ or capacity event takes the whole workload; it can also hit insufficient-capacity errors, and launching all instances together (and using a single instance type) reduces that risk. A spread group is the opposite bet — maximum isolation, but capped at seven instances per AZ, so it cannot host a big fleet; that seven-instance limit is how the exam eliminates it in favor of partition groups for large distributed systems, which get failure isolation at scale by accepting isolation between partitions rather than between every instance.

Alongside placement, recognize enhanced networking: the Elastic Network Adapter (ENA) gives supported instance types higher packet-per-second throughput and lower, more consistent latency, and is the standard companion to a cluster placement group for HPC. The Elastic Fabric Adapter (EFA) goes further for tightly coupled HPC and machine-learning workloads using MPI-style communication — recognition level only.

Exam questions here are near-lookups: match the workload word (HPC, Kafka, "critical") to the strategy, then check the distractors against the seven-instance spread limit and the single-AZ cluster constraint.

Global routing and resource placement: latency-based routing and the AZ trade-off

Two placement decisions finish the task statement: where users enter your architecture globally, and where resources sit relative to each other locally.

Globally, when an application runs full stacks in multiple Regions, Amazon Route 53 latency-based routing answers DNS queries with the Region that offers the lowest measured latency for that user — a US user resolves to us-east-1, a Singapore user to ap-southeast-1. It pairs with health checks so an unhealthy Region drops out of answers. Keep its lane distinct from its neighbors: latency-based routing sends users to the fastest Region; geolocation routing sends users from a specific location to a chosen endpoint (compliance and content-licensing scenarios, not performance); and Global Accelerator achieves a similar user-to-nearest-entry outcome at the network layer with static IPs and faster failover, without depending on DNS TTLs. A stem that says "route each user to the Region with the lowest latency" and offers DNS-based options wants latency-based routing; one that adds "static IPs" or "instant failover" has moved to Global Accelerator.

Locally, resource placement is a latency-versus-resilience trade. Traffic between resources in the same Availability Zone is the fastest and — at the concept level the exam tests — avoids the cross-AZ data transfer charges that inter-AZ traffic incurs. Chatty components, such as an application tier hammering a cache or a data-processing pipeline shuffling between nodes, benefit from same-AZ locality. But concentrating a workload in one AZ concedes availability, which is why the standard multi-tier design spreads every tier across at least two AZs and accepts the cross-AZ chatter as the price of surviving zone failure. The exam probes whether you can articulate the trade: a cost-review question may flag heavy cross-AZ transfer between an application and its cache (co-locate, or cache per AZ), while an availability question punishes the single-AZ design that a pure performance argument produced. State the business priority first; the placement follows.

The connectivity decision table

Most Task 3.4 connectivity questions reduce to reading one constraint out of the stem and looking up the row. Internalize this table and the peering-mesh math, and the section becomes fast points.

Scenario constraintAnswerWhy the alternatives lose
Two or three VPCs need full private connectivity; relationships are stableVPC peeringA Transit Gateway works but adds a hub, hourly cost, and data-processing charges for a problem two route-table entries solve
Dozens to hundreds of VPCs must all communicate; "simplify management"Transit GatewayPeering needs a full mesh (N×(N−1)/2 connections) and per-pair routes; it is non-transitive, so no hub shortcut exists
VPCs and on-premises (VPN and/or Direct Connect) must all interconnectTransit GatewayIt is the one hub that terminates VPC, VPN, and Direct Connect attachments with transitive routing between them
Expose one service/API to many consumer VPCs; no network merge; CIDRs may overlapPrivateLink (NLB-fronted endpoint service)Peering and TGW connect whole networks — over-broad access, and both break on overlapping CIDRs
Hybrid link needed in days, low cost, encrypted over the internetSite-to-Site VPNDirect Connect takes weeks to provision and costs more; internet variability is accepted
Consistent latency/bandwidth for large, steady hybrid transferDirect ConnectVPN rides the public internet — variable latency, ~1.25 Gbps per tunnel ceiling
Hybrid link must survive circuit failureDirect Connect + VPN failover (or a second DX)Any single link is a single point of failure
Traffic between two specific VPCs must have lowest latency / no intermediate hopVPC peeringPeering is a direct path; a Transit Gateway inserts a hub hop and processing

Two cross-cutting facts to carry into any of these rows: peering is never transitive — no answer that routes A→B→C over peering connections is ever correct — and overlapping CIDRs disqualify both peering and Transit Gateway, leaving PrivateLink (or re-addressing) as the path. The exam tests the table with stems that satisfy two rows at once and a qualifier — LEAST operational overhead favors the hub; lowest cost between exactly two VPCs favors peering — so read the scale words and the qualifier together before choosing.

Worked scenarios: reasoning through Task 3.4 questions

Scenario 1. A company runs a shared-services VPC (directory, logging, CI/CD) peered to twelve application VPCs. Application teams now need their VPCs to reach each other for service-to-service calls, and traffic from every VPC must also reach on-premises systems over an existing Direct Connect link. Engineers propose adding routes so application VPCs can reach each other "through" the shared-services VPC. What should the architect do?

Reasoning: The proposal fails on the fundamental rule: VPC peering is not transitive. No route table entry can make traffic from VPC A flow through the shared-services VPC to VPC B — the peering connection will not forward it. Making the mesh work with peering alone means adding a connection per VPC pair — twelve application VPCs plus shared services is dozens of connections, each with route-table maintenance — and peering still cannot carry the VPCs' traffic to Direct Connect. The answer is AWS Transit Gateway: attach all thirteen VPCs and associate the Direct Connect gateway, and every attachment reaches every other through the hub, with transit gateway route tables available to restrict any pairs that should not communicate. One hub replaces the mesh and solves the hybrid requirement in the same move.

Scenario 2. A multiplayer game studio hosts session servers behind Network Load Balancers in two Regions. The game client speaks a custom protocol over UDP. Players worldwide report inconsistent latency, and enterprise partners must allowlist fixed IP addresses in their firewalls. CloudFront or Global Accelerator?

Reasoning: Two facts each independently eliminate CloudFront: it serves HTTP/HTTPS only, and this workload is custom UDP; and it offers no fixed IP pair to allowlist. Global Accelerator matches every requirement: it carries TCP and UDP, provides two static anycast IPs that never change (satisfying the firewall allowlists), moves player traffic onto the AWS backbone at the nearest edge for consistent latency, and its health-check-driven routing fails over between the two Regions in seconds. Note the general lesson: "global users + performance" alone does not decide this pair — the protocol and the static-IP requirement do.

Scenario 3. A financial analytics firm runs a tightly coupled HPC simulation on 40 EC2 instances that exchange data constantly. Runs are taking too long, and metrics show node-to-node network latency dominates. What placement change helps most?

Reasoning: "Tightly coupled" plus "node-to-node latency" is the cluster placement group signature: pack the instances close together in one AZ for the lowest latency and highest throughput between them, on ENA-enabled (ideally EFA-equipped) instance types. A spread group is the opposite of what is asked — and cannot hold 40 instances per AZ anyway; a partition group targets failure isolation for distributed data systems, not latency. The accepted trade-off is resilience: the whole job sits in one AZ, acceptable for restartable batch simulations. Launch the full fleet at once with one instance type to reduce insufficient-capacity risk.

Tip. SAA-C03 tests this task as constrained selection: several networking options genuinely work, and one stem detail — a UDP protocol, a static-IP allowlist, a hundred-VPC estate, an overlapping CIDR — makes exactly one correct. Classic shapes include CloudFront vs Global Accelerator (protocol and static IPs decide, not "global users"), ALB vs NLB (fixed IP, UDP, extreme throughput, or source-IP preservation flips it to NLB; inline security appliances mean GWLB), the non-transitive peering trap (traffic routed "through" a hub VPC over peering never flows — the fix is Transit Gateway), peering vs Transit Gateway vs PrivateLink by scale and scope (pairs → peering; many-to-many plus hybrid → TGW; one service to many consumers or overlapping CIDRs → PrivateLink), Direct Connect vs VPN by the words "consistent" and "predictable" versus "quickly" and "cost-effective," and placement groups by workload keyword (HPC → cluster; critical few → spread; Kafka/Hadoop → partition, remembering spread's seven-per-AZ cap). Expect qualifiers to arbitrate between two working rows of the decision table, and expect distractors that ignore a hard limit — transitive peering, an ALB with an Elastic IP, a spread group holding forty instances — which one memorized fact eliminates.

Key takeaways
  • CloudFront caches and accelerates HTTP content; Global Accelerator provides two static anycast IPs for TCP/UDP with near-instant cross-Region failover — protocol and static-IP requirements decide between them.
  • ALB for HTTP routing (path/host rules, Lambda targets); NLB for TCP/UDP at extreme scale, ultra-low latency, static IP/EIP, and source-IP preservation; GWLB for inline third-party security appliances.
  • Size VPC CIDRs for future growth and keep every range non-overlapping — overlap permanently blocks peering and hybrid routing; secondary CIDRs relieve IP exhaustion.
  • Placement groups: cluster = lowest latency, one AZ (HPC); spread = max seven instances per AZ on distinct hardware (critical few); partition = failure-isolated groups for large distributed systems (Kafka, Hadoop).
  • VPC peering is never transitive — hub-and-spoke or many-VPC connectivity means Transit Gateway; a few stable VPC pairs stay on peering.
  • PrivateLink exposes one NLB-fronted service to many consumer VPCs without merging networks — and it tolerates overlapping CIDRs, which peering and TGW cannot.
  • Direct Connect buys consistent latency and bandwidth for steady heavy transfer (weeks to provision, not encrypted by default); Site-to-Site VPN is fast, cheap, encrypted, internet-variable — and the standard DX failover.
  • Route 53 latency-based routing sends each user to the fastest Region; same-AZ placement minimizes latency and cross-AZ data charges, but multi-AZ spread wins whenever availability is the stated priority.

Frequently asked questions

What is the difference between CloudFront and Global Accelerator?

CloudFront is a content delivery network: it caches content at edge locations and accelerates HTTP/HTTPS traffic, serving static assets from the edge and speeding dynamic requests over optimized connections to the origin. Global Accelerator caches nothing: it gives you two static anycast IP addresses and routes TCP or UDP connections from the nearest edge over the AWS backbone to the optimal healthy endpoint, with health-check-driven failover between Regions in seconds. Choose CloudFront for cacheable or HTTP-based content; choose Global Accelerator for non-HTTP protocols (gaming, VoIP, custom TCP/UDP), fixed IPs for firewall allowlisting, or deterministic fast regional failover.

When should I use Transit Gateway instead of VPC peering?

Use VPC peering for a small number of VPCs — roughly two or three — with simple, stable connectivity needs: it is a direct, low-cost, no-hop path. Switch to Transit Gateway when VPC count grows, when every VPC must reach every other (peering would need a full mesh of N×(N−1)/2 connections because it is not transitive), or when on-premises connectivity over VPN or Direct Connect must be shared across many VPCs. Transit Gateway is a regional hub with transitive routing: one attachment per VPC, centralized route tables, and optional segmentation between attachment groups. The qualifier usually decides: LEAST operational overhead at scale means Transit Gateway.

Is VPC peering transitive?

No — and this is one of the most tested networking facts on SAA-C03. If VPC A peers with VPC B, and VPC B peers with VPC C, VPC A cannot reach VPC C through B under any route-table configuration; peering connections simply do not forward traffic that neither originates nor terminates in one of the two peered VPCs. Any answer option that routes traffic "through" an intermediate VPC over peering is wrong. When transitive, hub-and-spoke routing is the requirement — spokes reaching each other, or many VPCs sharing one path to on-premises — the answer is AWS Transit Gateway.

What is AWS PrivateLink used for?

PrivateLink privately exposes a single service — an application or API fronted by a Network Load Balancer — to consumers in other VPCs or accounts without connecting the networks. Consumers create an interface endpoint (an ENI with a private IP) in their own VPC and reach only that service; no routes are exchanged, nothing else becomes reachable in either direction, and overlapping CIDR ranges do not matter. It is the pattern for SaaS providers serving hundreds of customer VPCs and for sharing an internal service across an organization with least-privilege network exposure. If both sides need general network-to-network reachability instead, that is peering or Transit Gateway.

When should I choose an NLB over an ALB?

Choose a Network Load Balancer when the workload needs anything an Application Load Balancer cannot provide: non-HTTP protocols (raw TCP or UDP), millions of requests per second with ultra-low latency, a static IP address per Availability Zone or an attached Elastic IP for customer firewall allowlisting, connection-level source-IP preservation, or TLS passthrough so targets terminate encryption end to end. Choose the ALB when the traffic is HTTP and you want layer-7 features: path- and host-based routing, multiple services behind one entry point, WebSockets, and Lambda targets. On the exam, a fixed-IP or UDP requirement flips an otherwise ALB-shaped question to the NLB.

What are the three EC2 placement group types?

Cluster placement groups pack instances physically close together inside a single Availability Zone for the lowest network latency and highest inter-instance throughput — the choice for HPC and tightly coupled workloads, at the cost of concentrating failure risk in one AZ. Spread placement groups put each instance on distinct underlying hardware, with a hard limit of seven instances per AZ per group — the choice for a small set of critical instances that must not fail together. Partition placement groups divide instances into partitions (up to seven per AZ) that do not share hardware — the choice for large distributed systems like Hadoop, Kafka, or Cassandra that need rack-style failure isolation at scale.

Should I use Direct Connect or a Site-to-Site VPN?

Use Site-to-Site VPN when you need connectivity quickly and cheaply, when traffic must be encrypted over the internet, or as a backup path: it stands up in hours but inherits the internet's variable latency, with roughly 1.25 Gbps per tunnel. Use Direct Connect when the requirement is consistent latency and predictable bandwidth — large steady data transfers, latency-sensitive hybrid applications — accepting weeks of provisioning lead time and higher cost. Direct Connect is private but not encrypted by default; pair it with a VPN over the link or MACsec if encryption is required. The resilient enterprise pattern is Direct Connect primary with a VPN failover.

Test yourself on this topic
Practice questions with full explanations.
Practice now

Sign up free to mark lessons complete, bookmark topics and track your exam readiness.