Edge Locations in Azure: CDN Points of Presence
A beginner-friendly guide to the small sites that sit close to your users: what they are, how Azure uses them to make websites faster and safer, how caching works, and how to avoid the common mistakes.
Open a popular website from your phone and the page appears almost at once, even though the company behind it may keep its main servers on another continent. How is that possible? The secret is that most of what you see did not travel from far away. A copy was waiting in a small facility close to you, a few streets or a few cities away. That nearby facility is called an edge location, and in Azure it is also known as a point of presence, often shortened to PoP.
This guide explains edge locations from the ground up. You need no earlier knowledge of networks. Every new word is explained when it first appears, with an everyday comparison and a practical example. By the end you will understand how Azure’s edge works, which services use it, how caching decides what to keep, and how to design, secure, monitor, and pay for a fast global website without surprises.
Microsoft has been reorganising its content delivery products, and the number of edge locations keeps growing. This guide teaches the lasting ideas and gives typical examples. Before choosing a product or making a plan, confirm the current offerings, features, retirement notices, and edge location list on Microsoft’s official Azure documentation.
1The Big Idea: What Is an Edge Location?
An edge location is a small site, close to ordinary users, that holds copies of popular content and handles the first part of every request.
The simple definition
A server is a computer that answers requests from other computers. Your website’s main servers are called the origin, because that is where the original files and the real application live. An edge location is a site placed at the “edge” of the network, meaning near the people who use it, rather than deep in a far-off data center. It holds temporary copies of your files, and it can also do useful work such as checking security and picking the best route to your origin.
A point of presence (PoP) is another name for such a site. Each one contains servers, storage for cached copies, and fast connections to internet providers. Azure has a large number of them around the world, many more than it has full regions.
Think of a big publisher that prints books in one factory in another country. Instead of making every reader wait for a delivery from that factory, the publisher keeps popular titles in small bookshops in every city. Most readers pick up a copy from the shop around the corner, and only rare or new books come from the factory. The factory is the origin, and the bookshops are edge locations.
Why the word “edge”?
Network designers imagine the internet as a core, made of big data centers and long cables, with the users sitting around the outside. The places where the core meets the users are the edge. Moving work to the edge shortens the trip data has to make.
An edge location is not a place where you run your virtual machines or databases. It is a helper site that stores copies, speeds up delivery, and protects your origin. Your real application still lives in a region.
2Why Edge Locations Exist: Four Good Reasons
Edges solve problems that no amount of server power can fix, because the biggest enemy is simply distance.
Speed
Data cannot travel faster than light in a cable. A nearby copy removes thousands of kilometres from the trip, so pages, pictures, and videos start sooner.
Less load on the origin
If the edge answers most requests itself, your origin servers do far less work. That means fewer servers to pay for and fewer chances of overload.
Protection and resilience
Edges stand in front of your origin. They can absorb floods of traffic, filter bad requests, and keep serving cached content even if the origin has trouble.
Handling big crowds
When millions of people want the same file at once, such as a game update or a live event, the load is spread across many edge sites instead of crushing one place.
An example for each reason
Speed: a news website
A news site keeps its servers in one region. Readers on other continents would wait longer for each picture. With edge locations, the pictures and style files are served from a site near each reader, and the page feels quick everywhere.
Less load: an online store on sale day
On a sale day, thousands of visitors request the same product photos. The edge answers almost all those requests, while the origin handles only the real work, such as adding items to carts and taking payments.
Big crowds: a software update
A company releases an update that millions of users download within a few hours. Edge locations hold copies of the file near every group of users, so no single link or server must carry the whole crowd.
Imagine a popular football match. If everyone had to buy tickets at one single office, the line would stretch for kilometres. With ticket counters in every neighbourhood, each counter serves a small group, the queues stay short, and the main office only handles special cases.
3Core Concepts: The Words You Need
Edge computing has a small vocabulary. Learn these terms once and everything else becomes easier to follow.
| Term | What it means | Everyday comparison |
|---|---|---|
| Origin | The real source of your content, such as a storage account or web server in a region | The printing factory |
| Edge location, PoP | A site near users that holds copies and handles first contact | A neighbourhood bookshop |
| CDN | Content delivery network, a worldwide group of edge locations that deliver content | The whole chain of bookshops |
| Cache | Temporary stored copy of content | Keeping a favourite book on your desk |
| Cache hit | The edge already has the file and serves it | The shop has the book in stock |
| Cache miss | The edge lacks the file and must fetch it from the origin | The shop orders the book from the factory |
| TTL (time to live) | How long a copy may be kept before it is considered old | The expiry date on milk |
| Latency | The time a message takes to travel | How long a letter takes to arrive |
| Static content | Files that are the same for everyone, such as pictures and style sheets | A printed poster |
| Dynamic content | Responses that depend on who asks or on current data | A personal bank statement |
flowchart LR
U["User on a phone or laptop"] --> E["Edge location: nearby PoP with cache"]
E -- "cache hit: answer right away" --> U
E -- "cache miss: ask the origin" --> O["Origin in an Azure region"]
O --> E
Hit ratio: the number that matters most
The cache hit ratio is the share of requests that the edge answers from its stored copies. If out of 100 requests, 90 are answered by the edge, the hit ratio is 90 percent. A higher hit ratio means faster pages and a quieter origin. Most of the tuning you will do in this guide is aimed at raising it safely.
When you hear a cache is “warm”, it means it already holds popular files. A “cold” cache is empty, for example right after you create a new setup or purge old content, and the first visitors must wait for the origin.
4Edge Locations versus Regions versus Edge Zones
Beginners often mix these up. They are different things with different jobs.
| Feature | Azure region | Edge location or PoP | Edge zone |
|---|---|---|---|
| What it is | A group of full data centers | A smaller delivery site close to users | A small Azure extension in a city, for very low delay needs |
| Runs your servers and databases | Yes | No, it caches and forwards | Yes, a limited set of services |
| How many exist | Dozens | Hundreds | A smaller number, in selected cities |
| Main job | Hosting your workloads and data | Speeding up and protecting delivery | Running work physically close to users or devices |
| You choose it by | Picking a region when creating a resource | Using a delivery service, which picks the nearest edge for each user automatically | Selecting a special location option |
A region is like a big factory and warehouse. An edge location is a small shop that stocks popular items. An edge zone is a small mini-factory placed in a city for jobs that cannot wait for deliveries. You would never build a full factory in every neighbourhood, but you can put a shop almost anywhere.
You do not pick an individual edge location. You turn on a delivery service, point it at your origin, and Azure routes each visitor to a nearby edge automatically. Your choices are about behaviour, such as what to cache and for how long, not about which building to use.
5Azure’s Edge Services: What You Can Use
Several Azure services use edge locations. Knowing which does what saves you from picking the wrong tool.
Azure Front Door
Microsoft’s modern global entry point for web applications. It combines content delivery, smart routing, security rules, and acceleration of dynamic traffic, all running on Microsoft’s edge locations. It is the product Microsoft steers new projects towards.
Azure CDN
The older content delivery service, focused on caching and delivering files. Microsoft has been retiring parts of it and moving customers to Front Door, so check the current status before starting a new project on it.
Azure Traffic Manager
Uses the naming system to send users to different endpoints. It does not sit in the path of the traffic and does not cache content, so it is not a CDN.
Application Gateway and Load Balancer
These work inside a region, sharing traffic among your servers. They are not edge services, though they often sit behind one.
Azure Edge Zones
Small extensions of Azure in selected cities, used for work that needs the lowest possible delay, not mainly for caching.
Partner and third-party CDNs
Other companies run their own edge networks. Many Azure customers use them alongside, or instead of, Microsoft’s.
What the shift to Front Door means for you
Microsoft once offered several CDN products, including some built on partner networks. Over time it has retired some of them and now recommends Azure Front Door as the main service for content delivery and global web entry. The ideas in this guide, such as origins, caching, TTL, and hit ratio, apply to all of them, so what you learn here stays useful even as product names change.
It is like a phone company that used to sell separate plans for calls, messages, and data, and then merged them into one modern plan. The old plans still taught you what calls, messages, and data are. The new plan just packages them better.
Look for retirement and migration notices on the product pages. Building a new system on a product that is being phased out creates avoidable work later.
6Architecture: What Is Inside an Edge Location
An edge location is small compared with a region, but it is carefully built for one purpose: answering many requests, very quickly.
The physical parts
Most edge locations sit inside well-connected facilities where many internet providers meet. They hold racks of servers, fast storage for cached files, network switches, power backup, and cooling. Because they are small and numerous, they can be placed in many cities, including ones with no full region.
The network connections
An edge’s value comes largely from its connections. It links to local internet service providers directly, which is called peering. This means a user’s request often reaches the edge in just a few hops, without wandering through many networks. From the edge to your origin, traffic travels over Microsoft’s private global network, which is usually faster and more stable than the open internet.
flowchart TB
U["Users in many cities"] --> ISP["Local internet providers"]
ISP --> P1["Edge PoP in City 1"]
ISP --> P2["Edge PoP in City 2"]
P1 --> BB["Microsoft private global network"]
P2 --> BB
BB --> R["Origin in an Azure region: web app, storage, API"]
subgraph IN["Inside an edge PoP"]
direction LR
TLS["TLS and HTTP handling"] --> WAF["Security rules"]
WAF --> CH["Cache storage"]
CH --> RT["Routing to origin"]
end
P1 --> TLS
What the software inside does
- Connection handling: the edge completes the secure connection with the user close by, which saves time.
- Security checks: rules can block bad requests before they ever reach your origin.
- Cache lookup: the edge checks whether it already holds a fresh copy of the requested file.
- Compression and optimisation: the edge can shrink files so they travel faster.
- Routing: on a miss, the edge picks a healthy origin and forwards the request.
An edge location is like a busy airport check-in desk. The staff check your identity (security), look at your booking (cache lookup), weigh your bag (compression), and send you down the right corridor (routing). The airline’s headquarters is far away, but the desk handles almost everything on the spot.
7How a User Finds the Nearest Edge
Nobody types the address of an edge location. Clever routing sends each visitor to a good one automatically.
Step 1: the name lookup
When you type a website address, your device asks the Domain Name System, or DNS, for the numeric address that belongs to that name. DNS works like a phone book for the internet. When your site uses an edge service, its name points to the edge network instead of directly to your origin.
Step 2: anycast routing
Edge networks often use a technique called anycast. The same address is announced from many locations at once. The internet’s routing system, which always tries to find short paths, then delivers each user’s traffic to the closest announcing location. A user in Chennai and a user in London can type the same address and land in different cities without any special effort.
A national helpline number, like an emergency number, works in every city. You dial the same digits everywhere, and the telephone network connects you to the nearest control room. Anycast does this for web traffic.
Step 3: a faster handshake
Opening a secure connection needs several back-and-forth messages. If those messages had to travel all the way to a distant origin, each one would add delay. With an edge, the handshake happens with the nearby edge location. The edge then keeps a long-lived, ready connection to your origin, so it can reuse it for many users. This trick, sometimes called connection splitting, is why even requests that cannot be cached often feel faster when they pass through an edge.
Name lookup
Your device asks DNS where the site lives, and receives an address that belongs to the edge network.
Nearest edge chosen
Internet routing steers the traffic to the closest edge location advertising that address.
Secure connection
Your device and the nearby edge set up an encrypted session in a very short time.
Request handled
The edge answers from cache or forwards the request to the origin over a reused, fast connection.
Routing chooses the closest in terms of network paths, which is usually, but not always, the closest on a map. A user’s internet provider and its agreements can make a slightly farther edge the better choice.
8Data Flow: A Cache Hit and a Cache Miss
Follow two requests for the same picture. The first one fills the cache, and the second enjoys the result.
sequenceDiagram
participant A as First User
participant B as Second User
participant E as Edge Location
participant O as Origin
A->>E: Request logo picture
E->>E: Look in cache, not found
E->>O: Fetch logo picture
O-->>E: Picture with caching instructions
E->>E: Store a copy
E-->>A: Picture, a bit slower, cache miss
B->>E: Request logo picture
E->>E: Look in cache, found and fresh
E-->>B: Picture, very fast, cache hit
What happens at each step
- Look in the cache: the edge builds a key from the web address, and sometimes from other details, and checks whether it holds a fresh copy.
- Fetch from the origin: on a miss, the edge asks your origin for the file. The origin’s reply includes instructions about how long the file may be kept.
- Store a copy: if the rules allow it, the edge saves the file for later visitors.
- Reply to the user: the edge sends the file on, and adds helpful details, such as whether it came from the cache.
Each edge has its own cache
An important detail: the cache in one edge location is separate from the cache in another. A file stored in the Mumbai edge is not automatically in the London edge. Each edge fills its cache as its own local visitors ask for files. This is why a file can be fast for users in one city and slower for the very first visitor in another.
Each bookshop in the chain has its own shelves. When a customer in one city asks for a book, that shop orders it from the factory and keeps a few copies. The shop in the next city still has to order its own copies when its first customer asks. Over time, popular books are stocked everywhere.
Because each edge fills separately, a global launch has many first misses. Sending extra traffic to an origin during such a launch is normal, and a well-prepared origin, with enough capacity, can handle it. Some services also offer ways to warm or share caches to reduce this effect.
9The Life of a Cached File: TTL, Expiry, and Purge
A cached file is like food in a shop: fresh for a while, then it must be checked, replaced, or thrown away.
Who decides how long to keep a file?
The origin tells the edge. It does this by sending caching instructions with each file, usually in a setting called Cache-Control, which includes a maximum age. The edge service can also apply its own rules that override or fill gaps. The period a copy may be kept is the time to live, or TTL.
Fetched
On a miss, the edge gets the file from the origin along with its caching instructions.
Fresh
For the whole TTL, the edge serves the copy without contacting the origin at all.
Expired
When the TTL ends, the copy is considered stale. The edge must not simply keep serving it as if nothing happened.
Revalidated or refetched
The edge asks the origin whether the file has changed. If not, the origin answers with a tiny “not modified” message and the copy becomes fresh again. If so, the new version is downloaded.
Purged
At any time, you can order the edge to remove a file early, for example after fixing a mistake. This is called a purge.
Think of a shop selling fresh bread. Each loaf has a “best before” time. Within that time, it is sold without question. After it, the shopkeeper checks with the bakery whether there is a newer batch, and replaces the old loaf if so. If the bakery discovers a mistake, it can call every shop and tell them to pull the loaf from the shelf immediately. That is a purge.
Choosing a TTL
| Kind of content | Suggested TTL idea | Reason |
|---|---|---|
| Versioned files, such as logo.v7.png or app.4f9a.js | Very long, a year is common | A new version gets a new name, so old copies never cause confusion |
| Images and fonts that rarely change | Days to weeks | Saves a lot of traffic, small risk |
| Home page or product list | Seconds to minutes | Fresh enough, yet still offloads big crowds |
| News headlines or prices | Very short, or revalidate each time | Wrong data costs trust |
| Personal pages and account data | Do not cache at the edge | One user must never see another’s data |
Purging everything at once empties the cache, so the next wave of visitors all miss together and hit your origin hard. Prefer versioned file names, and purge only specific paths when you truly must.
10What to Cache and What Not to Cache
The edge is powerful, but it must be told what is safe to keep. The key question is simple: is this response the same for everyone?
Static content: the perfect fit
Static content is the same for every visitor. Pictures, videos, style sheets, scripts, fonts, downloadable documents, and software installers are all static. They make up the large majority of the bytes on a typical website, which is why edges help so much.
Dynamic content: handle with thought
Dynamic content changes depending on who asks or when. Your shopping basket, a search result, a bank balance, or a live score are dynamic. Some dynamic pages, such as a public product list that changes every few minutes, can still be cached for a short time. Others, such as anything personal, must never be shared between users.
| Content | Same for everyone? | Edge treatment |
|---|---|---|
| Logo, product photos, fonts | Yes | Cache for a long time |
| Style sheets and scripts | Yes | Cache for a long time, with versioned names |
| Video segments for streaming | Yes | Cache, since popular segments are requested constantly |
| Public article pages | Mostly | Cache for a short time |
| Search results | Depends on the query | Cache briefly only for popular queries, if at all |
| Shopping basket, account pages | No | Do not cache, but still route through the edge for speed and security |
| Payment calls | No | Never cache |
Accelerating what cannot be cached
Even uncacheable responses can gain from the edge. The nearby secure handshake, the warm and reused connection to the origin, and the use of Microsoft’s private network all reduce delay. This feature is often called dynamic site acceleration. It does not store the response, but it makes the trip shorter and steadier.
Think of a courier hub in your city. It can store popular parcels for quick pickup (caching static content). For a personal parcel that must go from you to a faraway office, it cannot keep a copy, but it can put it on the fastest truck over the best road (acceleration). Either way, going through the hub beats driving across the country yourself.
Caching a personalised page can show one user’s private data to a stranger. Always make sure responses that carry personal information are marked as private and not cacheable, and test this before going live.
11Cache Keys, Query Strings, Compression, and File Versioning
A few small settings decide whether your hit ratio is 95 percent or 30 percent.
The cache key
To decide whether it already holds a file, the edge builds a cache key, usually from the web address of the request. Two requests with the same key share one stored copy. Two requests with different keys are treated as different files, even if they return identical content.
Query strings
A query string is the part of an address after a question mark, such as a tracking tag or a page number. If the edge treats every different query string as a separate file, a marketing campaign that adds a random tag to every link can make every request a miss. Most edge services let you choose how to handle this:
- Ignore query strings: all requests for the same path share one cached copy. Good for static files where the tag does not change the content.
- Use every query string: each different query string is cached separately. Good where the query truly changes the response.
- Include only chosen parameters: cache by the important ones and ignore the rest. Often the best balance.
A bookshop might file books by title only. If every customer’s order slip had a different handwritten note on it, and the shop treated each note as a different book, the shelves would fill with duplicates. Ignoring the unimportant notes keeps the shelves tidy.
Compression
Text files such as web pages, style sheets, and scripts shrink dramatically when compressed. Edge services can compress files on the fly and store compressed copies, so users download fewer bytes. Images and videos are already compressed, and compressing them again gains little.
File versioning: the cleanest way to update
The best way to change a cached file is not to purge it, but to give the new version a new name. For example, instead of changing “site.css”, publish “site.v8.css” and update the page to point to it. Old copies in the cache are simply never asked for again. Visitors immediately see the new version, and you can give the files a very long TTL. Build tools often add a short code, called a fingerprint, to file names automatically.
Publish the new file with a new name
The old and new files exist side by side.
Update the page that uses it
The page itself has a short TTL, so the new link is seen quickly.
Visitors fetch the new file
The first request in each edge misses and fills the cache. Everyone after that hits.
Old files expire quietly
They are never requested again, and eventually leave the cache by themselves.
12Origins, Origin Groups, and Health Probes
The edge is only as good as the origin it protects. Azure lets you describe your origins and how to choose among them.
What counts as an origin
An origin can be a storage account that holds files, an App Service web app, a virtual machine, a load balancer in a region, a container app, or even a server outside Azure. You tell the edge service where the origin lives and how to talk to it.
Origin groups
An origin group is a set of origins that serve the same content, often in different regions. The edge service picks among them according to rules you choose.
Latency-based
Send the request to the origin that currently responds fastest from that edge.
Priority
Use the first origin when it is healthy, and fall back to the next one only if it fails.
Weighted
Share traffic in chosen proportions, for example eighty percent to one origin and twenty percent to another. Useful for gradual rollouts.
Session affinity
Keep sending the same visitor to the same origin for a while, when the application needs it.
Health probes
A health probe is a small, repeated test request that each edge sends to your origins, for example asking a simple status page whether it is alive. If an origin fails several tests, the edge stops sending traffic there and uses another one. When the origin recovers, traffic returns. This is how a failure at the origin can be hidden from users.
A delivery company calls each of its warehouses every few minutes and asks, “are you open?” If one does not answer, drivers are sent to the next warehouse. When the first one answers again, deliveries resume. Customers never learn that one warehouse had a power cut.
Make the health probe path a light, honest check. If it only tests that a web server is running, but the database behind it is down, the edge will keep sending users to a broken origin. A good check confirms that the application can really do its work.
Some edge services can keep serving a slightly out-of-date copy while the origin is unreachable. This can turn a total outage for static content into a quiet, unnoticed hiccup. Check whether your chosen service and settings support it.
13A Complete Architecture: Edge in Front of a Real Application
Let us put every piece together in a typical, practical design for a growing website.
The example is a shopping website with customers in several countries. Photos and scripts are served from storage, pages and the shopping logic run in two regions, and an edge service sits in front of everything.
flowchart TB
U["Customers worldwide"] --> DNS["DNS name pointing to the edge service"]
DNS --> FD["Azure Front Door: nearest edge PoP"]
FD --> WAF["Web Application Firewall rules"]
WAF --> C{"Cached copy available?"}
C -- "Yes" --> U
C -- "No: static files" --> ST["Origin 1: Blob Storage with images and scripts"]
C -- "No: pages and API" --> OG["Origin group with health probes"]
OG --> A["Region A: Application Gateway and App Service"]
OG --> B["Region B: Application Gateway and App Service"]
A --> DB["Database with replication"]
B --> DB
The role of each part
- DNS name: a friendly address that leads customers to the edge service.
- Front Door edge: terminates the secure connection nearby, applies rules, and serves cached files.
- Web Application Firewall: blocks common attacks before they touch your servers.
- Blob Storage origin: holds large static files, cheap and durable.
- Origin group: two regional applications, so a regional problem does not stop the shop.
- Application Gateway: shares traffic among servers inside each region.
- Database: the shared source of truth, with copies for safety.
Production example: the layered approach
Large web businesses commonly arrange their systems in exactly such layers: a global edge at the front, regional load balancing in the middle, and replicated data at the back. Each layer protects and speeds up the next one, and each can scale on its own.
For stronger protection, make the origin accept traffic only from your edge service, not from the open internet. Azure offers ways to do this, such as restricting access to the edge’s identity, or using a private connection between the edge and the origin where the product supports it.
14Performance: Latency, Hit Ratio, and Origin Offload
The benefits of the edge are measurable. Here is how to understand and estimate them.
Distance and delay
Light in a fibre cable moves at roughly two-thirds of its speed in empty space. A useful rule of thumb is that a round trip costs about one millisecond for each hundred kilometres between the two points, even in a perfect world. Real networks add detours and equipment delay, so actual figures are higher.
A worked example
Suppose a user is 8,000 kilometres from your origin. The idealised round trip is about 80 milliseconds. Before the page can start, the device usually needs about one round trip to open the connection and another to set up encryption, so two round trips, and then one more to send the request and receive the first byte. That is roughly three round trips, about 240 milliseconds, before the first byte arrives, and real life will be slower.
Now suppose an edge location is 100 kilometres away. One round trip costs about 1 millisecond, so the same three round trips cost about 3 milliseconds when the file is cached. For a page with dozens of files, the saving adds up to a clear and noticeable improvement.
| Path | Idealised round trip | Three round trips before first byte |
|---|---|---|
| User to a far origin, 8,000 km | About 80 ms | About 240 ms |
| User to a nearby edge, 100 km, cache hit | About 1 ms | About 3 ms |
| User to a nearby edge, cache miss | About 1 ms to the edge, plus the edge to origin trip | Faster than direct, because the edge-to-origin link is already open |
Offload: how much work the origin saves
If your site receives one million requests a day and the edge answers 90 percent of them, your origin handles only 100,000. That is ten times less work. If the hit ratio improves to 95 percent, the origin handles 50,000, which is half as much again. A small improvement in hit ratio can mean a big reduction at the origin when the ratio is already high.
A school office receives a hundred questions a day about the exam timetable. If a notice board outside answers ninety of them, the office staff only handle ten. Printing a clearer notice, so that five more people find their answer at the board, halves the remaining workload.
Other measures worth watching
- Time to first byte: how long until the first piece of the answer arrives.
- Byte hit ratio: the share of data, not just requests, served from cache. Large files matter more here.
- Origin latency: how fast your origin answers on misses.
- Error rate: the share of requests that fail, from the user’s side and the origin’s side.
15Security at the Edge
The edge is your front door. A strong front door keeps problems outside before they reach anything valuable.
Encryption and certificates
HTTPS encrypts the connection between the user and the site, so that nobody in between can read it or change it. The edge handles this for you, using a certificate, a digital proof of identity for your website. Azure can issue and renew certificates for your custom domain automatically in many cases, which removes a common cause of outages: forgetting to renew. Also use encryption between the edge and the origin, so the whole path is protected.
The main protections
Web Application Firewall (WAF)
Rules that detect and block common attacks, such as attempts to inject harmful commands through forms. Managed rule sets are kept up to date by Microsoft.
DDoS protection
A distributed denial-of-service attack tries to overwhelm a site with fake traffic. The large, spread-out edge network absorbs much of such traffic far from your origin.
Rate limiting
Restricts how many requests one client can make in a period, which slows down password guessing and scraping.
Geo-filtering
Allows or blocks traffic from chosen countries, when business or law requires it.
Origin protection
Only accept traffic that came through your edge service, so attackers cannot bypass it by calling the origin directly.
Signed links and tokens
Time-limited links let only the right people download paid or private files, even though those files are delivered by the shared edge.
Think of a modern office building. A reception desk at the entrance checks visitors, a security gate stops suspicious bags, a limit on how many people may enter per minute prevents crowding, and the back door is locked from the outside. The edge plays the role of the reception, the gate, and the crowd controller for your servers.
Microsoft secures the edge network itself. You are responsible for how you configure it: the rules, the certificates, what you allow it to cache, and which origins you trust. Misconfiguration, such as caching a private page, is a common cause of real incidents.
16Monitoring, Logging, and Metrics
An edge works quietly, so you need numbers to know whether it is doing its job.
| Signal | What it tells you | Why you care |
|---|---|---|
| Request count | How much traffic arrives, by time and place | Spot growth, spikes, and attacks |
| Cache hit ratio | How much the edge answers by itself | The main measure of effectiveness |
| Origin request count and latency | How much work reaches the origin and how fast it replies | Find slow or overloaded origins |
| Status codes | Counts of success, client errors, and server errors | Notice broken links and failing origins |
| Data transfer | Bytes sent to users and fetched from origins | Understand and predict your bill |
| WAF logs | Which rules matched and what was blocked | Tune security and see attacks |
| Health probe results | Which origins were seen as healthy | Explain failovers |
Where to look
Azure Monitor collects metrics for edge services, and you can send detailed access logs and firewall logs to a log workspace or a storage account for searching. Many logs include a header that says whether a response was a hit or a miss, which lets you study exactly which files are not being cached.
A shop owner who counts how many customers entered, how many left empty-handed, and which shelf was emptied fastest can improve the shop. Edge metrics give the same insight about your website visitors and your stock of cached files.
Alerts worth setting
- A sudden fall in hit ratio, which can mean a configuration change or a new query string pattern.
- A rise in server error responses from the origin.
- An origin marked unhealthy by the probes.
- A large jump in data transfer, which affects cost.
- An approaching certificate expiry, if you manage certificates yourself.
17Pricing and Cost Management
Edge services usually save money overall, because they reduce origin work, but they have their own meters.
What you are typically charged for
Base fee
Some tiers charge a monthly base amount for each profile or endpoint, in return for features such as the firewall and private origin links.
Data sent to users
Charged per gigabyte, often at a rate that depends on the user’s part of the world.
Requests
A small charge per number of requests handled, which matters for sites with a very large number of small files.
Data from edge to origin
Traffic fetched from your origin on misses may be billed or discounted, depending on the product and the origin type. Check the pricing page.
Firewall rules and logs
Custom rules, managed rule sets, and storing detailed logs can add to the total.
Savings at the origin
Fewer requests reaching your servers and less data leaving your region often lower the origin’s own bill.
Ways to keep costs sensible
- Raise the hit ratio: every extra hit is a request the origin does not pay for.
- Compress text files: fewer bytes cost less to send.
- Resize images: serve images in sizes suited to the device, not giant originals.
- Choose the tier honestly: pick the higher tier only if you need its features.
- Review geography: if most of your users are in one expensive zone, check whether pricing there is acceptable.
- Budget alerts: set a budget and warnings, since a viral download can raise transfer sharply.
Using the edge is like paying a small fee to a local distributor. The fee is real, but it is usually smaller than the cost of sending every single parcel directly from the faraway factory, and your customers get their goods sooner.
Use the Azure pricing calculator with your expected monthly traffic, and compare product tiers. Rates and structures change, so always rely on the current pricing page.
18Advantages, Disadvantages, and Trade-offs
The edge is helpful for most public websites, but it is not free of costs and risks.
Advantages
- Faster pages for users everywhere.
- Lower origin load and a smaller origin bill.
- Built-in protection from attacks and floods.
- Better availability through failover and stale serving.
- Easy global reach without building servers in every country.
- Automatic certificates and modern protocols.
Disadvantages
- Stale data risk when TTLs are too long.
- Debugging is harder because there is another layer between user and origin.
- Configuration mistakes can cache private pages or block real users.
- Extra cost for features, requests, and data.
- Product change as Microsoft retires and replaces services.
- Little control over which individual edge serves a user.
Do you need an edge service?
| Situation | Recommendation | Why |
|---|---|---|
| Small internal tool used from one office | Probably not needed | Users are already close to the origin |
| Public website with local visitors only | Optional but useful | Offload, security, and certificates still help |
| Website with visitors on several continents | Strongly recommended | Distance is the main source of delay |
| Large downloads, video, or software updates | Essential | Edges carry the bulk of the traffic |
| Application with personalised pages only | Useful for acceleration and security, little caching | Little can be cached, but the faster path and the firewall still help |
19Common Mistakes and Anti-patterns
Most edge problems come from a handful of repeated mistakes. Learn them here, before they reach your visitors.
What it looks like
A logged-in page, such as “My account”, is cached at the edge because nobody set caching rules, and the edge’s default behaviour kept it.
Why it hurts
The next visitor may be shown the first visitor’s personal details. This is a serious privacy incident, and it can happen within minutes of going live.
Better approach
Mark personal responses as private and not cacheable at the origin, add an edge rule that bypasses the cache for those paths, and test with two different users before launch.
What it looks like
The origin sends no caching instructions, and the team never configures any, so the edge uses a default that does not suit the content.
Why it hurts
Either almost nothing is cached, giving a hit ratio near zero and no benefit, or things are cached for unexpected periods and users see old content.
Better approach
Set clear Cache-Control instructions at the origin for each kind of content, and review the edge’s override rules deliberately.
What it looks like
Every deployment ends with “purge everything” to make sure users see the latest files.
Why it hurts
The cache becomes empty after each release, so every visitor suddenly misses together. The origin gets a spike, pages slow down, and cost rises.
Better approach
Use versioned file names with long TTLs, keep page TTLs short, and purge only specific paths when needed.
What it looks like
The origin still accepts requests from anywhere, so attackers who learn its address talk to it directly and skip the firewall.
Why it hurts
All the protection at the edge becomes decoration. A flood or attack lands directly on the origin.
Better approach
Lock the origin so it only accepts traffic that arrives through your edge service.
What it looks like
Every link carries a unique tracking tag, and the edge treats each tag as a separate file.
Why it hurts
The hit ratio collapses, because no two requests share a cache key. The cache holds millions of identical copies.
Better approach
Ignore tracking parameters in the cache key, or include only the parameters that really change the content.
20Best Practices and a Setup Checklist
Good edge setups are built with a small set of dependable habits.
Do this
- Version static file names and give them very long TTLs.
- Set Cache-Control at the origin for every kind of content.
- Compress text content and resize images.
- Use HTTPS everywhere, including to the origin.
- Turn on the firewall with managed rules, then tune it.
- Use two or more origins with honest health probes.
- Lock the origin to accept only edge traffic.
- Watch hit ratio, errors, and transfer, with alerts.
Avoid this
- Caching anything personal or payment related.
- Purging the entire cache as a routine.
- Letting query strings multiply cached copies.
- Forgetting that each edge fills its cache separately.
- Leaving the origin open to the whole internet.
- Assuming default settings suit your content.
- Building on a product that is being retired.
- Ignoring the bill until it surprises you.
A step-by-step setup order
Choose the product
Check current Microsoft guidance and pick the supported edge service that fits your needs and budget.
Define the origins
Add your storage, web apps, or servers, ideally in more than one region, and set health probes.
Set caching rules
Decide per path what is cached, for how long, and how query strings are treated.
Add your domain and certificate
Connect your own website name and let Azure handle the certificate if possible.
Turn on security
Enable the firewall, rate limits, and origin protection.
Test before switching traffic
Use the edge’s own test address to confirm caching and security, then change your DNS to point at the edge.
Monitor and tune
Watch hit ratio and errors for a week, then adjust TTLs and rules.
21Troubleshooting: Symptoms and Likely Causes
When something looks wrong, work from the symptom to the layer that most likely causes it.
| Symptom | Likely cause | What to check |
|---|---|---|
| Users still see the old version of a file | The old copy is within its TTL | TTL and caching headers, then use a targeted purge or a new file name |
| Hit ratio is very low | No caching instructions, or too many different query strings, or cookies preventing caching | Cache-Control from origin, query string handling, rules for cookies |
| Pages are fast in one country and slow in another | Cold cache in the second location, or far origin on misses | Hit ratio by region, and origin location |
| Random errors from the edge | An unhealthy origin, or probe settings that are too strict | Health probe results and origin logs |
| Certificate warning in the browser | Domain not validated, or certificate expired or missing | Custom domain status and certificate status |
| Legitimate users blocked | Firewall rule too strict (false positive) | Firewall logs and matched rules, then tune |
| Origin overloaded after a launch | Many first-time misses at once | Pre-warm important files, add capacity, stagger the launch |
| Wrong or mixed user data shown | A personal page was cached | Remove the page from the cache immediately and fix the rules |
Debugging through an edge is like finding why a parcel is late when it passes through several hubs. You must check at which hub it waited. In the same way, check whether the answer came from the cache or the origin, because the fix is different for each.
Look at the response headers. Edge services usually add a header that says whether the file was a hit or a miss and which edge answered. This single clue often solves the mystery in seconds.
22Edge Locations, Data Residency, and Compliance
A cache is a copy, and copies of your content can end up in many countries. This matters when the law cares where data lives.
When you choose a region, you choose where your main data is stored. An edge service works differently: it keeps temporary copies in many places around the world, wherever your visitors happen to be. For public content such as pictures and scripts, this is exactly what you want. For regulated or private content, it needs thought.
Things to consider
- Public versus private data: public marketing files are fine to cache widely. Personal, health, or financial data should not be cached at the edge at all.
- Where TLS ends: secure connections end at the edge, so the edge briefly sees the content, even if it does not store it. Review the provider’s data handling statements.
- Logs: access logs that mention users can themselves count as personal data, so decide where they are stored and for how long.
- Regional controls: some products let you limit which parts of the world your content is served from. Check what is available and what it costs.
- Compliance documents: Microsoft publishes audit reports and certifications. Check that the edge service you chose is covered by the standards your industry needs.
A company can keep its original contracts in one locked vault in its home country, while handing out public brochures in every city. Nobody worries about the brochures travelling, but everybody worries if contracts were quietly photocopied and left in far-off offices. The edge is the brochure stand, not the vault.
If contracts or laws require data to stay within a country, speak to your legal and security teams before routing that data through a global edge service, and read Microsoft’s current data location documents.
23Real-World and Industry Examples
The scenarios below show typical uses of edge networks. They are general patterns, not descriptions of any named company’s private setup.
A global e-commerce site
An online store serves product photos, scripts, and style files from the edge, and routes shopping basket and payment calls through the edge to the nearest healthy regional application. During a big sale, nearly all image traffic never reaches the origin. A firewall blocks bots that try to grab limited-stock items.
A video streaming service
Video is cut into small pieces, called segments, which are cached close to viewers. Popular shows are requested constantly, so the hit ratio is very high. Some of the largest streaming companies go further and place their own servers inside internet providers’ networks, which shows how valuable proximity is for heavy traffic.
A software or game publisher
A publisher releases a large update. Millions of players download it within hours. Edge locations hold copies of the same update file near every group of players, and the publisher’s origin serves each file only a handful of times.
A news and media site
Articles are cached for short periods, such as a minute, while pictures and scripts are cached for long periods. A breaking-news editor can purge a single story at once when a correction is needed.
A software-as-a-service product
A business application serves its single-page front end from the edge, which makes the interface feel instant everywhere, while its personalised data calls are accelerated but not cached, and are routed to the nearest regional deployment.
A school or small business website
A simple site stored in a storage account, with a custom domain and certificate through an edge service, gets fast delivery, free-of-effort security upgrades, and automatic certificate renewal, without managing any web servers.
24Three Mini Labs to Learn by Doing
Each lab is small and ends with cleanup. Use the cheapest available options, and watch the cost page.
Lab 1: Serve a static site through an edge service
- Create a storage account, enable static website hosting, and upload a simple page and a picture.
- Create an edge service profile and add the storage endpoint as the origin.
- Open the page through the edge address, and then directly through the storage address. Compare how they respond.
- Look at the response headers for the hit or miss indicator. Reload several times and watch it change.
- Delete the resource group when finished.
What you learn: the difference between the origin and the edge, and how a first request misses and later ones hit.
Lab 2: Watch TTL in action
- Set a very short TTL for the picture, such as a minute, and request it twice quickly. Note the hit.
- Replace the picture at the origin with a different one under the same name. Request it again and see the old picture still shown until the TTL ends.
- Now upload a version with a new file name and update the page. Notice that the new picture appears immediately.
What you learn: why versioned file names beat waiting or purging.
Lab 3: Try a firewall rule
- Enable the firewall on your edge profile, if the chosen tier supports it.
- Add a simple custom rule that blocks requests to a path you choose, such as an admin page that does not exist.
- Request that path and confirm it is blocked at the edge. Look in the firewall log to see the matched rule.
- Remove the rule and delete the resource group.
What you learn: that the edge can reject unwanted requests before they reach your origin.
Firewall-capable tiers usually have a monthly base fee, even for short tests. Check the estimate and delete the profile as soon as you finish.
25A Beginner’s Glossary
Every important word from this guide in one place, each with a plain comparison.
| Term | Plain meaning | Everyday comparison |
|---|---|---|
| Edge location | A site close to users that caches and speeds up content | A neighbourhood shop |
| Point of presence (PoP) | Another name for an edge location | A branch of the shop chain |
| Origin | The real source of your content | The factory |
| CDN | A worldwide network of edge locations that deliver content | The whole chain of shops |
| Cache | A temporary stored copy | A book on your desk |
| Cache hit | The edge already had the file | The shop had it in stock |
| Cache miss | The edge had to fetch the file | The shop had to order it |
| Hit ratio | Share of requests answered from cache | How often the shop has what you want |
| TTL | How long a copy may be kept | A best-before date |
| Purge | Removing a cached file early | Pulling a loaf off the shelf |
| Revalidation | Asking the origin whether a copy is still current | Calling the bakery to check for a newer batch |
| Cache key | The label used to decide if two requests are for the same file | The title on a book’s spine |
| Query string | The part of an address after a question mark | A note scribbled on an order slip |
| Static content | Files the same for everyone | A printed poster |
| Dynamic content | Responses that depend on who asks | A personal bank statement |
| Anycast | One address announced from many places | A national helpline number |
| DNS | The internet’s phone book of names and addresses | A phone book |
| Peering | Direct connection between networks | A direct road between two cities |
| Health probe | A repeated test of whether an origin is alive | Asking a warehouse “are you open?” |
| Origin group | A set of origins serving the same content | A group of warehouses |
| WAF | A firewall that blocks common web attacks | A security gate |
| Latency | The travel time of a message | How long a letter takes |
| Egress | Data leaving a network | A toll on the way out |
26Frequently Asked Questions
Plain answers to what beginners ask most often.
27Summary and Key Takeaways
Key Takeaways
- An edge location, or point of presence, is a small site near users that caches content, secures traffic, and forwards requests, while your real application lives in an Azure region.
- Edges exist to cut distance-based delay, reduce origin load, absorb attacks and crowds, and add resilience.
- Users reach the nearest edge through DNS and anycast routing, and each edge keeps its own cache, which fills as local visitors ask for files.
- A cache hit is answered at the edge, while a miss goes to the origin. The cache hit ratio is the key measure of success.
- TTL decides how long a copy lives. Use versioned file names with long TTLs, short TTLs for pages, and never cache personal data.
- Handle query strings, compression, origin groups, and health probes deliberately, and lock your origin so it only accepts traffic through the edge.
- Use the firewall, certificates, rate limits, and logs at the edge, and watch hit ratio, errors, and transfer costs with alerts.
- Microsoft’s edge products are changing over time, so confirm current services, retirement notices, and edge locations on official pages before you build.