Technology

Cloudflare and Route 53 DNS Traffic Routing

Geo routing, weighted routing and split-horizon DNS address different parts of a distributed application. A geographic policy maps location signals to targets, weights influence selection, and split-horizon provides different DNS views. None creates application capacity or access control by itself. With Cloudflare and Route 53, the first question is where the decision happens: in a DNS answer or while processing a proxied HTTP request.

This guide compares Amazon Route 53 policies with Cloudflare Load Balancing, including its DNS-only and proxied modes. It covers geographic mapping, staged deployments, private resolution, health checks and verification. Cloudflare’s public DNS service alone does not enable all Load Balancing features; confirm the product, traffic-steering entitlement and supported policy before designing the routing flow. Treat provider names as different implementations, not interchangeable settings.

Where the Routing Decision Happens

Route 53 and DNS-only load balancers select an address response when an authoritative DNS query arrives. Recursive resolvers may reuse that response for many clients until its TTL expires. Proxied Cloudflare Load Balancing instead receives HTTP/HTTPS traffic at its edge and selects an endpoint at that layer. DNS still provides the Cloudflare address, but the origin-selection decision is not simply a new weighted DNS answer for each visitor.

For DNS-only geographic selection, location may be inferred from a supported EDNS Client Subnet hint or from the recursive resolver. Cloudflare documents this in terms of the data center associated with the ECS source or resolver. In proxied mode, it uses the data center associated with the user’s request instead. These are imperfect signals: a VPN, mobile network or remote corporate resolver can change the visible path. A location mapping is not a measured latency guarantee.

TTL determines how long a DNS response can remain cached; lowering it does not alter entries already cached under the older value. When a DNS change is planned, lower an editable TTL in advance and allow the old lifetime to expire. Proxied Cloudflare records have provider-controlled DNS TTL behavior, and that TTL is not an origin-selection timer. Choose operational values for the actual mode rather than applying one short-TTL recipe to every kind of load balancing.

Geo Routing: Location Mapping and Its Limits

Route 53 geolocation maps query-location estimates to configured continent, country or supported subregion records. Geoproximity uses resource locations and bias to adjust geographic catchments; latency-based routing is a separate policy. Cloudflare Geo steering assigns pools to locations and uses their order for failover. These mechanisms do not automatically discover the nearest healthy server or guarantee the lowest latency for every user. Define the intended mapping and test its effect.

For example, a content service could map European, North American and Southeast Asian location groups to three regional deployments. That is a hypothetical design, not a measured result. Regional health, available capacity and application state must still support the selected destination. Test through different resolver and client paths, and remember that proxied Cloudflare steering observes a different location context from DNS-only steering.

For Route 53 geolocation, configure broader geographic and default answers so unsupported or unmapped locations have an intended destination. Health-aware selection must also use the appropriate checks or Alias Evaluate Target Health behavior, including ALB/NLB target-health rules where applicable. Cached DNS answers can still point to a previous destination. Cloudflare’s ordered pools and fallback configuration have their own behavior; defining a fallback does not establish that it can carry the failed region’s traffic.

With a CDN, separate the client-to-edge route from the edge-to-origin fetch. A response served from an edge cache may not contact the origin at all. A dynamic or uncached response can depend heavily on origin placement and application time, but changing an origin DNS policy does not by itself select the client’s CDN edge. Measure cache hits, origin requests and user latency separately before attributing a change to geographic DNS.

The Cloudflare Load Balancing docs describe proxy modes, pool selection, endpoint selection and feature availability. The Amazon Route 53 routing policies explain AWS policy types and record requirements. Keep those terms distinct in a design document. In particular, a geographic mapping, a latency policy, a weighted group and a health check are separate decisions; enabling one does not silently configure the others.

Weighted Routing for Gradual Deployments

A hypothetical rollout might give the new version a weight of 5 and the existing version 95, then change the balance after reviewing errors and latency. For weighted DNS, those values influence authoritative answer selection, not exact percentages of users or HTTP requests. Resolver caches, connection reuse and uneven client activity can skew the observed split. Investigate suspected application defects before increasing exposure; a small DNS weight is not a fixed-size test cohort.

Route 53 weighted records use the same name and type, distinct set identifiers, and relative weights. Cloudflare supports pool weights with Random global steering; endpoint weights within a selected pool are a different level. Geo pool lists are ordered failover mappings, not interchangeable weighted lists. In proxied mode, request steering and session affinity affect the result; in DNS-only mode, caches affect later traffic. Preserve required affinity or shared session state instead of disabling stickiness merely to force a percentage.

Weights can also help introduce a region or shift eligible traffic toward spare capacity. Plan what the destination can actually serve, including warm caches, database access and state compatibility. A weight is not a capacity limit, and a large shared resolver can send more application traffic than a small sample suggests. If strict user assignment or immediate request-level control is required, use an appropriate application or proxy mechanism and measure that layer.

For a DNS-based change, prepare editable TTLs before adjusting weights and keep the previous deployment available through the observation and recovery window. A rollback changes future answers; it does not invalidate remote caches or close established connections. Proxied steering has different timing and should be tested through actual requests. Health checks need meaningful thresholds, but they cannot instantly detect every application failure or guarantee that an alternative target is usable.

