Cloud CDN vs self-hosted nginx cache

nginx can cache in one region. Cloud CDN caches at 210+ PoPs with purge, TLS, HTTP/3 and Origin Shield as the product.

nginx is an excellent origin proxy. It is a poor global CDN. If you are using proxy_cache as your worldwide edge, you have a single-location cache with extra operational work.

Keep nginx next to the app

Routing, internal auth, and application-specific headers can stay on nginx. Cloud CDN sits in front and reduces how often nginx runs for public GETs.

What nginx will not give you

210+ PoPs, Anycast, 200+ Tbps, managed global TLS, image transformation as a service, and a purge API that is the product. You can build pieces. You will not finish.

Double cache needs a boss

If nginx and Cloud CDN both store HTML, pick who purges. Hashed assets can live in both. HTML should have one invalidation owner.

WebSockets and apps

nginx can terminate sockets. Cloud CDN can pass them through on the same public hostname so you do not split cookies and CORS across hosts.

Frequently Asked Questions

It can replace nginx as the public edge. Many teams still run nginx as origin.

No. Load balancers spread connections in a region. CDNs cache across regions.

You can leave a small origin cache. Do not run two uncoordinated HTML caches without purge discipline.

Put this on Cloud CDN.

Get started with our Management Console in less than 2 minutes, or connect with an expert to supercharge your business today.