☁️

Cloudflare

Cloudflare is a CDN, DNS, and edge-computing platform built and run by Cloudflare Inc., offered as a freemium service with a generous free tier alongside paid plans. It ranks #12 among cloud/dev tools in usage surveys at roughly 20.1% share, and its network sits in front of a large share of all websites on the internet. Developers use it to speed up and protect sites (caching, DDoS mitigation, DNS) and to run serverless JavaScript at edge locations close to users via Cloudflare Workers.

Quick facts
Type: CDN / DNS / DDoS protection / edge-compute platform
Made by: Cloudflare, Inc.
License: Freemium (free tier + paid Pro/Business/Enterprise plans)
Platforms/Hosting: Fully managed global edge network (300+ cities)
Primary use case: Speeding up, securing, and running serverless code in front of a website or API
Jump to: ExampleGetting startedBest for

Example

Cloudflare Workers run plain JavaScript (or WASM) at edge locations, handling a request before it ever reaches an origin server.

export default {
  async fetch(request, env, ctx) {
    const url = new URL(request.url);

    // simple edge routing + cached JSON response
    if (url.pathname === '/api/hello') {
      return Response.json({ message: 'Hello from the edge' });
    }

    return new Response('Not found', { status: 404 });
  }
};

Getting started

Point your domain's nameservers at Cloudflare for free CDN/DNS, or use the Wrangler CLI to build and deploy a Worker.

# install the Wrangler CLI
npm install --global wrangler

# log in and scaffold a new Worker project
wrangler login
wrangler init my-worker

# deploy it to Cloudflare's edge
wrangler deploy
Best for: Sites and APIs of any size that want a free/cheap CDN and DDoS shield in front of them, and teams that want to run small pieces of logic (auth checks, redirects, A/B routing, lightweight APIs) at the edge instead of a full backend server.