Split-Horizon DNS and Private Resolution

Split-horizon presents different records for the same name in different resolution contexts. For example, an internal resolver could return a private endpoint for app.example.com while public DNS returns a public service. The records themselves do not authorize access, encrypt the connection or ensure that traffic takes a private path. Network routing, firewall rules, identity controls and application permissions must implement those requirements separately.

Route 53 private hosted zones serve associated VPCs through the configured resolver path, with the required VPC DNS settings enabled. They return the records you configured, not inherently private IP addresses. Public and private zones can share a name, but private-zone matching determines what an associated client sees. Cloudflare public authoritative DNS is separate from private-name resolution for connected clients; those clients need a correctly configured internal resolver or forwarding policy.

In a hypothetical VPN staging setup, developers might resolve app.example.com to a private address while public clients receive production. VPN connectivity alone does not select the right DNS view. For AWS, an appropriate path may forward queries through a Route 53 Resolver inbound endpoint into an associated VPC. Populate all necessary internal names: if a matching private hosted zone lacks the requested record, do not expect automatic fallback to the public zone.

Check how devices switch between office, VPN and public networks, including cached answers and any browser or device DNS configuration that bypasses the intended resolver. Document which view should answer each name. DNSSEC also requires an explicit trust design: public DNSSEC settings do not automatically authenticate private split views. Test private resolution from a connected client and public resolution from outside the network, then verify actual application access in both cases.

If you operate authoritative servers yourself, the private nameserver and glue-record guide can help with delegation and glue-record fundamentals. That is a separate infrastructure choice, not a requirement for using managed Cloudflare or Route 53 routing. Branded nameservers do not create an internal DNS view. The split-horizon design depends on zone matching and the client’s resolver path, with access control enforced elsewhere.

Combining Geographic Selection, Weights and Failover

Combine policies as explicit layers with a defined input and result for each. First decide which region is eligible, then how a target within that region is selected, and finally what happens when no eligible target is healthy. Keep internal DNS views separate from these availability decisions. A more complex routing graph is useful only if its health, fallback and operational behavior can be explained and tested.

In Route 53, one record group does not simply receive both geolocation and weighted policies. Build a supported hierarchy of Alias records and separately named lower-level groups, with health evaluation on the relevant branches. Cloudflare Geo steering selects an ordered regional pool; endpoint weights can distribute within that pool under the chosen endpoint policy. Random global pool weights are a different setting. More complex location-specific combinations need a supported pool-set configuration or an application/load-balancer layer.

For a hypothetical regional rollout, keep Europe mapped to its intended service region and distribute between old and new endpoints within that region. Verify which layer applies the weights and measure actual application traffic before expanding. Capacity, session state, database compatibility and any circuit-breaker behavior must be ready independently. This example does not claim a past customer deployment or a successful sales event; it illustrates how to limit the number of changes being evaluated together.

Test both partial failure and the all-unhealthy case. Route 53 can treat every record in an unhealthy group as eligible again; a zero-weight record can also be considered in documented failure conditions. An Alias requires the correct target-health setting to propagate underlying health. Cloudflare uses its configured fallback behavior when normal pools are unavailable. Design checks that represent service readiness without turning a slow shared dependency into a cascading removal of every otherwise useful endpoint.

Testing DNS Answers and Application Outcomes

Compare authoritative DNS responses with answers from several recursive resolvers and client networks. Then send HTTP requests and inspect TLS identity, response status, cache headers and server-side region/version logs. With proxied Cloudflare Load Balancing, dig reveals the edge address rather than the selected origin, so request-level evidence is essential. Include mobile, remote and internal/VPN paths where relevant; one workstation does not represent all of them.

EDNS Client Subnet can provide a truncated client-network hint in DNS-only resolution where both sides support it. It does not identify an exact person or guarantee the closest endpoint, and some resolvers omit it. The linked EDNS Client Subnet (RFC 7871) is an IETF specification, not a Cloudflare-authored guide. Distinguish its protocol semantics from each provider’s actual policy implementation and from proxied request-location steering.

Troubleshooting is easier when DNS configuration, cached answers, proxy decisions and application state are examined separately. Begin with the intended record and mode, then compare what is actually published and observed. The following checks address common sources of a correct-looking configuration that still produces an unexpected user outcome.

At the apex, a standard CNAME conflicts with required zone records. Route 53 Alias supports selected AWS resources and suitable same-zone records, not arbitrary external hostnames. Cloudflare automatically flattens apex CNAMEs; proxied answers contain Cloudflare addresses, while DNS-only flattened answers contain resolved target data. Confirm the platform’s custom-hostname and TLS requirements as well. The dashboard’s record label alone does not describe the complete serving path.

Negative answers such as NXDOMAIN and NODATA can be cached. Under RFC 2308, the negative-cache TTL is the lower of the SOA record TTL and SOA MINIMUM in the response, rather than SOA MINIMUM alone. Deleting and recreating a record does not erase previously cached negative answers. Stage supported policy changes carefully and inspect the response type and remaining lifetime before treating every missing answer as failed propagation.

