RELEASES_DIR=/var/lib/easyai-ai-gateway-cluster-release/releases
NAMESPACE=easyai
PUBLIC_BASE_URL=https://ai.51easyai.com
K3S_BIN=/usr/local/bin/k3s
DESIRED_STATE_DIR=/usr/local/share/easyai-ai-gateway-release/production

# Worker 容量只需修改本发布配置并执行获授权的 `capacity`，不再修改 Go 代码。
# 副本数属于 Deployment 配置，不能由容器内部环境变量改变；发布工具读取这两个变量并写入 replicas。
AI_GATEWAY_WORKER_REPLICAS_NINGBO=1
AI_GATEWAY_WORKER_REPLICAS_HONGKONG=1
AI_GATEWAY_ASYNC_WORKER_INSTANCE_HARD_LIMIT=24
AI_GATEWAY_ASYNC_WORKER_HARD_LIMIT=48
AI_GATEWAY_ASYNC_WORKER_GLOBAL_HARD_LIMIT=48
AI_GATEWAY_WORKER_MEMORY_REQUEST_MIB=1536
AI_GATEWAY_WORKER_CPU_REQUEST_MILLICORES=500
AI_GATEWAY_DATABASE_MAX_CONNS=32
AI_GATEWAY_API_DATABASE_MAX_CONNS=32
AI_GATEWAY_DATABASE_CRITICAL_MAX_CONNS=4
AI_GATEWAY_DATABASE_RIVER_MAX_CONNS=8
AI_GATEWAY_API_DATABASE_RIVER_MAX_CONNS=4
AI_GATEWAY_DATABASE_MIN_IDLE_CONNS=4
AI_GATEWAY_DATABASE_MAX_CONN_IDLE_SECONDS=30
AI_GATEWAY_MEDIA_MATERIALIZATION_CONCURRENCY=24
AI_GATEWAY_MEDIA_REQUEST_CONCURRENCY=24
AI_GATEWAY_WORKER_AUTOSCALING_ENABLED=false
AI_GATEWAY_WORKER_MIN_REPLICAS_NINGBO=1
AI_GATEWAY_WORKER_MIN_REPLICAS_HONGKONG=1
AI_GATEWAY_WORKER_MAX_REPLICAS_NINGBO=1
AI_GATEWAY_WORKER_MAX_REPLICAS_HONGKONG=1
AI_GATEWAY_WORKER_TARGET_OUTSTANDING_PER_REPLICA=48
AI_GATEWAY_WORKER_SCALE_UP_WINDOW_SECONDS=20
AI_GATEWAY_WORKER_SCALE_DOWN_STABILIZATION_SECONDS=600
AI_GATEWAY_WORKER_DRAIN_TIMEOUT_SECONDS=600
AI_GATEWAY_NODE_MEMORY_TARGET_PERCENT=75
AI_GATEWAY_NODE_MEMORY_HARD_PERCENT=85
AI_GATEWAY_NODE_CPU_TARGET_PERCENT=70
AI_GATEWAY_POSTGRES_CONNECTION_BUDGET=150
# 2 个 API 池（2×32）加 2 个 capacity-controller 池（2×4）。
AI_GATEWAY_POSTGRES_NON_WORKER_CONNECTION_BUDGET=72
