Разделить стенд и настройки нагрузочных экспериментов, ограничить число запросов на реплику в HAProxy и передавать X-Request-Id от балансировщика в API, сократить комментарии
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
# Load-test override of compose.yaml, used only by scripts/bench: every value
|
||||
# an experiment varies, and the load generator. Defaults equal compose.yaml.
|
||||
services:
|
||||
lb:
|
||||
environment:
|
||||
LB_QUIET: ${LB_QUIET:-0}
|
||||
API_MAXCONN: ${API_MAXCONN:-20}
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "${LB_CPUS:-0.5}"
|
||||
|
||||
api:
|
||||
environment:
|
||||
DB_MAX_CONNS: ${DB_MAX_CONNS:-10}
|
||||
GOMEMLIMIT: ${API_GOMEMLIMIT:-230MiB}
|
||||
APP_DEBUG_ADDR: ":9090"
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "${API_CPUS:-1.0}"
|
||||
memory: ${API_MEMORY:-256M}
|
||||
|
||||
postgres:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "${PG_CPUS:-1.0}"
|
||||
memory: ${PG_MEMORY:-512M}
|
||||
|
||||
loadgen:
|
||||
profiles: ["bench"]
|
||||
build:
|
||||
context: .
|
||||
target: loadgen
|
||||
image: mtusi-messenger-loadgen:lab3
|
||||
environment:
|
||||
GOMEMLIMIT: 900MiB
|
||||
volumes:
|
||||
- ${BENCH_OUT:-./bench-out}:/out
|
||||
networks:
|
||||
- edge
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "${LOADGEN_CPUS:-2.0}"
|
||||
memory: 1G
|
||||
Reference in New Issue
Block a user