For a CDN or reverse proxy, investigate edge cache behavior and origin fetches separately. A fast cached response in one region and slow dynamic responses elsewhere do not prove a DNS problem. In proxied Cloudflare mode, inspect the pool/endpoint selected for the request and its origin latency. In DNS-only mode, inspect the returned endpoint as well as the client’s network path. Align the actual steering layer with the architecture instead of assuming all geography is controlled by DNS.

Use test environments with known resolver and egress paths, such as a remote VM, a mobile network and an internal client. VPNs and corporate DNS can change the apparent location. Public propagation tools are useful samples, but their resolver path may differ from your users’. Keep the expected response for each test case documented, and distinguish a provider policy mismatch from a cached earlier answer.

Combine load-balancer health and steering analytics with application error, latency and version metrics. Route 53 public query logging reports queries reaching its authoritative service, not every end-user lookup; Resolver query logging is a separate facility for supported resolver environments. DNS cache reuse makes query counts a poor substitute for visitor counts. Verify the logging product and scope before using its graph to evaluate a weighted rollout.

If you publish both A and AAAA, verify reachability, TLS, health checks and routing policy separately for IPv4 and IPv6. Publishing an AAAA record is not a resilience improvement if the corresponding path cannot serve the application. Where an origin is IPv6-only, IPv4 visitors need an appropriate reachable proxy or transition design; DNS names alone do not bridge address families. Include both supported protocols in the test matrix.

A Repeatable Routing Workflow

Write a small design record before changing production: the public hostname, internal names if any, available regions, selected product/mode, eligible endpoints and health criteria. Name the layer that makes each decision. This makes later checks concrete and helps prevent a DNS-only assumption from being applied to a proxied deployment.

Choose a geographic mapping for location policy, a latency policy where that is the intended provider feature, or a weighted method for gradual selection changes. These goals can be combined through supported layers, but they are not equivalent. Define defaults for unrecognized locations and document capacity and data constraints before allowing traffic to fail over between regions.

Design a health endpoint around meaningful readiness, with bounded cost and suitable thresholds. A process-only 200 response can miss a failed application, while probing every external dependency too aggressively can mark all regions unhealthy at once. Test the monitoring path, recovery behavior and all-unhealthy result. A routing product’s health status is evidence about the configured check, not a complete guarantee of user success.

Start with a limited, observable change and compare expected selection with actual requests. Small example weights such as 5 and 95 are relative settings, not guaranteed user cohorts. For DNS changes, prepare TTLs ahead of time; for proxied changes, inspect request routing and session behavior. Keep old endpoints usable for the planned recovery window and expand only after the application metrics support the next step.

Document how to restore the previous mapping or weights, which fallback can carry traffic, and which conditions should stop the rollout. A DNS workaround may still depend on cached answers, certificate readiness and a reachable platform hostname. Do not assume changing a weight can immediately rescue an existing connection or bypass an unavailable CDN configuration.

After the observation period, review regional latency, error rates, endpoint distribution, query/logging costs and the remaining need for short TTLs. Reconcile public and private zone changes with the inventory. Remove obsolete configuration through a planned change rather than deleting records merely because one resolver no longer returns them. Keep the runbook aligned with the final deployed architecture.

Choosing the Right Routing Layer

Geographic policies choose according to configured location rules, weighted policies influence target selection, and split-horizon supplies different DNS views. The result depends on proxy mode, cache behavior, health evaluation and application readiness. None inherently ensures the nearest healthy region, a precise user percentage, private access or a search-ranking improvement. Use the actual provider behavior and observed application results to judge the design.

A useful first change might be a supported weighted rollout, a documented regional mapping or a private DNS view with verified resolver access. Keep the scope small enough to test publication, resolution and application behavior independently. If the desired control is at the user or request level, put it in a layer that supports that control instead of assuming DNS alone can provide it.

The operational goal is an understandable routing configuration with tested defaults, health behavior and recovery steps. Record what is selected, at which layer and from which signal. That clarity makes it easier to diagnose an unexpected region or traffic split and to change the configuration without relying on unsupported guarantees.

Frequently Asked Questions

A geographic policy maps location signals to configured targets; weights influence selection among eligible targets. Weighted DNS does not guarantee exact user or request percentages. Cloudflare proxied routing operates at the request layer, while Route 53 and Cloudflare DNS-only selection are affected by DNS caches. Policy and health behavior must be configured separately.

No. Regional origin selection and CDN edge delivery address different parts of the path. An edge cache hit may not contact the origin, while an uncached request depends on origin and application performance. A geographic mapping does not guarantee the nearest or lowest-latency target. Measure the relevant layers before choosing either approach.

Verify the configured mode, authoritative answers and resolver paths from relevant regions. For proxied Cloudflare, also inspect actual request and endpoint logs. Prepare editable TTLs in advance, monitor application distribution and errors, and test health/fallback behavior including all-unhealthy targets. Small example weights are not fixed-size user cohorts; preserve a recovery plan.
↑