Skip to main content
DevOps / Performance

Cutting a Next.js Site's Origin Transfer by 90%

How this portfolio went from blowing its Vercel bandwidth quota to serving 495 fully static pages from the CDN.

By Matthews Wong

Before
Visitor
SSR Functionrenders every view
1.6 MB / viewfull i18n payload
After
Visitor
Edge CDNprerendered, cached
~0 origin transferserved from cache
Client i18n payload
Before
1,589 KB
After
76 KB
Image weight
Before
54.7 MB
After
14.8 MB
Fast Origin Transfer / month
Before
15.13 GB
After
< 1.5 GB
┄ 10 GB plan limit
The fix: move rendering from request time to build time

Problem

This portfolio blew through its Vercel Fast Origin Transfer quota — 15.13 GB used against a 10 GB limit. Every page was dynamically SSR'd because next-intl's getMessages() without setRequestLocale forced dynamic rendering, and each response embedded a 1.6 MB i18n payload: the full text of 218 blog posts shipped to the client provider on every single page.

Approach

  1. 01

    Profiled origin transfer usage by path to find which routes were actually burning the quota.

  2. 02

    Added setRequestLocale so next-intl no longer forced dynamic rendering, enabling static rendering across the site.

  3. 03

    Stripped blog content from the client messages (1,589 KB → 76 KB, −95%), re-injecting only the current post's content on each blog page.

  4. 04

    Added generateStaticParams for all 436 blog paths so every post is prerendered at build time.

  5. 05

    Recompressed 67 images (54.7 MB → 14.8 MB), added immutable cache headers, and re-enabled ETags.

Outcome

495 pages are now prerendered and served from the CDN, origin transfer was cut by more than 90%, and LCP is no longer gated on a megabyte of JSON.

Engineering Deep Dives

Other case studies

Have a problem like this one?

I work on ERP systems, DevOps and production web apps. Tell me what you are dealing with.

Get in touch