<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Peakhour.IO - Fastly</title><link href="https://www.peakhour.io/" rel="alternate"></link><link href="https://www.peakhour.io/feeds/tag/fastly.atom.xml" rel="self"></link><id>https://www.peakhour.io/</id><updated>2026-07-01T08:13:00+10:00</updated><entry><title>How to fix your Adobe Commerce Overages with Fastly</title><link href="https://www.peakhour.io/blog/fixing-adobe-commerce-cdn-overages/" rel="alternate"></link><published>2026-07-01T08:13:00+10:00</published><updated>2026-07-01T08:13:00+10:00</updated><author><name>Dan</name></author><id>tag:www.peakhour.io,2026-07-01:/blog/fixing-adobe-commerce-cdn-overages/</id><summary type="html">&lt;p&gt;If you're consistently going over your contracted CDN egress on your Adobe Commerce contract here's how you can easily fix it.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Adobe Commerce merchants do not usually notice Fastly overages straight away.&lt;/p&gt;
&lt;p&gt;Traffic looks normal. Revenue looks normal. The site feels fine. Then the bill lands and CDN usage is well above contract.&lt;/p&gt;
&lt;p&gt;In our experience, the drivers of CDN overages are due to Adobe Commerce and Fastly default behaviour.&lt;/p&gt;
&lt;p&gt;The biggest culprits are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;shielding&lt;/li&gt;
&lt;li&gt;ESI forcing uncompressed HTML from origin&lt;/li&gt;
&lt;li&gt;PNG-heavy catalogues and storefront assets&lt;/li&gt;
&lt;li&gt;bot traffic pouring fuel on all of the above&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We recently worked with Dymocks and helped them reduce their CDN usage from &lt;strong&gt;55 TB of monthly traffic down to 6 TB&lt;/strong&gt; after 
we fixed the waste in the delivery path and filtered unwanted traffic, case study coming soon.&lt;/p&gt;
&lt;h2&gt;1. Shielding helps performance, but it can hurt your bill&lt;/h2&gt;
&lt;p&gt;Fastly shielding exists for a good reason. It 
reduces origin load and can improve cache efficiency by funnelling misses through a shield POP before they go back to origin.&lt;/p&gt;
&lt;p&gt;The catch is billing.&lt;/p&gt;
&lt;p&gt;Fastly is clear that traffic from one POP to another counts towards both &lt;strong&gt;request count&lt;/strong&gt; and &lt;strong&gt;billable bandwidth&lt;/strong&gt;. 
In the most extreme case, if everything is effectively a pass, request count and delivery bandwidth can almost double 
because the request is handled by two Fastly POPs instead of one.&lt;/p&gt;
&lt;p&gt;That means a cache miss is no longer a simple edge-to-origin event. It becomes:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;edge → shield → origin → shield → edge&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If your cache hit rate is strong, that trade-off may still be worth it. If page caching is weak, purges are frequent, 
or large parts of the site are missing cache, shielding turns into a billing multiplier.&lt;/p&gt;
&lt;h2&gt;2. ESI (Edge Side Includes)&lt;/h2&gt;
&lt;p&gt;ESI is an old technology that allows a proxy (like Fastly) to 'assemble' pages using content fetched from another source.&lt;/p&gt;
&lt;p&gt;Adobe Commerce/Magento 2 will use ESI out of the box for its navigation bar. The reasoning is to allow the navigation
to be purged from the CDN independent of the page content. In theory this makes Full Page Caching more effective. In 
practise the difference is negligible as the Full Page Cache is cleared daily anyway. &lt;/p&gt;
&lt;p&gt;Fastly’s ESI documentation says ESI cannot be 
performed on content compressed at origin. Fastly needs to inspect the response body for &lt;code&gt;&amp;lt;esi:...&amp;gt;&lt;/code&gt; tags, and 
compressed content hides those tags from the parser.&lt;/p&gt;
&lt;p&gt;The default Fastly configuration for Adobe Commerce will strip the client &lt;code&gt;Accept-Encoding&lt;/code&gt; header
before the request goes to origin.&lt;/p&gt;
&lt;p&gt;The origin then returns &lt;strong&gt;uncompressed HTML&lt;/strong&gt;, Fastly scans it for ESI, and only later is the response compressed again 
at the EDGE before it is delivered to the browser.&lt;/p&gt;
&lt;p&gt;From the shopper’s point of view, nothing looks wrong. The page still arrives compressed at the edge. Performance may still look fine.&lt;/p&gt;
&lt;p&gt;From a billing point of view, it is a very different story.&lt;/p&gt;
&lt;p&gt;Magento’s default layout gives the top navigation block a &lt;a href="https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Theme/view/frontend/layout/default.xml"&gt;&lt;code&gt;ttl="3600"&lt;/code&gt; in &lt;code&gt;default.xml&lt;/code&gt;&lt;/a&gt;, which makes it an ESI candidate out of the box. The &lt;a href="https://github.com/fastly/fastly-magento/blob/master/app/code/community/Fastly/CDN/etc/vcl_snippets/fetch.vcl"&gt;Fastly Magento VCL snippets&lt;/a&gt; also show the downstream effect: Fastly sets &lt;code&gt;x-compress-hint&lt;/code&gt; because “varnish doesn't compress ESIs”, so compression is pushed later in the chain.&lt;/p&gt;
&lt;p&gt;Now combine that with shielding.&lt;/p&gt;
&lt;p&gt;Say your page is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;50 KB compressed&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;600 KB uncompressed&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If the request misses cache and shielding is enabled, you are not paying for a tidy 50 KB response. You are moving 
the &lt;strong&gt;600 KB&lt;/strong&gt; object through the shield path, and that larger object is counted across both the shield and edge legs.&lt;/p&gt;
&lt;p&gt;That is effectively a &lt;strong&gt;600 KB × 2&lt;/strong&gt; event.&lt;/p&gt;
&lt;p&gt;That is why broken page caching hurts twice:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;you get more misses&lt;/li&gt;
&lt;li&gt;each miss is much larger than most teams realise&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If enough HTML is missing cache, overages rise very fast.&lt;/p&gt;
&lt;h2&gt;3. A simple way to spot the problem in New Relic&lt;/h2&gt;
&lt;p&gt;An easy way to check for ESI driven egress is to open New Relic and look at CDN usage by content type. &lt;/p&gt;
&lt;p&gt;If &lt;strong&gt;&lt;code&gt;text/html&lt;/code&gt; is driving more usage than images&lt;/strong&gt;, that is a strong sign you are paying for uncompressed page responses on cache misses.&lt;/p&gt;
&lt;div class="text-center" style="padding: 20px 0px"&gt;
&lt;img src="/static/images/blog/esi-candidate.jpg" width="100%" alt="CDN Usage from New Relic Dashboard showing high HTML usage"/&gt;
&lt;em class="text-white"&gt;text/html content type being the top CDN usage content type is a red flag.&lt;/em&gt;
&lt;/div&gt;

