If you work in digital television or OTT streaming, you know the cold sweat when a massive event like a football final is coming. The fear isn't so much that the CDN won't respond, but that your origin server decides to "call in sick" under the avalanche of requests.
If that's your case, let us tell you why you need a mid-tier layer. An instance that, besides acting as a second-level cache (L2), works as an intelligence filter, a shield, and — as a bonus — a cost-saving manager. All in one.
The funnel effect with request coalescing
Imagine 10,000 users requesting the same video fragment simultaneously. Without a mid-tier, your origin receives 10,000 screams asking for the same thing. With the mid-tier, request coalescing magic happens.
The mid-tier receives the requests, realizes they're all looking for the same .ts file, and tells the rest: "hold on, I'll go get it." It makes a single request to the origin, caches the file in its L2 cache, and delivers it to everyone simultaneously. Your origin doesn't even notice that an entire stadium is watching the screen.
Every device is a world
An old Smart TV, an iPhone, a console, or any device all have their quirks. Some send strange headers, others add telemetry parameters to the URL like ?user_id=123&session=abc. For a normal cache, each of these variations is a different file — chaos and cache misses.
The mid-tier applies header and query string normalization:
- Smart cleanup: ignores parameters that don't affect content (like user ID) for cache lookups.
- Canonicalization: reorders and standardizes requests so that
video.mp4?a=1&b=2andvideo.mp4?b=2&a=1are recognized as the same file. - Bonus benefit: your cache hit ratio (CHR) skyrockets, reaching above 98%.
Goodbye to evictions: elephant memory for your video
On edge nodes, space is expensive and content flies fast. If a video isn't trending in the last five minutes, it gets evicted to make room for new content.
The dedicated mid-tier, however, has massive storage capacity. It acts as intermediate video storage where long-tail content lives. Without constant evictions, it prevents edge nodes from having to fetch that old series episode from the origin. The mid-tier always has it ready.
Taming the Vary header
At the edge, the Vary header is both a blessing and a curse. If not handled properly, it fragments your cache into a thousand pieces. The Perimetrical mid-tier acts as a universal translator for common cases:
- Compression (Gzip vs. Brotli): why store the same thing twice? The mid-tier normalizes
Accept-Encodingrequests. - CORS: managing
OriginandAccess-Control-Allow-Originheaders can be chaotic with multiple domains. The mid-tier normalizes these headers so the Cache Key doesn't break. - Multi-language: if your content depends on
Accept-Language, the mid-tier groups requests. We don't need 50 variants for 50 shades of Spanish.
Multi-CDN environments: put your mid-tier in charge
Many broadcasters use multiple CDNs (CDN1 for some countries, CDN2 for others, CDN3 for live streaming…).
The problem without a mid-tier: every time a CDN misses its cache, it goes straight to your origin. With three CDNs, your origin gets triple the load!
The solution with a dedicated mid-tier places the mid-tier as a single entry point for all your CDNs:
- Load consolidation: no matter how many CDNs you have; for your origin, there's only one: your mid-tier. The savings in egress costs are simply massive.
- Unified logic: if you want to purge content or change a CORS rule, you do it on your mid-tier and it propagates to all CDNs.
- Independence: if one CDN has performance issues, you can move traffic to another without worrying about overloading your origin.
Multi-layer failover protection
In television, making mistakes is not an option. That's why we've designed a redundancy system that's Murphy's Law-proof:
- Standby dedicated mid-tier (Active-Passive): if the main mid-tier cluster has a problem, traffic is automatically diverted to a second standby mid-tier.
- Fallback to shared mid-tier: what if the entire dedicated infrastructure fails? No panic. The system diverts traffic to our global shared platform, ensuring broadcasting doesn't stop.
- Origin health checks: if the origin shows high latency, the mid-tier can serve stale (expired but valid) content so the viewer doesn't see a loading spinner.
The savings scenario: numbers that make the CFO smile
In a 1PB monthly scenario, the savings in egress costs can exceed €84,000 annually.
DDoS attack shielding
In a DDoS attack scenario, the mid-tier is your first line of defense. Your origin is no longer exposed to the internet and remains isolated. It only "talks" to the mid-tier.
Implementing a mid-tier is a sound technical decision because it protects your origin, makes your operations team happy, and saves the company a fortune in infrastructure costs.
Need to strengthen your web security? Our technical team can help you design the perfect protection strategy for your use case.
Get started