Split sor-host into dedicated gateway and workers deployments
Before: 3 pods ran ENABLED_SERVICES=all — gateway, auth, and every
business-logic service co-hosted. This defeated the purpose of the
gateway pattern and prevented independent scaling.
After:
sor-gateway (2 replicas) — ENABLED_SERVICES=gateway,auth
• WebSocket edge, accepts client connections
• Auth co-located (JWT validation is a localhost gRPC call, no network hop)
• Lighter resource footprint: 150m/128Mi request, 500m/512Mi limit
• Ingress at hub.aeternalisgames.com → sor-gateway:80
sor-workers (3 replicas) — ENABLED_SERVICES=chat,collection,bazaar,
content,versioning,matchmaking,game
• Subscribes to NATS, handles all business-logic messages
• Holds DB connection pools for all schemas
• Internal only — no ingress
• Heavier resources: 300m/384Mi request, 1000m/1Gi limit
configmap.yaml: removed ENABLED_SERVICES=all and Services__Auth (each
deployment now sets these directly in its own env block)
ingress.yaml: hub.aeternalisgames.com backend sor-host → sor-gateway
ArgoCD prune=true will delete the old sor-host Deployment + Service
from the cluster on next sync.
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -4,22 +4,19 @@ metadata:
|
||||
name: sor-config
|
||||
namespace: stone-server
|
||||
data:
|
||||
# ── SOR.Host ────────────────────────────────────────────────────────────────
|
||||
ENABLED_SERVICES: "all"
|
||||
# ── Shared config (all pods) ─────────────────────────────────────────────────
|
||||
# ENABLED_SERVICES and Services__Auth are NOT set here — each deployment sets
|
||||
# them directly in its own env block so gateway and workers are independently
|
||||
# configured without a shared ConfigMap override.
|
||||
ASPNETCORE_URLS: "http://+:8080"
|
||||
ASPNETCORE_ENVIRONMENT: "Production"
|
||||
|
||||
# WebSocket gateway settings
|
||||
# WebSocket / gateway settings (consumed only by pods running the gateway service)
|
||||
WebSocket__Path: "/ws"
|
||||
Gateway__AuthTimeoutMs: "10000"
|
||||
Gateway__MaxMessagesPerSecond: "20"
|
||||
|
||||
# gRPC: gateway calls auth at this address.
|
||||
# In single-pod (ENABLED_SERVICES=all) mode both run in the same process on the same port.
|
||||
Services__Auth: "http://localhost:8080"
|
||||
|
||||
# NATS message bus — update to your NATS service address.
|
||||
# TODO: replace with your actual NATS service URL.
|
||||
# NATS message bus
|
||||
Nats__Url: "nats://nats.stone-server.svc.cluster.local:4222"
|
||||
|
||||
# ── SOR.Admin ───────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user