Sentra Series — Deployment Architecture Baseline¶
Topologi default. Sistem spesifik yang punya komponen tambahan (mis. MQTT Broker untuk Membership, Local Hardware Driver untuk Laundry) tulis delta di systems/<x>/07-ops.md.
Topologi Standar¶
graph TB
subgraph "Edge Cabang"
A["POS Terminal (SQLite + SQLCipher)"]
B["Local Router / Mini PC"]
A -->|Offline Fallback| B
end
subgraph "Cloud Infrastructure (AWS / GCP)"
C["Cloudflare CDN & WAF"]
D["Load Balancer (ALB)"]
E["K8s Pod: API Service (NestJS)"]
F["K8s Pod: Sync Service (Go)"]
G[("Redis Cluster (ElastiCache)")]
H[("Aurora PostgreSQL Serverless")]
I["S3 / Object Storage"]
C --> D
D --> E
D --> F
E <--> G
F <--> G
E <--> H
F <--> H
E --> I
end
B -->|Encrypted HTTPS Trunk| C
Komponen¶
- POS Terminal: aplikasi desktop kasir (Electron/Tauri). Database lokal SQLite ter-enkripsi.
- Local Router: mini PC di cabang yang mengonsolidasi multi-terminal saat internet putus.
- Cloudflare: CDN + WAF + DDoS protection.
- K8s Pod: API Service: business logic NestJS, stateless, horizontal scale.
- K8s Pod: Sync Service: Go untuk endpoint sync (high concurrency).
- Aurora PostgreSQL: master DB, partisi per cabang.
- Redis Cluster: cache, session, Redlock, BullMQ queue.
- S3: object storage untuk lampiran, ekspor laporan, backup.
CI/CD Pipeline¶
- Source: GitHub repo per service
- Build: GitHub Actions
- Docker image push ke ECR/GCR
- POS Client
.msiWindows installer - Deploy: ArgoCD / GitHub Actions → EKS / GKE
- Rollout strategy: blue-green untuk API service, canary 10% untuk sync service
Observability Baseline¶
- Logs: stdout → CloudWatch / Loki
- Metrics: Prometheus + Grafana
- Tracing: OpenTelemetry → Jaeger / Tempo
- Alerts: PagerDuty / OpsGenie via Grafana Alerting
Backup & DR¶
- PostgreSQL: PITR + daily snapshot, retention 30 hari, cross-region replication
- Redis: AOF + RDB snapshot
- S3: versioning enabled, lifecycle ke Glacier setelah 90 hari