docs: update ARCHITECTURE.md and CLAUDE.md
- HTTP flow includes hub routes (/, /dashboard, /api/dashboard) - Compose table adds hub.yml and observability.yml - Prometheus auto-discovery section (Docker SD + labels) - Traefik metrics query reference - Docker socket access pattern (group_add: 988) - Service registry table includes root domain, hub, jaeger - CLAUDE.md monitoring section Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
83b825b449
commit
c17f5f5b32
@@ -29,12 +29,20 @@ asepharyana-hub/
|
||||
- `apps/scraper` → `asepharyana/asepharyana-hub-scraper`.
|
||||
|
||||
### Infrastructure Stack
|
||||
- **Traefik v3.6** — reverse proxy, TLS termination, middleware chain (rate-limit, headers, buffer, block-sensitive-paths)
|
||||
- **Traefik v3.6** — reverse proxy, TLS termination, middleware chain, Prometheus metrics (`--metrics.prometheus=true`)
|
||||
- **NATS + JetStream** — message broker with persistent streaming
|
||||
- **Dapr** — sidecar runtime (pub/sub abstraction, state management, service invocation)
|
||||
- **Redis (Alpine)** — cache, session store, Dapr state store & pub/sub backend
|
||||
- **Prometheus** — metrics backend with Docker service discovery (`docker_sd_configs`). Auto-discovers containers with `prometheus.io/scrape=true` label.
|
||||
- **Jaeger** — distributed tracing backend (all-in-one), OTLP receiver
|
||||
- **Tailscale** — secure overlay network between VPS nodes (PostgreSQL on `imrnes`, containers on `orangevps`)
|
||||
|
||||
### Monitoring
|
||||
- **Hub dashboard** at `/dashboard` (Next.js client page, auto-refresh 15s)
|
||||
- **Dashboard API** at `/api/dashboard` — returns JSON with Docker containers, Jaeger traces, Prometheus metrics (RPS, latency, errors, node CPU/RAM/Disk)
|
||||
- **Docker socket** mounted on `hub` container (`--group-add 988`) for container discovery
|
||||
- **Prometheus** auto-scrapes Traefik for per-service request metrics
|
||||
|
||||
### Networking
|
||||
- All containers join `app-shared-net` (external Docker bridge network). Service discovery via Docker DNS (container name aliases).
|
||||
- Traefik handles all external HTTP/S traffic on port 443.
|
||||
|
||||
Reference in New Issue
Block a user