# ADR-014 — چرا از روز اول Kubernetes و microservice نه؟

Why defer Kubernetes and microservices?

Status: proposed · Date: 2026-10-15

## مسئله / Context

مرز منطقیِ ماژول با مرز deployment یکی نیست؛ نسخهٔ اول هنوز workload و HA مصوب ندارد.

Logical modules are not deployment boundaries; initial workload/HA requirements remain provisional.

## گزینه‌ها / Alternatives

یک codebase با API/worker جدا؛ چند microservice؛ Kubernetes از ابتدا.

One codebase with API/workers, multiple microservices, or Kubernetes immediately.

## انتخاب فعلی / Choice

پیشنهاد: اجرای محلیِ تکرارپذیر با API و worker و DB؛ orchestration پیچیده بعد از نیازِ اثبات‌شده.

Propose repeatable local API/worker/DB deployment; add orchestration after demonstrated need.

## چرایی و trade-off / Rationale and trade-off

عملیات کمتر برای یادگیری؛ در مقابل isolation و scaling مستقل محدودتر است و در ADR مقیاس دوباره بررسی می‌شود.

Fewer operations to learn initially, at the cost of less isolation and independent scaling; revisit under scale requirements.

## فرض‌ها / Assumptions

E01 پایلوت و E10 stress؛ تیمِ عملیات و cloud budget هنوز تعریف نشده‌اند.

E01 pilot/E10 stress; operations team and cloud budget are undefined.

## روش آزمون / Validation

اجرای تازه از README، crash یک worker، load و drain؛ bottleneck هر پردازش جدا دیده شود.

Fresh README-driven startup, worker crashes, load, draining, and per-process bottleneck visibility.

## بازنگری / Revisit

HA واقعی، noisy neighbor، scaling مستقل یا نیاز استقرار تیم‌ها می‌تواند deployment جدا را توجیه کند.

Real HA, noisy neighbors, independent scaling, or team deployment needs can justify separation.

DDIA: 1, 2, 7, 9
