Infra2025년 2월 13일1분 읽기

Edge Functions vs Serverless Functions — 완벽 비교

YS
YoungSam
조회 1970

핵심 차이점

  • Edge Functions: CDN 엣지에서 실행, Web API만 사용, 콜드스타트 거의 없음
  • Serverless Functions: 특정 리전에서 실행, Node.js 전체 API, 콜드스타트 있음

성능 비교

// Edge Function (Vercel)
export const runtime = "edge";
export async function GET() {
  // P50: 5ms, P99: 20ms
  return new Response("Hello from Edge");
}

// Serverless Function
export async function GET() {
  // P50: 50ms, P99: 500ms (콜드스타트)
  return Response.json({ data: "from serverless" });
}

인증, A/B 테스트, 지역화는 Edge, DB 작업은 Serverless가 적합합니다.

EdgeServerlessArchitecture

댓글 0

아직 댓글이 없습니다.