docs(10_Wiki): Topic_Business/General/Graphic/Programming을 Topics/ 하위로 이동
최상위 10_Wiki/Topic_*였던 4개 카테고리 폴더를 10_Wiki/Topics/Topic_* 로 재배치. 콘텐츠 변경 없음(순수 폴더 이동) — Topics/ 하위 나머지 폴더는 이미 지난 커밋에서 전부 정리된 상태(잔존 항목은 에이전트 운영 상태 및 사용자가 보존을 요청한 업데이트0615/무제 3.canvas 뿐).
This commit is contained in:
@@ -0,0 +1,163 @@
|
||||
---
|
||||
id: wiki-2026-0508-cosmos-플랫폼-netflix
|
||||
title: Cosmos 플랫폼 (Netflix)
|
||||
category: 10_Wiki/Topics
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [Netflix Cosmos, Cosmos Platform, Cosmos]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.85
|
||||
verification_status: applied
|
||||
tags: [netflix, media-processing, workflow, microservices]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
tech_stack:
|
||||
language: java
|
||||
framework: 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)
|
||||
```json
|
||||
{
|
||||
"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)
|
||||
```java
|
||||
@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)
|
||||
```protobuf
|
||||
service EncodeService {
|
||||
rpc StartEncode(EncodeRequest) returns (EncodeResponse);
|
||||
rpc GetStatus(StatusRequest) returns (stream StatusUpdate);
|
||||
}
|
||||
```
|
||||
|
||||
### Titus container deployment
|
||||
```yaml
|
||||
# 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)
|
||||
```java
|
||||
@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)
|
||||
```java
|
||||
@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
|
||||
- 부모: [[Microservices]]
|
||||
- 변형: [[Temporal]]
|
||||
- Adjacent: [[Spinnaker]]
|
||||
|
||||
## 🤖 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 |
|
||||
Reference in New Issue
Block a user