Text should not travel uncompressed from a global edge. Brotli usually wins on HTML, JS, CSS and JSON. Gzip remains the fallback. Images, video and zips should not be recompressed.
Negotiate at the edge
Cloud CDN applies Brotli or Gzip for eligible text. Origin can send uncompressed. Clients get the encoding they ask for.
Leave media alone
JPEG, WebP, MP4 and zip files are already compressed. Double compression wastes CPU and can enlarge the object.
Pair with hashed filenames
Compressed hashed assets can use long TTLs. You are not recomputing Brotli on every hit once the variant is cached.
APIs too
JSON bodies that pass through the edge are text. Brotli helps APIs as well as pages.
