Cache Management
Migrating cdnjs to serverless with Workers KV

Migrating cdnjs to serverless with Workers KV

9/10/2020 · Tyler Caslin

What this post added

This post details the migration of cdnjs from a traditional origin server infrastructure to a serverless architecture utilizing Cloudflare Workers and Workers KV. Key technical contributions include: 1. Replacing disk-based storage with a globally distributed key-value store (Workers KV) for static assets. 2. Addressing Workers KV's 10MiB value limit by pre-compressing assets (Brotli and gzip) to optimize storage and bandwidth. 3. Re-architecting the contribution process with a new GitHub repository (cdnjs/packages) and an automated bot for validation and updates, improving security and maintainability. 4. Implementing an auto-update service for packages, reducing manual intervention and potential for errors. 5. Enhancing the website and API for better package management and user experience.

Read the original post ↗