Files
2nd/10_Wiki/Topics/Domain_Programming/Frontend/콘텐츠 기반의 이커머스 및 뉴스 웹사이트 성능 튜닝.md
T
Antigravity Agent c24165b8bc refactor(topics): 멀티 에이전트용 지식 재편 — _Common(공통 기본기) + Domain_* 구조
에이전트 8종(대화형/프로그래머 C·S/디자이너/설계자/기획자/QA/PD/PM)에게
[공통 기본 능력 + 롤별 Specialty] 2층으로 지식을 주입하기 위한 재분류.
문서 내용·포맷은 무수정, 폴더 이동만 (6,372개 문서 수 보존 확인).

- Topic_Programming → Domain_Programming (내부 구조 보존)
- Topic_Graphic → Domain_Design
- Topic_Business → Domain_Product
- Topic_General → Domain_General
- _Common 신설: Math(구 Topic_Math_Specialty), Reasoning(구 General/From_Thinking & Reasoning),
  Reasoning_Creativity(구 General/From_창의성), Communication(Poetic_Blog_Writing + From_writing)
- 타 도메인의 From_* 폴더는 유지 (출처 표기일 뿐, 이미 도메인에 맞게 분류된 문서)
- 빈 폴더 정리 (memory/procedures)
- 에이전트→폴더 매핑은 workspace의 .astra/agent-knowledge-map.json (9개 에이전트)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 11:05:56 +09:00

4.9 KiB

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-콘텐츠-기반의-이커머스-및-뉴스-웹사이트-성능-튜닝 콘텐츠 기반의 이커머스 및 뉴스 웹사이트 성능 튜닝 10_Wiki/Topics verified self
Content Site Performance
E-commerce Tuning
News Site Tuning
none A 0.9 applied
frontend
performance
ecommerce
news
isr
edge-caching
2026-05-10 pending
language framework
typescript nextjs

콘텐츠 기반의 이커머스 및 뉴스 웹사이트 성능 튜닝

매 한 줄

"매 이커머스 와 뉴스 는 매 LCP 와 매 traffic spike 가 매 매출 / engagement 에 매 직결". 매 1 초 LCP 개선 = Amazon $1B/yr (고전), Pinterest +15% conversion. 매 2026 stack — Next.js 15 + ISR + Edge / CDN + Image optim — 가 매 default playbook.

매 핵심

매 두 도메인 의 차이

  • 이커머스: 매 product page 의 매 LCP (image), 매 PDP 의 매 INP (variant select), 매 cart 의 매 freshness.
  • 뉴스: 매 article 의 매 LCP (cover image / headline), 매 publishing speed (ISR ≤ 60s), 매 ad / tracker 부하.

매 핵심 lever

  • ISR (Incremental Static Regeneration): build-time SSG + runtime revalidate.
  • Edge caching: Vercel / Cloudflare / Fastly 의 매 stale-while-revalidate.
  • Image CDN: Cloudinary / imgix / Next Image — 매 AVIF + responsive.
  • Streaming SSR: RSC + Suspense → 매 TTFB 개선.
  • Third-party tax 최소화: GTM / pixel — 매 Partytown 또는 server-side tracking.

매 응용

  1. Shopify Hydrogen / Next Commerce.
  2. NYT, WaPo, Bloomberg 식 article.
  3. Medium / Substack 식 long-tail.

💻 패턴

ISR (Next 15)

// app/products/[id]/page.tsx
export const revalidate = 60; // 매 60초 ISR

export default async function Product({ params }) {
  const product = await getProduct(params.id);
  return <ProductView product={product} />;
}

export async function generateStaticParams() {
  const top = await getTopProducts(1000); // 매 top 1000 prebuild
  return top.map(p => ({ id: p.id }));
}

On-demand revalidation

// app/api/revalidate/route.ts
import { revalidatePath } from "next/cache";

export async function POST(req: Request) {
  const { path, secret } = await req.json();
  if (secret !== process.env.REVALIDATE_SECRET) return new Response("nope", { status: 401 });
  revalidatePath(path);
  return Response.json({ revalidated: true });
}

Streaming SSR (RSC + Suspense)

export default function ArticlePage({ params }) {
  return (
    <>
      <ArticleHeader id={params.id} /> {/* 매 즉시 stream */}
      <Suspense fallback={<CommentsSkeleton />}>
        <Comments id={params.id} /> {/* 매 below-fold */}
      </Suspense>
    </>
  );
}

Edge runtime (latency 최소)

export const runtime = "edge";

export default async function Page() {
  const data = await fetch("https://api...", { next: { revalidate: 30 } });
  return <View data={await data.json()} />;
}

Image responsive + priority

<Image
  src={product.cover}
  alt={product.name}
  width={800} height={600}
  sizes="(max-width: 768px) 100vw, 50vw"
  priority={isAboveFold}
  quality={80}
/>

Partytown (3rd-party off main thread)

import Script from "next/script";

<Script src="https://www.googletagmanager.com/gtm.js?id=GTM-XXX"
        strategy="worker" />

Cache header (CDN-friendly)

return new Response(html, {
  headers: {
    "Cache-Control": "public, s-maxage=60, stale-while-revalidate=600",
  },
});

매 결정 기준

페이지 타입 전략
Product Detail (top seller) SSG + ISR(60s) + Edge
Product Detail (long tail) SSR streaming
Cart / Checkout SSR (no cache, fresh)
News article SSG + ISR(30s) + on-demand
Live ticker RSC + WebSocket

기본값: Next 15 App Router + ISR + Edge runtime + Next/Image + Partytown.

🔗 Graph

🤖 LLM 활용

언제: 매 traffic-heavy content site, 매 PLP/PDP, 매 article-driven SEO. 언제 X: 매 internal admin, 매 auth-only SaaS.

안티패턴

  • Cart 까지 ISR: 매 stale price → 매 trust 붕괴.
  • 3rd-party 30+ scripts on main thread: 매 INP 폭주.
  • Image 원본 그대로: 매 5MB JPG → LCP 5초.
  • ISR revalidate 너무 짧음 (1s): 매 origin 부하.

🧪 검증 / 중복

  • Verified (Vercel docs, web.dev case studies, Cloudflare Workers).
  • 신뢰도 A.

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — content site tuning playbook