Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frameworks/sark-gateway/compose.gateway-h3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ services:
- DATABASE_URL=${DATABASE_URL}
- DATABASE_MAX_CONN=${DATABASE_MAX_CONN:-32}
- SARK_HTTPARENA_PER_IP_CAP=0
- SARK_HTTPARENA_H1_ONLY=1
9 changes: 7 additions & 2 deletions frameworks/sark-gateway/compose.gateway.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# The sark io_uring `server` busy-polls (Throughput profile spins while it holds
# connections), so it must NOT share cores with the yielding proxy — otherwise it
# starves nginx and the stack serves 0 RPS. Keep GATEWAY_SERVER_CPUS disjoint from
# GATEWAY_PROXY_CPUS (compose.gateway-h3.yml already does: proxy 0-1, server 2).
services:
proxy:
build:
Expand All @@ -16,7 +20,7 @@ services:
context: ../sark
dockerfile: Dockerfile
network_mode: host
cpuset: "${GATEWAY_SERVER_CPUS:-0-2}"
cpuset: "${GATEWAY_SERVER_CPUS:-3-5}"
security_opt:
- seccomp:unconfined
ulimits:
Expand All @@ -26,8 +30,9 @@ services:
hard: 1048576
environment:
- SARK_HTTPARENA_BIND=0.0.0.0:8080
- SARK_HTTPARENA_CPU_CORE=${GATEWAY_SERVER_CPU_CORE:-0}
- SARK_HTTPARENA_CPU_CORE=${GATEWAY_SERVER_CPU_CORE:-3}
- SARK_HTTPARENA_CPU_COUNT=${GATEWAY_SERVER_CPU_COUNT:-3}
- DATABASE_URL=${DATABASE_URL}
- DATABASE_MAX_CONN=${DATABASE_MAX_CONN:-32}
- SARK_HTTPARENA_PER_IP_CAP=0
- SARK_HTTPARENA_H1_ONLY=1
14 changes: 10 additions & 4 deletions frameworks/sark-production/compose.production-stack.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# CPU layout: the sark io_uring `server` busy-polls (Throughput profile spins
# while it holds connections), so it must NOT share cores with the yielding
# edge/authsvc/cache — otherwise it starves them and the whole stack serves
# 0 RPS. `server` is pinned to GATEWAY_SERVER_CPUS (its own range); the proxy,
# auth sidecar and redis share GATEWAY_PROXY_CPUS. Keep the two ranges DISJOINT.
services:
edge:
build: ./proxy-production
Expand All @@ -20,14 +25,14 @@ services:
cache:
image: redis:7-alpine
network_mode: host
cpuset: "${GATEWAY_SERVER_CPUS:-0-2}"
cpuset: "${GATEWAY_PROXY_CPUS:-0-2}"
security_opt:
- seccomp:unconfined

authsvc:
build: ../_shared/authsvc
network_mode: host
cpuset: "${GATEWAY_SERVER_CPUS:-0-2}"
cpuset: "${GATEWAY_PROXY_CPUS:-0-2}"
security_opt:
- seccomp:unconfined
environment:
Expand All @@ -39,7 +44,7 @@ services:
context: ../sark
dockerfile: Dockerfile
network_mode: host
cpuset: "${GATEWAY_SERVER_CPUS:-0-2}"
cpuset: "${GATEWAY_SERVER_CPUS:-3-5}"
security_opt:
- seccomp:unconfined
ulimits:
Expand All @@ -49,11 +54,12 @@ services:
hard: 1048576
environment:
- SARK_HTTPARENA_BIND=0.0.0.0:8080
- SARK_HTTPARENA_CPU_CORE=${GATEWAY_SERVER_CPU_CORE:-0}
- SARK_HTTPARENA_CPU_CORE=${GATEWAY_SERVER_CPU_CORE:-3}
- SARK_HTTPARENA_CPU_COUNT=${GATEWAY_SERVER_CPU_COUNT:-3}
- DATABASE_URL=${DATABASE_URL}
- DATABASE_MAX_CONN=${DATABASE_MAX_CONN:-128}
- REDIS_URL=redis://127.0.0.1:6379
- SARK_HTTPARENA_PER_IP_CAP=0
- SARK_HTTPARENA_H1_ONLY=1
depends_on:
- cache
Loading