&lt;p&gt;That pattern usually points back to the same combination:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ESI&lt;/li&gt;
&lt;li&gt;shielding&lt;/li&gt;
&lt;li&gt;weak cache hit rates&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On a healthy eCommerce site, images are usually the major share of bandwidth. When HTML starts dominating, something is off.&lt;/p&gt;
&lt;h2&gt;4. PNGs are another quiet cost driver&lt;/h2&gt;
&lt;p&gt;Fastly can absolutely turn a PNG into &lt;strong&gt;WebP&lt;/strong&gt;, but that does &lt;strong&gt;not&lt;/strong&gt; automatically mean you get a small lossy image.&lt;/p&gt;
&lt;p&gt;Fastly’s own Image Optimizer reference says that if the &lt;strong&gt;source image is a lossless format&lt;/strong&gt;, the output &lt;strong&gt;defaults to lossless&lt;/strong&gt; 
when the chosen output format supports it. Fastly is explicit about the PNG case: with a &lt;strong&gt;PNG source&lt;/strong&gt; and 
&lt;code&gt;format=webp&lt;/code&gt;, &lt;code&gt;format=jxl&lt;/code&gt;, or &lt;code&gt;format=auto&lt;/code&gt;, the &lt;strong&gt;output image is lossless by default&lt;/strong&gt;. In other words, Fastly can 
transform a PNG into a &lt;strong&gt;lossless WebP&lt;/strong&gt; unless you explicitly force a lossy path. &lt;/p&gt;
&lt;p&gt;That is why PNG-heavy catalogues can still burn a lot of bandwidth even when teams think Fastly is “optimising” them. 
The image format may change, but the delivery path can still stay lossless, which means the file is often much larger 
than expected. Fastly also notes that lossless output preserves all image data and therefore produces larger 
file sizes, basically the same as the source image.  &lt;/p&gt;
&lt;p&gt;This is where many Adobe Commerce stores get caught out. Most merchants rely on the default Fastly image setup and do 
not add per-image parameters or rewrites. Fastly’s documentation says that most image transformations require query string 
parameters on individual requests, and its default behaviour notes that WebP quality is 85 for &lt;strong&gt;lossy&lt;/strong&gt; WebP images, 
not that every PNG source is automatically pushed into lossy Webp.&lt;/p&gt;
&lt;p&gt;If you want smaller files, you need to force the outcome. Fastly says you can do that by using &lt;code&gt;format=auto&lt;/code&gt; with 
&lt;code&gt;quality&amp;lt;100&lt;/code&gt;, or by explicitly using a lossy WebP path. Adobe Commerce’s Fastly image optimisation settings also 
expose a &lt;strong&gt;Force lossy conversion&lt;/strong&gt; option for this reason. &lt;/p&gt;
&lt;h2&gt;What to do about it&lt;/h2&gt;
&lt;p&gt;You do not need a full replatform to reduce overages. Most of the wins come from cleaning up the delivery path.&lt;/p&gt;
&lt;h3&gt;Review shielding&lt;/h3&gt;
&lt;p&gt;Start by measuring shielding, not assuming it is free.&lt;/p&gt;
&lt;p&gt;Disabling shielding can be a fast way to cut billable traffic. The trade-off is lower cache efficiency and more origin load, so this needs testing, not guesswork.&lt;/p&gt;
&lt;h3&gt;Remove ESI where it is not earning its keep&lt;/h3&gt;
&lt;p&gt;On many Adobe Commerce builds, ESI is there mainly so the navigation block can be flushed independently.&lt;/p&gt;
&lt;p&gt;That is rarely a good reason to pay for inflated HTML misses.&lt;/p&gt;
&lt;p&gt;The usual fix is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;change the Magento layout or template so the block no longer needs ESI&lt;/li&gt;
&lt;li&gt;strip the &lt;code&gt;X-ESI&lt;/code&gt; path in VCL&lt;/li&gt;
&lt;li&gt;restore &lt;code&gt;Accept-Encoding&lt;/code&gt; to origin requests so HTML can travel compressed again&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is often the biggest bandwidth win because it reduces the size of every miss, not just edge delivery.&lt;/p&gt;
&lt;div class="text-center" style="padding: 20px 0px"&gt;
&lt;img src="/static/images/blog/esi-drop1.png" width="100%" alt="The effect of disabling ESI and enabling compression"/&gt;
&lt;em class="text-white"&gt;The immediate effect of disabling ESI and enabling compression from origin.&lt;/em&gt;
&lt;/div&gt;

