Everything we learned from powering 20% of the Internet—yours by default

Cloudflare is your AI Cloud with compute, AI inference, and storage — letting you ship applications instead of managing infrastructure.

Start building

The cloud that works for developers, not the other way around

Deploy serverless functions, frontends, containers, and databases to 330+ cities with one command.

Build AI agents on durable objects with code execution, inference, AI gateway all built-in

"Cloudflare provided everything from OAuth to out-of-the-box remote MCP support so we could quickly build, secure, and scale a fully operational setup."

Architecture inspired by

Atlassian

Region: Earth

Our smart network positions your workloads optimally — close to users, close to data.

Run everywhere

Run code in 330+ cities around the world, within 50ms of 95% of the world's population.

Run anywhere

Run code near the user, database, or near your APIs. Our smart network will schedule your requests to optimize for the best latency.

Run at massive scale

Run on Cloudflare's infrastructure, supporting 449 Tbps of network capacity, serving over 81 million HTTP requests per second.

Cloudflare powers
1 in 5 sites on the Internet

Trusted by the teams you trust. And thousands more...

anthropic
canva
asana
atlassian
shopify
stripe
wix
block
intercom
doordash
coreweave
leonardo
anthropic
canva
asana
atlassian

Go from

in minutes

No DevOps. Minimal cold starts. No surprise bills.

From first line to full scale

Deploy working code in seconds or start from hundreds of templates — all built to scale.

See templates
Player 1
Player 2
import { routePartykitRequest, Server } from "partyserver";
  
import type { OutgoingMessage, Position } from "../shared";
import type { Connection, ConnectionContext } from "partyserver";

// This is the state that we'll store on each connection
type ConnectionState = {
  position: Position;
};

export class Globe extends Server {
  onConnect(conn: Connection<ConnectionState>, ctx: ConnectionContext) {
    // Whenever a fresh connection is made, we'll
    // send the entire state to the new connection
    
    // First, let's set up the connection state
    conn.setState({ position: { x: 0, y: 0 } });
    
    // Send current state to new connection
    this.broadcast(JSON.stringify({
      type: "user-joined",
      id: conn.id,
      position: conn.state.position
    }));
  }

  onMessage(message: string, sender: Connection<ConnectionState>) {
    const data = JSON.parse(message) as OutgoingMessage;
    
    if (data.type === "position-update") {
      sender.setState({ position: data.position });
      
      // Broadcast position update to all other connections
      this.broadcast(JSON.stringify({
        type: "position-update",
        id: sender.id,
        position: data.position
      }), [sender.id]);
    }
  }

  onClose(connection: Connection<ConnectionState>) {
    this.broadcast(JSON.stringify({
      type: "user-left"