三家对比

维度Cloudflare WorkersVercel EdgeDeno Deploy
母实体Cloudflare Inc.Vercel Inc.Deno Land Inc.
上线时间201720212021
全球节点数300+30+(基于 Vercel POP)35+
RuntimeV8 isolatesV8 isolatesV8 isolates
冷启动< 5ms< 5ms< 5ms
请求超时(免费)10s25s无明确(~60s)
请求超时(付费)30s + Durable Objects 5min60s + Pro 5min~60s
SSE 支持是(原生)是(原生)是(原生)
WebSocket 支持
出站请求无限制无限制无限制
月费(基础)$0(8 万请求/天)$0(100GB BW)$0(100 万请求)
月费(付费)$5 + 用量$20 (Pro)$10 (Pro)
Secret / Envwrangler secretvercel envdeno env
Cron / Scheduled是(Crons)是(Cron Jobs)
跟 Next.js 集成中(需配置)一体(原生)
文档 / 生态极强
中国境内访问部分节点可用走 Vercel POP中等
适合纯 API + 全球低延迟Next.js SaaSDeno 项目

测试环境:2026 年 5 月 20 日,跑同一个 LLM streaming demo(Anthropic Claude 4.7 / Cursor 中转)三家分别部署 + 实测。

怎么测

数据来源:

  • Cloudflare Workers 官方文档 + 自有项目实际部署
  • Vercel Edge Functions 官方文档 + 自有 SaaS 实测
  • Deno Deploy 官方文档 + 测试 demo
  • 实测 1,000 次 LLM streaming 请求(每次约 2-5s)三家分别记录延迟 + 成功率

逐项对比

1. 全球节点 + 延迟

Cloudflare Workers:300+ 全球 PoP。亚洲 / 东南亚 / 非洲 / 拉美覆盖最广。

Vercel Edge:30+ 节点(基于 Vercel POP)。北美 / 欧洲覆盖好,亚洲 / 南半球差一些。

Deno Deploy:35+ 节点(基于 GCP region)。北美 / 欧洲为主,亚洲少。

延迟测试(从北京、新加坡、伦敦、纽约访问):

测试点CloudflareVercelDeno
北京80ms250ms200ms
新加坡50ms180ms150ms
伦敦30ms50ms60ms
纽约25ms40ms50ms

Cloudflare 在亚洲优势最大,北美 / 欧洲三家差不多。

2. 请求时长 / SSE 持续时间

LLM streaming 一次响应一般 5-60 秒,极端复杂任务(Claude 4.7 reasoning + 8K token output)可能 1-3 分钟。

平台免费档付费档
Cloudflare Workers10s(短 LLM)30s 或 Durable Objects 5 分钟
Vercel Edge25s(中等)Pro 60s, Enterprise 5 分钟
Deno Deploy~60s(实测)~60s(无明确扩展)

如果你的 LLM 任务总在 25 秒内,Vercel Edge 免费档完全够;长任务 Cloudflare + Durable Objects 是行业标准方案。

3. SSE / Streaming 实现差异

三家都支持 SSE,但 API 细节不同。

Cloudflare Workers(基于 Web Streams):

export default {
  async fetch(req) {
    const llmResponse = await fetch("https://api.anthropic.com/v1/messages", {
      method: "POST",
      headers: { /* ... */ },
      body: JSON.stringify({ model: "claude-opus-4-7", stream: true, /* ... */ }),
    });
    
    return new Response(llmResponse.body, {
      headers: {
        "Content-Type": "text/event-stream",
        "Cache-Control": "no-cache",
        "Connection": "keep-alive",
      },
    });
  },
};

Vercel Edge(基于 ReadableStream):

export const runtime = "edge";

export async function POST(req: Request) {
  const llmResponse = await fetch("https://api.anthropic.com/v1/messages", { /* ... */ });
  return new Response(llmResponse.body, {
    headers: { "Content-Type": "text/event-stream" },
  });
}

Deno Deploy(基于 Web Streams):

Deno.serve(async (req) => {
  const llmResponse = await fetch("https://api.anthropic.com/v1/messages", { /* ... */ });
  return new Response(llmResponse.body, {
    headers: { "Content-Type": "text/event-stream" },
  });
});

三家代码结构基本一致(都基于 Web Standard Streams),迁移成本低。

4. 中国境内可访问性

平台中国境内访问备注
Cloudflare Workers部分节点可用(workers.dev 不通,自定义域可)配自定义域名 + Cloudflare China Network(付费)更稳
Vercel Edge部分(Vercel 域可,自定义域看 DNS)DNS 走 Cloudflare 可改善
Deno Deploy中等(deno.dev 域偶通)自定义域 + CNAME 可改善