&lt;h3&gt;Force lossy png conversions&lt;/h3&gt;
&lt;p&gt;Fortunately forcing lossy conversion of PNG images is relatively straightforward.&lt;/p&gt;
&lt;p&gt;Use VCL to rewrite image urls to include a query string, eg &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;    /someimage.png
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;becomes&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;    /someimage.png?format=auto&amp;amp;quality=85
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Expect a 400kb source image to go to 100kb for no discernable difference. Play with quality for bigger gains.&lt;/p&gt;
&lt;h2&gt;Do not ignore bots&lt;/h2&gt;
&lt;p&gt;Then there is the traffic you never wanted in the first place.&lt;/p&gt;
&lt;p&gt;Bad bots amplify every weakness above. They hit uncached pages, search pages, category pages, and dynamic endpoints. 
That creates more misses, more uncompressed HTML fetches, more shield traffic, and more wasted bandwidth.&lt;/p&gt;
&lt;p&gt;This is why CDN cost control is not just a caching conversation. It is also a traffic quality conversation.&lt;/p&gt;
&lt;p&gt;If you can stop junk traffic before it burns CDN bandwidth, the savings stack on top of the caching fixes.&lt;/p&gt;
&lt;p&gt;That is where Peakhour fits. We help stores cut unwanted bot traffic before it turns into Fastly overages, and the 
upside can be dramatic. For example, we've helped one store go from &lt;strong&gt;55 TB per month down to 6 TB&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;Final thought&lt;/h2&gt;
&lt;p&gt;If your Fastly bill feels out of proportion to real shopper demand, start with two questions:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why are we missing cache so often?&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Why is &lt;code&gt;text/html&lt;/code&gt; using so much bandwidth?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If those numbers look wrong, the overage usually stops being mysterious.&lt;/p&gt;</content><category term="CDN"></category><category term="Fastly"></category><category term="Adobe Commerce"></category><category term="Bot Management"></category></entry></feed>