Turpentine Takes the Pain out of VCL-to-TypeScript Migrations
Varnish and its Varnish Configuration Language (VCL) were introduced 15 years ago as a powerful way to configure caching on servers. They seemed a natural fit for configuring CDNs—caching in the cloud. But the internet has evolved, and “CDNs” now handle far more than caching: load balancing, DDoS protection, rate limiting, transformations, synthetic responses, routing, and more. Above all, they must be programmable, not just configurable.
Configuration has shifted from a niche activity to a common and often involved requirement. Many teams tell us they want to eliminate dependency on the single person who knows how to make VCL configuration changes. Moreover, VCL is increasingly being pushed into roles it was never designed for. Customers report wanting to program the network rather than simply configure it—expectations beyond what VCL could ever deliver.
Yet migrations are notoriously difficult. Rewriting thousands of lines of mission-critical VCL from scratch is a daunting prospect that nobody wants to face.
Project Turpentine is a VCL-to-TypeScript converter designed to solve these problems. It provides an easy path to migrate legacy Varnish configurations to Cloudflare Workers—a serverless platform known for its speed. Moving to a Turing-complete language doesn’t mean sacrificing performance; Turpentine translates your VCL into code that runs on the fast Cloudflare edge while enabling you to take full advantage of Cloudflare’s proxy, firewall, load balancer, tiered caching, and shielding features. Configuration is then handled in TypeScript, one of the most widely used languages in the world, and generated code is human-readable and well commented—whether your VCL is standard or heavily customized.
How Turpentine Works
Turpentine uses a three-phase plan to turn VCL into optimized, human-readable TypeScript code:
- Parse and generate. The VCL is parsed, its meaning is understood, and TypeScript code preserving its intent is generated. This is more than transpiling: whenever functionality configured in the VCL has native Cloudflare support—such as rate limiting—the code is rewritten to use the best available solution.
- Clean and optimize. Turpentine scans the generated code for redundancies and inefficiencies and removes them, ensuring the result runs at full speed on Workers.
- Pretty print. The final step formats output so that any engineer on your team—not just infrastructure experts—can understand and program the network going forward.
Turpentine in the Real World
Turpentine is currently in private beta. It has already been used with very large customers managing very complicated VCL files, providing them a migration path without the usual pain points. There is no lengthy project plan, and no teams tasked with replicating each configuration line or verifying whether particular features existed in the previous setup.
During the private beta, interested parties can sign up via the registration form, and a Cloudflare engineer will assist teams in getting comfortable with their new infrastructure.