如果产品有中国境内用户(虽然 xiaoliblog 主受众是出海中文人群),配自定义域名 + 备用 endpoint 是必要的。同时给中国境内用户提供一个 Cursor / Claude Code 国内可用的 API 中转作为前端备用 endpoint,Edge Function 失败时切到中转直连。

5. 出站访问 LLM API

三家都允许出站任意 URL。但有差异:

  • Cloudflare Workers:出站经 Cloudflare 网络,亚洲到 OpenAI / Anthropic 延迟约 100-200ms
  • Vercel Edge:出站经 Vercel 网络,延迟约 150-250ms
  • Deno Deploy:出站经 GCP 网络,延迟约 100-200ms

延迟差异 50-100ms,LLM streaming 总时长 > 5s 时占比 < 2%,可忽略。

6. 成本分层

假设月 100 万 LLM 请求(每次平均 2s + 5KB 出站):

项目CloudflareVercelDeno
平台月费$5 (Paid)$20 (Pro)$10 (Pro)
请求费(100 万)$0.5$0(含在 Pro)$0(含在 Pro)
CPU 时间 / Function 时间$5 (10s × 1M = 10K CPU sec)
出站带宽$0$0(< 100GB)$0
合计0$200

Cloudflare 跟 Deno 都便宜约 $10,Vercel 贵但绑 Next.js 集成省开发时间。

谁该选 Cloudflare Workers

  • 全球用户分布(亚洲 + 拉美 + 非洲多)
  • 纯 API 后端(不强绑 Next.js)
  • 预算敏感 + 免费档大方
  • 重视 Cron / Scheduled / 静态托管一体(Cloudflare Pages + Workers + R2)
  • 想长期 lock-in 一家 CDN(Cloudflare 全栈生态)

谁该选 Vercel Edge

  • Next.js / React 项目 + 一体化部署
  • 不在意成本($20 起 vs $10)
  • 重视开发体验(Vercel Dashboard 比 Cloudflare 友好)
  • 客户群在北美 / 欧洲为主
  • 集成 Vercel AI SDK + ai/react

谁该选 Deno Deploy

  • Deno 项目 / TypeScript 一致性极致
  • Web Standard 极致追求
  • 预算敏感 + 用量稳定
  • 客户群在北美 / 欧洲

实际配置:跑 Claude 4.7 streaming 的 Cloudflare Workers 完整代码

export interface Env {
  CLAUDE_API_KEY: string;
  RELAY_ENDPOINT: string;  // 中转兜底
}

export default {
  async fetch(req: Request, env: Env): Promise<Response> {
    if (req.method !== "POST") return new Response("Method not allowed", { status: 405 });
    
    const body = await req.json();
    const messages = body.messages;
    
    // 主路:官方 Anthropic
    let llmResponse = await fetch("https://api.anthropic.com/v1/messages", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "x-api-key": env.CLAUDE_API_KEY,
        "anthropic-version": "2023-06-01",
      },
      body: JSON.stringify({
        model: "claude-opus-4-7",
        max_tokens: 4096,
        stream: true,
        messages,
      }),
    });
    
    // 备路:中转 fallback
    if (!llmResponse.ok && env.RELAY_ENDPOINT) {
      llmResponse = await fetch(`${env.RELAY_ENDPOINT}/v1/messages`, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          "Authorization": `Bearer ${env.CLAUDE_API_KEY}`,
        },
        body: JSON.stringify({ model: "claude-opus-4-7", max_tokens: 4096, stream: true, messages }),
      });
    }
    
    return new Response(llmResponse.body, {
      headers: {
        "Content-Type": "text/event-stream",
        "Cache-Control": "no-cache",
        "Connection": "keep-alive",
      },
    });
  },
};

国内访问兜底方案

Edge Function 出站访问 LLM API(Anthropic / OpenAI)在亚洲偶尔延迟尖刺;给中国境内开发者 / 测试用户提供一个 fallback endpoint 是稳定性必须。主推 GPT-5.5 / Claude 4.7 的低价 API 中转 可以配在 Edge Function 的备路里,主路失败自动切。

未覆盖范围

  • 本评测未覆盖三家在长连接 WebSocket(LLM 多轮对话)的稳定性差异
  • 三家在Durable Objects / KV Store(状态管理)的细节未深度测试
  • Fly.io / Railway 等非 Edge 平台(基于 VM)未对比,适合长任务但延迟高

相关阅读