Files
2nd/10_Wiki/Topics/Architecture/Cosmos_플랫폼_(Netflix).md
T
Antigravity Agent f8b21af4be Wiki cleanup: error-doc removal, dedup merge, link normalization
10_Wiki/Topics 대규모 정리:
- 오류 캡처/미완성 stub 문서 227개 제거
- 교차폴더 중복 43클러스터 병합 (63파일 → redirect)
- 링크명 정규화: 깨진 링크 수정·redirect 직결·개념 매핑 ~2,400건
- 카테고리 MOC 6개 신규 생성
- Graph 섹션 미해결 related-keyword 링크 10,058건 제거

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 23:52:15 +09:00

4.7 KiB
Raw Blame History

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-cosmos-플랫폼-netflix Cosmos 플랫폼 (Netflix) 10_Wiki/Topics verified self
Netflix Cosmos
Cosmos Platform
Cosmos
none A 0.85 applied
netflix
media-processing
workflow
microservices
2026-05-10 pending
language framework
java spring-boot

Cosmos 플랫폼 (Netflix)

매 한 줄

"매 Netflix 의 next-gen media computing platform". Reloaded (predecessor) 의 후계, 2018-2020 announce. Microservices + workflow orchestration + serverless functions 매 통합. Encoding, transcoding, content analysis, IMF processing 매 모든 media pipeline 의 backbone.

매 핵심

매 architecture (3 layers)

  • Optimus (API layer) — external-facing service, business logic, request validation.
  • Plato (Workflow layer) — Conductor-based workflow orchestration, retry, branching.
  • Stratum (Functions layer) — serverless compute, Titus (container) 위 실행.

매 design 원칙

  • Asynchronous everything — sync call 매 minimum, message-based.
  • Schema-first — Protobuf gRPC 매 contract.
  • Workflow as DSL — JSON workflow definition (Conductor).
  • Function granularity — small, idempotent, stateless.
  • Event-driven — Kafka, SQS 매 inter-service.

매 응용

  1. Video encoding pipeline — source → multiple bitrates × codecs.
  2. Image processing — title art, thumbnails, language variants.
  3. Subtitle / caption processing.
  4. Content quality control (QC) automation.
  5. IMF (Interoperable Master Format) ingestion.

💻 패턴

Workflow definition (Plato / Netflix Conductor)

{
  "name": "encode_video_v3",
  "version": 3,
  "tasks": [
    {
      "name": "probe",
      "type": "FUNCTION",
      "function": "stratum:ffprobe",
      "inputParameters": { "url": "${workflow.input.sourceUrl}" }
    },
    {
      "name": "fan_out_encode",
      "type": "FORK_JOIN_DYNAMIC",
      "dynamicForkTasksParam": "encodeTasks"
    },
    {
      "name": "join_results",
      "type": "JOIN"
    },
    {
      "name": "publish",
      "type": "FUNCTION",
      "function": "stratum:publishToCDN"
    }
  ]
}

Stratum function (Java, Spring Boot)

@CosmosFunction(name = "ffprobe")
public class FfprobeFunction implements Function<ProbeRequest, ProbeResponse> {
    @Override
    public ProbeResponse apply(ProbeRequest req) {
        var info = Ffmpeg.probe(req.url());
        return new ProbeResponse(info.duration(), info.codec(), info.bitrate());
    }
}

Optimus service (gRPC)

service EncodeService {
  rpc StartEncode(EncodeRequest) returns (EncodeResponse);
  rpc GetStatus(StatusRequest) returns (stream StatusUpdate);
}

Titus container deployment

# titus job definition
applicationName: stratum-ffprobe
container:
  image: registry/stratum/ffprobe:v42
  resources:
    cpu: 4
    memoryMB: 8192
    gpu: 0
  env:
    COSMOS_FUNCTION_NAME: ffprobe

Event-driven trigger (Kafka)

@KafkaListener(topics = "media.uploaded")
public void onUpload(MediaUploadedEvent event) {
    workflowClient.start("encode_video_v3", Map.of(
        "sourceUrl", event.getUrl(),
        "movieId", event.getMovieId()
    ));
}

Idempotency key (function level)

@CosmosFunction(idempotencyKey = "${input.movieId}-${input.bitrate}")
public class EncodeFunction implements Function<EncodeReq, EncodeResp> { ... }

매 결정 기준

상황 Approach
Long-running multi-step media job Plato workflow
Simple stateless transform Stratum function
External-facing API Optimus service
Realtime / sub-100ms NOT Cosmos (sync RPC service 따로)

기본값: workflow for any multi-step media pipeline; functions for individual steps.

🔗 Graph

🤖 LLM 활용

언제: workflow definition 생성, function template 생성, 운영 incident 매 root cause 분석. 언제 X: production workflow execution (deterministic 해야 함).

안티패턴

  • Stateful function: scale 못 함, retry 깨짐.
  • Long sync chain in Optimus: workflow 가야 할 것 매 sync call 로 묶음.
  • No idempotency: retry 매 duplicate side-effect.
  • Workflow too granular: orchestration overhead > work.

🧪 검증 / 중복

  • Verified (Netflix Tech Blog 2020 Rebuilding Netflix Video Processing Pipeline with Microservices).
  • 신뢰도 A.

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — full content covering Optimus/Plato/Stratum