docs(deployment): update memory limits and celery concurrency across all guides
Some checks failed
CI / validate (push) Has been cancelled
CI / dependency-scanning (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / ruff (push) Successful in 11s
CI / pytest (push) Has been cancelled

Sync all deployment docs with actual docker-compose.yml values:
- celery-worker: 512→768MB, concurrency 4→2
- db: 512→256MB, celery-beat: 256→128MB, flower: 256→192MB
- Redis maxmemory: 256mb→100mb (matches container mem_limit 128m)
- Add redis-exporter to scaling guide memory budget

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-01 22:21:25 +01:00
parent f631322b4e
commit f631283286
5 changed files with 20 additions and 19 deletions

View File

@@ -18,21 +18,22 @@ Practical playbook for scaling Orion from a single CAX11 server to a multi-serve
| Container | Limit | Purpose |
|-----------|-------|---------|
| db | 512 MB | PostgreSQL 15 |
| redis | 128 MB | Task broker + cache |
| db | 256 MB | PostgreSQL 15 |
| redis | 128 MB | Task broker (maxmemory 100mb, allkeys-lru) |
| api | 512 MB | FastAPI (Uvicorn) |
| celery-worker | 512 MB | Background tasks |
| celery-beat | 256 MB | Task scheduler |
| flower | 256 MB | Celery monitoring |
| **App subtotal** | **2,176 MB** | |
| celery-worker | 768 MB | Background tasks (concurrency=2) |
| celery-beat | 128 MB | Task scheduler |
| flower | 192 MB | Celery monitoring |
| **App subtotal** | **1,984 MB** | |
| prometheus | 256 MB | Metrics (15-day retention) |
| grafana | 192 MB | Dashboards |
| node-exporter | 64 MB | Host metrics |
| cadvisor | 128 MB | Container metrics |
| redis-exporter | 32 MB | Redis metrics |
| alertmanager | 32 MB | Alert routing |
| **Monitoring subtotal** | **672 MB** | |
| **Total containers** | **2,848 MB** | |
| OS + Caddy + Gitea + CI | ~1,150 MB | Remaining headroom |
| **Monitoring subtotal** | **704 MB** | |
| **Total containers** | **2,688 MB** | |
| OS + Caddy + Gitea + CI | ~1,300 MB | Remaining headroom |
---
@@ -164,14 +165,15 @@ Update `DATABASE_URL` in API and Celery to point to PgBouncer instead of `db` di
### 3. Redis Hardening
Set a `maxmemory` policy to prevent OOM:
Redis `maxmemory` is already configured in `docker-compose.yml`:
```yaml
# In docker-compose.yml, add command to redis service
redis:
command: redis-server --maxmemory 100mb --maxmemory-policy allkeys-lru
```
If Redis usage grows beyond 80%, the `RedisHighMemoryUsage` alert fires. Increase `maxmemory` and `mem_limit` together.
### 4. Separate Database Server
When the database needs its own resources (typically >50 stores):