Cloud platform

Cloudflare

Building and running apps on Cloudflare's network: Workers for the code, D1 for the database, R2 for files, and the rest of the platform around them.

What runs on Cloudflare

  • HelloRestaurant

    A Next.js app on Workers through OpenNext, with a D1 database, R2 storage, email sending, and a cron trigger every 15 minutes for reminders and summaries.

  • HeySales

    A vinext app on Workers with a D1 database and email sending, plus the visit tracker and embeddable forms other sites load.

  • myab

    Seven Workers: the website and its www redirect, the dashboard, docs and API, the CDN that serves the SDK, and an ingest Worker that feeds a Queue, with running totals in D1 and raw events in R2.

  • This website

    Static pages served by a Worker, which also runs the free tools on this site, with a rate limit on each.

What we know to watch for

  • Node libraries

    Some libraries assume a full Node.js server. Google's official client failed for us on Workers, so we replaced it with plain fetch calls.

  • D1's rules

    No interactive transactions, at most 100 bound parameters per query, and SQLite's SQL. We've written up the rules that caught us out.

  • Work after the response

    Unfinished work is cancelled once the response is sent, so emails and other follow-ups go through waitUntil.

Technologies

  • Workers
  • D1
  • R2
  • Queues
  • Cron Triggers
  • Email Sending
  • Workers Static Assets
  • Rate Limiting
  • Wrangler

Questions

Is Cloudflare Workers right for our app?

For most web apps and APIs, yes: no servers to manage, and costs that grow with use. Long-running jobs, large file processing and some Node libraries are better elsewhere.

Tell us what you're building.

Email us about your project: what it needs to do, who it's for and when you'd like it live.