# 앱 서버 하나에 모든 것을 넣지 않는다

> Experience/App·Control·Execution·Governance 계층과 thin runtime

- Canonical: https://learning.reopt.ai/en/courses/enterprise-ai-platform/lessons/ep-m1-concept
- Language: en
- HTML: https://learning.reopt.ai/en/courses/enterprise-ai-platform/lessons/ep-m1-concept

---

[Enterprise AI platform](/en/courses/enterprise-ai-platform) 1. 플랫폼 계층과 AI 런타임 1 / 9

# 앱 서버 하나에 모든 것을 넣지 않는다

Experience/App·Control·Execution·Governance 계층과 thin runtime
Concept 45 XP 9 min

모델 호출·장기 작업·도구 실행·승인을 route handler 하나에 넣으면 timeout과 재시도가 side effect까지 반복합니다. 사용자-facing 응답은 AI SDK runtime, 모델 정책은 Gateway, 장기 상태는 Workflow, untrusted execution은 Sandbox로 분리합니다.
레이어는 제품 이름이 아니라 실패 경계 앱은 사용자 상호작용과 업무 요구를 소유하고, 제어면은 provider·budget·data policy를, 실행면은 durable state와 격리를, 거버넌스는 평가·감사·승인을 소유합니다.

| 계층 | 책임 | 경계 밖으로 보낼 것 |
| App/Experience | streaming·UI·업무 intent | 장기 실행·provider secret |
| Control | model route·budget·ZDR/BYOK | 사용자별 화면 로직 |
| Execution | workflow·queue·sandbox | 정책 판정·최종 승인 |
| Governance | eval·audit·approval·SLO | 실시간 token loop |

- 1 경로 분류 interactive·batch·long-running·untrusted execution을 나눕니다.

- 2 Thin app runtime 메시지·tool schema·streaming만 앱에 남깁니다.

- 3 정책 외부화 model string·provider·budget·data policy를 Gateway로 옮깁니다.

- 4 실행 격리 장기 상태와 code/file/network 실행을 별도 경계에 둡니다.

실무에 남길 기준

- 10초 넘는 작업은 timeout 연장보다 durable execution을 먼저 검토한다
- 모델 라우팅 정책은 앱 코드 밖의 제어면에서 운영한다
- 레이어 분리는 팀 조직도가 아니라 실패 반경을 줄이는 설계다

Got it · Continue

---

Site guide for agents: https://learning.reopt.ai/llms.txt · Sitemap: https://learning.reopt.ai/sitemap.xml · Contact: https://learning.reopt.ai/contact
