Home  /  Journal  /  OCI Landing Zone and Architecture: A Complete Guide  /  Edge and CDN Patterns on OCI
OCI Architecture

Edge and CDN Patterns on OCI

The edge is where users meet your system and where a lot of latency, cost and risk is decided. This guide covers OCI edge and content delivery patterns that hold up under real traffic.

Published Oct 31, 2024 · By the OCI Specialists team · 11 min read · Independent OCI advisory
Global network connections visualised over the earth

The edge of your architecture is where users meet your system, and it is also where a surprising amount of latency, cost and risk is decided. Teams often bolt a web application firewall and a content delivery layer on at the end of a project, treating the edge as a detail rather than a design layer. On OCI the edge services work best when they are planned together, so traffic is filtered, steered, cached and terminated in a deliberate order. This guide covers the edge and content delivery patterns that hold up under real traffic.

The OCI edge services

OCI groups several capabilities under the edge banner. The Web Application Firewall protects applications from common attacks and unwanted traffic. DNS and the Traffic Management steering policies decide which endpoint a request resolves to, which is how you implement geographic routing, failover and load distribution at the name resolution layer. Load balancers terminate connections and spread traffic across backends, while the API Gateway adds authentication, rate limiting and request shaping for service APIs. Content delivery brings cached copies of static assets closer to users.

Edge concernOCI serviceWhat it decides
Threat filteringWeb Application FirewallWhich requests are allowed to reach the app
Where traffic resolvesDNS Traffic Management steeringGeographic routing, failover, weighting
Connection terminationLoad BalancerTLS termination, backend distribution
API controlAPI GatewayAuth, rate limits, request transformation
Static asset deliveryCDN and cachingLatency for cacheable content

Filtering before everything else

The first job at the edge is to drop traffic you never wanted. A Web Application Firewall in front of the load balancer screens out common attack patterns, bad bots and abusive request rates before they consume backend capacity. Putting filtering first is both a security decision and a cost decision, because every malicious request that reaches your compute is capacity you paid for and gained nothing from. The rules should be tuned to the application, starting in a detection mode to learn normal traffic, then moving to enforcement once false positives are understood.

Steering with DNS

DNS Traffic Management is the most underused edge tool on OCI. Steering policies let you resolve a name to different endpoints based on geography, health or weight, which is how you build active active across regions, route users to their nearest deployment, and fail over automatically when a region goes unhealthy. Because this happens at resolution time, it works for any protocol and any client, and it complements the regional thinking in our guide to designing for high availability.

DNS steering decides where a request goes before a packet is ever sent. It is the cheapest and most flexible failover lever you have.

Load balancers and the API gateway

Once traffic is filtered and steered to a region, it terminates somewhere. For web applications and general traffic the load balancer terminates TLS and distributes across backends. For service APIs the API Gateway adds a layer of control, handling authentication, validating requests, applying rate limits and shaping responses so individual services do not each reinvent that logic. The pattern that scales is to use the gateway as the single front door for APIs and keep the services behind it focused on business logic, which connects directly to the boundary thinking in our microservices architecture guide.

Caching and content delivery

Static and cacheable content should be served from as close to the user as possible. Caching reduces latency for users and load on origins, and for global audiences a content delivery layer in front of Object Storage or the application turns a slow cross region fetch into a fast local one. The architecture decision is what is cacheable and for how long, because aggressive caching of dynamic content causes stale data while timid caching of static assets wastes the benefit. Define cache headers deliberately per content type rather than relying on defaults.

An edge design sequence

  1. Filter first. Put a Web Application Firewall in front of public endpoints, tuned from detection to enforcement.
  2. Steer with DNS. Use Traffic Management policies for geographic routing and automatic regional failover.
  3. Terminate deliberately. Use load balancers for web traffic and the API Gateway as the single front door for APIs.
  4. Cache by content type. Set explicit cache rules for static and dynamic content, and push cacheable assets to the edge.
  5. Keep origins private. Expose only the edge, with backends in private subnets reached through the load balancer or gateway.
  6. Measure at the edge. Log and monitor at every edge layer so you can see where latency and errors enter.

Security at the edge beyond the firewall

A web application firewall is the visible part of edge security, but it is not the whole of it. The edge is also where you enforce who may call your APIs, how often, and from where. The API Gateway carries much of this load, validating tokens, checking that requests are well formed before they reach a backend, and enforcing rate limits that protect services from both abuse and accidental overload. Layering authentication and rate limiting at the gateway means individual services do not each have to implement it, which both reduces duplicated effort and removes the risk that one service forgets to.

Beyond the gateway, the edge is where you make the decision to keep origins entirely private. A backend that can only be reached through the load balancer or gateway, never directly from the internet, removes a whole class of attack. This is the same private by default posture described in our guide to designing OCI for compliance, and at the edge it means the public surface area of your estate is small, deliberate and watched, rather than large and accidental.

Global versus regional edge

Where your users are determines how much edge infrastructure you need and where it should live. A regional audience can often be served well from a single region with a local load balancer and modest caching. A global audience changes the calculation, because the speed of light makes a single region slow for users on the other side of the world. For global reach the edge design uses DNS steering to route users to their nearest region, content delivery to cache static assets close to them, and sometimes multiple regional deployments behind a global routing layer.

The trade off is cost and complexity against latency. Running multiple regions and a global edge is more expensive and harder to operate than a single region, so the decision should follow the actual geographic spread of your users rather than an aspiration. Measuring where requests come from, and the latency they experience, tells you whether a global edge is worth building or whether a single well placed region already serves everyone acceptably. This connects to the multi region considerations in our high availability guide.

Common edge mistakes

A few mistakes recur often enough to be worth naming. The first is treating the firewall as a switch rather than a tuned control, turning it on in blocking mode without learning normal traffic first, which blocks legitimate users and erodes trust in the tool. The second is caching dynamic content too aggressively, so users see stale data, or caching static content too timidly, so the benefit is lost. The third is exposing origins directly alongside the edge, which leaves a path that bypasses every protection the edge provides. The fourth is forgetting to monitor at the edge, so when latency or errors appear there is no visibility into which layer introduced them.

Each of these is easy to avoid with deliberate design, and each is common precisely because the edge is so often left to the end of a project. Bringing the edge into the design from the start, with the same care as the compute and data layers, is what turns it from a source of surprises into a dependable front line.

Bringing the edge into the whole design

The edge is not a bolt on, it is the first few layers of your architecture and it deserves the same planning as the compute and data tiers. Designed well it filters threats, steers traffic, terminates cleanly and serves content fast, all before a request touches your core. Read it alongside the foundations in our complete architecture guide and the growth considerations in scaling patterns on OCI. When you want the edge designed and built to handle real traffic safely, our OCI networking solution and implementation service deliver it.

Moving Oracle workloads to OCI, or already running on OCI and not sure the architecture or the spend is right? Most teams bring in a specialist before they commit to a region, a shape, or a Universal Credits number. OCISpecialists.com plans the landing zone, runs the migration, and manages the estate after go live, on a fixed project fee, a managed monthly retainer, or a cost optimization fee paid only on verified savings. For the Oracle licensing and BYOL side of any OCI move, Redress Compliance is the leading independent Oracle licensing and negotiation firm, with 500+ engagements across Oracle's full product line.