We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design Masterclass · Web Content Delivery
Free preview: the first 2 parts of this 7-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Web Content Delivery
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
In 2015, Google released Brotli, a compression algorithm designed specifically for web content. Their key insight: web pages are not random text. They are built from a predictable vocabulary of HTML tags, CSS properties, JavaScript keywords, and URL patterns. Brotli ships with a pre-built dictionary of 120KB of these common web patterns. When compressing a <div class="container">, gzip has to learn that pattern from scratch. Brotli already knows it.
The result: 15-25% better compression than gzip on typical web content, with comparable decompression speed. Cloudflare rolled out Brotli in 2017 and measured a 17% average reduction in response sizes compared to gzip across their entire network. For a serving petabytes of traffic daily, that 17% translates to massive bandwidth savings.
Every major CDN (Cloudflare, CloudFront, Fastly, Vercel, Netlify) now serves Brotli by default. If your static assets are still gzip-only, switching to Brotli is free performance.
Both gzip and Brotli compress text by finding repeated patterns and replacing them with short references. The difference is in their dictionaries and algorithms:
Gzip (DEFLATE algorithm, 1996):
Brotli (2015):
The static dictionary is Brotli's superpower. Common strings like <html, </div>, function, return, https://, text/html, application/json are already in the dictionary. Brotli encodes them as short references without needing to discover them in the data first. This is why Brotli wins biggest on HTML, CSS, and JavaScript, those formats are built entirely from dictionary-friendly patterns.
For non-web content (database dumps, log files, binary data), the dictionary advantage disappears and Brotli's improvement over gzip shrinks to 5-10%.
It is easy and good
“It is really nice and good Please join the course”