Powered by Cloudflare
Imperial uses Cloudflare’s global CDN network to deliver your media with industry-leading performance. With 310+ data centers in 120+ countries, your content is served from the location closest to your users.Network Statistics
310+ Data Centers
Spanning every continent
120+ Countries
Global presence
<50ms Latency
95th percentile worldwide
How CDN Caching Works
When someone requests your image or video, here’s what happens:1
User Makes Request
A user in Tokyo requests your image:
https://cdn.imperial.gay/uploads/user-id/cat.jpg2
Cloudflare Routing
The request is automatically routed to the nearest Cloudflare data center (Tokyo)
3
Cache Check
Cloudflare checks if the file is already cached at that location
4
Cache Hit (Fast Path)
If cached → File is delivered instantly (~10-30ms)
5
Cache Miss (First Time)
If not cached → Fetch from R2 storage → Cache at edge → Deliver to user
6
Subsequent Requests
Future requests from that region are served from cache instantly
Performance Comparison
Traditional vs CDN Delivery
- Without CDN
- With Imperial CDN
User in Sydney requests file from US server:
That’s 23x faster! CDN delivery can reduce load times from seconds to milliseconds.
Cache Strategy
Imperial’s CDN caching is optimized for media delivery:Cache Rules
Images (JPEG, PNG, WebP)
Images (JPEG, PNG, WebP)
- Cache Duration: 30 days
- Cache Key: Full URL
- Cache Control:
public, max-age=2592000, immutable - Optimization: Served from edge with Cloudflare Polish (auto-optimization)
Videos (MP4, WebM)
Videos (MP4, WebM)
- Cache Duration: 30 days
- Cache Key: Full URL
- Streaming: Range request support for smooth playback
- Optimization: Adaptive bitrate delivery when available
Video Thumbnails
Video Thumbnails
- Cache Duration: 90 days (rarely change)
- Format: Optimized JPEG
- Purpose: Fast gallery loading
Global Performance
Average Latency by Region
| Region | First Load | Cached Load |
|---|---|---|
| North America | 100-150ms | 20-40ms |
| Europe | 80-120ms | 15-35ms |
| Asia | 90-140ms | 18-38ms |
| South America | 120-180ms | 25-45ms |
| Oceania | 110-160ms | 22-42ms |
| Africa | 130-200ms | 28-50ms |
Advanced Features
HTTP/3 Support
Imperial supports HTTP/3 (QUIC protocol) for even faster connections:- Faster connection establishment
- Better performance on mobile networks
- Improved handling of packet loss
- Multiplexed streams
Brotli Compression
Text-based responses (JSON, HTML) are compressed with Brotli:- 20-30% smaller than Gzip
- Faster decompression on modern devices
- Automatically enabled for all API responses
Early Hints (103 Status Code)
Cloudflare sends early hints to browsers while the origin processes requests, allowing browsers to start loading resources sooner.Cache Warming
Popular content automatically stays cached across the global network:1
Initial Upload
File is stored in R2 (origin storage)
2
First Request
File is cached at the requesting edge location
3
Popularity Detection
If file receives multiple requests, Cloudflare proactively caches it at more locations
4
Global Distribution
Viral content automatically spreads across all 310+ edge locations
Smart Routing
Cloudflare’s Argo Smart Routing optimizes the path between edge and origin:DDoS Protection
Built-in protection against attacks that could slow down your content:Layer 3/4 Protection
Mitigates network-layer attacks automatically
Layer 7 Protection
Filters malicious application-layer requests
Always Online
Serves cached content even if origin is down
Rate Limiting
Prevents abuse and ensures fair usage
Mobile Optimization
Special optimizations for mobile devices:Connection Quality Adaptation
Cloudflare detects connection quality and adapts delivery:- Fast WiFi/5G: Full quality, parallel connections
- 4G: Moderate optimization, pipelined requests
- 3G/Slow: Aggressive compression, sequential loads
Image Optimization
For supported devices, images are automatically optimized:- Format conversion: Serve WebP/AVIF to supporting browsers
- Size optimization: Reduce file size without quality loss
- Lazy loading hints: Suggest browser-level lazy loading
Monitoring & Analytics
Track your CDN performance in real-time:Cache Status Values
| Status | Meaning |
|---|---|
HIT | Served from cache (fast!) |
MISS | First request, fetched from origin |
EXPIRED | Cache expired, revalidating |
STALE | Serving stale while revalidating |
BYPASS | Cache bypassed (e.g., query parameters) |
Best Practices
File Names: Use meaningful, permanent filenames. Imperial automatically generates stable URLs.
Technical Deep Dive
Anycast Network
Cloudflare uses Anycast routing where all edge locations share the same IP addresses:Cache Hierarchy
Get Started
Experience the speed difference:Upload Your First File
See how fast global delivery can be

