Edge Computing with Cloudflare Workers
Making Cloudflare Pages the fastest way to serve your sites

Making Cloudflare Pages the fastest way to serve your sites

6/23/2023 · Sid Chatterjee, Daniel Walsh, Nevi Shah

What this post added

This post details the technical solution for improving Cloudflare Pages' performance by migrating from an O(n) routing lookup mechanism (parsing large JSON routing tables and iterating through regexes) to an O(1) lookup mechanism using Workers for Platforms. The new approach involves hashing the deployment's hostname at deployment time and using this hash for runtime lookups. This significantly reduced Time To First Byte (TTFB) by up to 10x for Pages sites. The post also describes the large-scale migration strategy for over 14 million deployments, including A/B testing, phased rollouts, and ensuring zero downtime for customers.

Read the original post ↗