Собрать стенд lab3: балансировка, идемпотентность и трек 1
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
Официальный tests/resilience.py --mode failover, hook scripts/stop-one.sh.
|
||||
|
||||
Первый прогон, реплика api-2:
|
||||
{"observed_instances_before": 2, "successful_writes": 95, "failed_attempts": 1, "first_recovery_seconds": 1.99}
|
||||
PASS
|
||||
После hook: mtusi-lab3-api-2 Exited (143). 143 = SIGTERM, не SIGKILL.
|
||||
Восстановление: docker compose --env-file .env start api
|
||||
|
||||
Второй прогон, реплика api-5 (после экспериментов трека контейнеры уже другие):
|
||||
{"observed_instances_before": 2, "successful_writes": 91, "failed_attempts": 1, "first_recovery_seconds": 1.371}
|
||||
PASS
|
||||
После hook: mtusi-lab3-api-5 Exited (143), api-4 остался healthy.
|
||||
|
||||
Поочерёдно обе реплики ещё раз останавливал student-tests/run_grade4.py.
|
||||
Там контейнеры d7ab2fdafb51 и 8050bd440097: оба stopped_still_running=false, после start снова видны 2 instance id.
|
||||
Поле served_by_stopped_after=true в том файле — запросы, стартовавшие пока docker stop ещё ждал завершения процесса.
|
||||
Официальный тест смотрит ответы только после возврата hook: остановленного id в последних ответах нет.
|
||||
@@ -0,0 +1,5 @@
|
||||
rolling {"requests": 1190, "ok": 1189, "errors": 1, "error_ratio": 0.0008, "successful_rps": 42.536, "instances_after_mark": ["8050bd440097", "d7ab2fdafb51"], "restarted": 2}
|
||||
failover {"requests": 499, "ok": 498, "errors": 1, "error_ratio": 0.002, "successful_rps": 33.235, "instances_after_mark": ["8050bd440097", "d7ab2fdafb51"], "stopped": "d7ab2fdafb51", "stopped_still_running": false, "served_by_stopped_after": true}
|
||||
restored instances 2
|
||||
failover {"requests": 624, "ok": 623, "errors": 1, "error_ratio": 0.0016, "successful_rps": 41.619, "instances_after_mark": ["8050bd440097", "d7ab2fdafb51"], "stopped": "8050bd440097", "stopped_still_running": false, "served_by_stopped_after": true}
|
||||
restored instances 2
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"lab": 3,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 20.0,
|
||||
"elapsed_seconds": 22.047,
|
||||
"concurrency": 8,
|
||||
"successful_requests": 326,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 14.787,
|
||||
"successful_latency_ms": {
|
||||
"p50": 312.0,
|
||||
"p95": 1422.0,
|
||||
"p99": 1656.0
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
wsl --cd <repo> python3 tests/resilience.py --mode persistence --action-script scripts/restart.sh --base-url http://127.0.0.1:8080
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
|
||||
StartedAt сразу после hook (UTC):
|
||||
lb 2026-11-06T12:17:26Z не входил в restart.sh, старт стенда сохранился
|
||||
postgres 2026-11-06T12:20:22Z restart.sh перезапустил
|
||||
redis 2026-11-06T12:20:22Z restart.sh перезапустил
|
||||
api-1 2026-11-06T12:20:27Z restart.sh перезапустил
|
||||
|
||||
Volume не удалялся. Повторный запуск migrate после этого написал
|
||||
"001_init already applied" и "002_idempotency already applied".
|
||||
@@ -0,0 +1,2 @@
|
||||
python -X utf8 tests/smoke.py --base-url http://127.0.0.1:8080
|
||||
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
|
||||
@@ -0,0 +1,6 @@
|
||||
instances 2
|
||||
parallel same key: 8x201, 1 row
|
||||
expired key created a new message
|
||||
migrations 001_init,002_idempotency
|
||||
api replicas 2 have cpu/memory limits and no published ports
|
||||
PASS student checks
|
||||
@@ -0,0 +1,168 @@
|
||||
[
|
||||
{
|
||||
"name": "api2-pg0.35",
|
||||
"repeat": 1,
|
||||
"api_replicas": 2,
|
||||
"api_cpus_each": 1.0,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 0.35,
|
||||
"pool_max": 10,
|
||||
"concurrency": 16,
|
||||
"api_cpu_percent_avg": 74.5,
|
||||
"postgres_cpu_percent_avg": 21.97,
|
||||
"elapsed_seconds": 12.282,
|
||||
"ok": 864,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 70.347,
|
||||
"p50_ms": 188.0,
|
||||
"p95_ms": 625.0,
|
||||
"instances": {
|
||||
"bb43af69d38d": 432,
|
||||
"bec8720c1884": 432
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 864
|
||||
},
|
||||
"warmup_rps": 65.939
|
||||
},
|
||||
{
|
||||
"name": "api2-pg0.35",
|
||||
"repeat": 2,
|
||||
"api_replicas": 2,
|
||||
"api_cpus_each": 1.0,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 0.35,
|
||||
"pool_max": 10,
|
||||
"concurrency": 16,
|
||||
"api_cpu_percent_avg": 91.39,
|
||||
"postgres_cpu_percent_avg": 24.72,
|
||||
"elapsed_seconds": 12.297,
|
||||
"ok": 672,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 54.647,
|
||||
"p50_ms": 188.0,
|
||||
"p95_ms": 984.0,
|
||||
"instances": {
|
||||
"bec8720c1884": 336,
|
||||
"bb43af69d38d": 336
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 672
|
||||
},
|
||||
"warmup_rps": 61.102
|
||||
},
|
||||
{
|
||||
"name": "api4-pg0.35",
|
||||
"repeat": 1,
|
||||
"api_replicas": 4,
|
||||
"api_cpus_each": 1.0,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 0.35,
|
||||
"pool_max": 10,
|
||||
"concurrency": 16,
|
||||
"api_cpu_percent_avg": 46.45,
|
||||
"postgres_cpu_percent_avg": 35.11,
|
||||
"elapsed_seconds": 12.328,
|
||||
"ok": 490,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 39.747,
|
||||
"p50_ms": 344.0,
|
||||
"p95_ms": 766.0,
|
||||
"instances": {
|
||||
"53ff00e3f61a": 123,
|
||||
"3632c2791ab8": 122,
|
||||
"3c753e9eb000": 123,
|
||||
"3f51f2dd36c3": 122
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 490
|
||||
},
|
||||
"warmup_rps": 42.19
|
||||
},
|
||||
{
|
||||
"name": "api4-pg0.35",
|
||||
"repeat": 2,
|
||||
"api_replicas": 4,
|
||||
"api_cpus_each": 1.0,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 0.35,
|
||||
"pool_max": 10,
|
||||
"concurrency": 16,
|
||||
"api_cpu_percent_avg": 60.29,
|
||||
"postgres_cpu_percent_avg": 37.55,
|
||||
"elapsed_seconds": 12.313,
|
||||
"ok": 713,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 57.906,
|
||||
"p50_ms": 235.0,
|
||||
"p95_ms": 547.0,
|
||||
"instances": {
|
||||
"3632c2791ab8": 179,
|
||||
"3c753e9eb000": 178,
|
||||
"53ff00e3f61a": 178,
|
||||
"3f51f2dd36c3": 178
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 713
|
||||
},
|
||||
"warmup_rps": 65.323
|
||||
},
|
||||
{
|
||||
"name": "api2-pg1.50",
|
||||
"repeat": 1,
|
||||
"api_replicas": 2,
|
||||
"api_cpus_each": 1.0,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 1.5,
|
||||
"pool_max": 10,
|
||||
"concurrency": 16,
|
||||
"api_cpu_percent_avg": 81.52,
|
||||
"postgres_cpu_percent_avg": 31.94,
|
||||
"elapsed_seconds": 12.438,
|
||||
"ok": 769,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 61.827,
|
||||
"p50_ms": 203.0,
|
||||
"p95_ms": 765.0,
|
||||
"instances": {
|
||||
"3e9fcfcec734": 384,
|
||||
"d110678c8117": 385
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 769
|
||||
},
|
||||
"warmup_rps": 42.502
|
||||
},
|
||||
{
|
||||
"name": "api2-pg1.50",
|
||||
"repeat": 2,
|
||||
"api_replicas": 2,
|
||||
"api_cpus_each": 1.0,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 1.5,
|
||||
"pool_max": 10,
|
||||
"concurrency": 16,
|
||||
"api_cpu_percent_avg": 78.25,
|
||||
"postgres_cpu_percent_avg": 26.06,
|
||||
"elapsed_seconds": 12.437,
|
||||
"ok": 705,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 56.686,
|
||||
"p50_ms": 234.0,
|
||||
"p95_ms": 891.0,
|
||||
"instances": {
|
||||
"3e9fcfcec734": 353,
|
||||
"d110678c8117": 352
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 705
|
||||
},
|
||||
"warmup_rps": 77.545
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,16 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="760" height="420">
|
||||
<rect width="100%" height="100%" fill="white"/>
|
||||
<text x="380" y="22" text-anchor="middle" font-size="16">Много CPU у API, разный лимит Postgres</text>
|
||||
<line x1="70" y1="30" x2="70" y2="370" stroke="#222"/>
|
||||
<line x1="70" y1="370" x2="740" y2="370" stroke="#222"/>
|
||||
<polyline fill="none" stroke="#1f4e79" stroke-width="2" points="70.0,74.3 400.0,139.2 730.0,89.5"/>
|
||||
<circle cx="70.0" cy="74.3" r="4" fill="#1f4e79"/><circle cx="400.0" cy="139.2" r="4" fill="#1f4e79"/><circle cx="730.0" cy="89.5" r="4" fill="#1f4e79"/>
|
||||
<text x="70.0" y="402" text-anchor="middle" font-size="13">2x / 0.35</text>
|
||||
<text x="70.0" y="66.3" text-anchor="middle" font-size="12">62.5</text>
|
||||
<text x="400.0" y="402" text-anchor="middle" font-size="13">4x / 0.35</text>
|
||||
<text x="400.0" y="131.2" text-anchor="middle" font-size="12">48.8</text>
|
||||
<text x="730.0" y="402" text-anchor="middle" font-size="13">2x / 1.50</text>
|
||||
<text x="730.0" y="81.5" text-anchor="middle" font-size="12">59.3</text>
|
||||
<text x="380" y="418" text-anchor="middle" font-size="13">реплики API / лимит CPU Postgres</text>
|
||||
<text x="18" y="220" font-size="13" transform="rotate(-90 18 220)">успешные RPS</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,14 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="760" height="420">
|
||||
<rect width="100%" height="100%" fill="white"/>
|
||||
<text x="380" y="22" text-anchor="middle" font-size="16">Размер пула соединений при concurrency 16</text>
|
||||
<line x1="70" y1="30" x2="70" y2="370" stroke="#222"/>
|
||||
<line x1="70" y1="370" x2="740" y2="370" stroke="#222"/>
|
||||
<polyline fill="none" stroke="#1f4e79" stroke-width="2" points="70.0,74.3 730.0,237.3"/>
|
||||
<circle cx="70.0" cy="74.3" r="4" fill="#1f4e79"/><circle cx="730.0" cy="237.3" r="4" fill="#1f4e79"/>
|
||||
<text x="70.0" y="402" text-anchor="middle" font-size="13">2</text>
|
||||
<text x="70.0" y="66.3" text-anchor="middle" font-size="12">42.4</text>
|
||||
<text x="730.0" y="402" text-anchor="middle" font-size="13">10</text>
|
||||
<text x="730.0" y="229.3" text-anchor="middle" font-size="12">19.0</text>
|
||||
<text x="380" y="418" text-anchor="middle" font-size="13">POOL_MAX на реплику</text>
|
||||
<text x="18" y="220" font-size="13" transform="rotate(-90 18 220)">успешные RPS</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,16 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="760" height="420">
|
||||
<rect width="100%" height="100%" fill="white"/>
|
||||
<text x="380" y="22" text-anchor="middle" font-size="16">Рост CPU Postgres при 2 API</text>
|
||||
<line x1="70" y1="30" x2="70" y2="370" stroke="#222"/>
|
||||
<line x1="70" y1="370" x2="740" y2="370" stroke="#222"/>
|
||||
<polyline fill="none" stroke="#1f4e79" stroke-width="2" points="70.0,92.5 400.0,131.2 730.0,74.3"/>
|
||||
<circle cx="70.0" cy="92.5" r="4" fill="#1f4e79"/><circle cx="400.0" cy="131.2" r="4" fill="#1f4e79"/><circle cx="730.0" cy="74.3" r="4" fill="#1f4e79"/>
|
||||
<text x="70.0" y="402" text-anchor="middle" font-size="13">0.30</text>
|
||||
<text x="70.0" y="84.5" text-anchor="middle" font-size="12">20.9</text>
|
||||
<text x="400.0" y="402" text-anchor="middle" font-size="13">0.60</text>
|
||||
<text x="400.0" y="123.2" text-anchor="middle" font-size="12">18.0</text>
|
||||
<text x="730.0" y="402" text-anchor="middle" font-size="13">1.20</text>
|
||||
<text x="730.0" y="66.3" text-anchor="middle" font-size="12">22.3</text>
|
||||
<text x="380" y="418" text-anchor="middle" font-size="13">лимит CPU Postgres</text>
|
||||
<text x="18" y="220" font-size="13" transform="rotate(-90 18 220)">успешные RPS</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,16 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="760" height="420">
|
||||
<rect width="100%" height="100%" fill="white"/>
|
||||
<text x="380" y="22" text-anchor="middle" font-size="16">Фиксированный бюджет API: 1 / 2 / 4 реплики</text>
|
||||
<line x1="70" y1="30" x2="70" y2="370" stroke="#222"/>
|
||||
<line x1="70" y1="370" x2="740" y2="370" stroke="#222"/>
|
||||
<polyline fill="none" stroke="#1f4e79" stroke-width="2" points="70.0,81.4 400.0,158.2 730.0,74.3"/>
|
||||
<circle cx="70.0" cy="81.4" r="4" fill="#1f4e79"/><circle cx="400.0" cy="158.2" r="4" fill="#1f4e79"/><circle cx="730.0" cy="74.3" r="4" fill="#1f4e79"/>
|
||||
<text x="70.0" y="402" text-anchor="middle" font-size="13">1</text>
|
||||
<text x="70.0" y="73.4" text-anchor="middle" font-size="12">23.1</text>
|
||||
<text x="400.0" y="402" text-anchor="middle" font-size="13">2</text>
|
||||
<text x="400.0" y="150.2" text-anchor="middle" font-size="12">17.0</text>
|
||||
<text x="730.0" y="402" text-anchor="middle" font-size="13">4</text>
|
||||
<text x="730.0" y="66.3" text-anchor="middle" font-size="12">23.7</text>
|
||||
<text x="380" y="418" text-anchor="middle" font-size="13">число реплик при суммарно 1.0 CPU и 1024 MiB</text>
|
||||
<text x="18" y="220" font-size="13" transform="rotate(-90 18 220)">успешные RPS</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,17 @@
|
||||
name,repeat,api_replicas,api_cpus_each,postgres_cpus,pool_max,concurrency,successful_rps,error_ratio,p50_ms,p95_ms,api_cpu_percent_avg,postgres_cpu_percent_avg
|
||||
fixed-1,1,1,1.0,1.0,10,8,23.947,0.0,328.0,672.0,103.56,15.87
|
||||
fixed-1,2,1,1.0,1.0,10,8,22.317,0.0,344.0,750.0,104.36,18.13
|
||||
fixed-2,1,2,0.5,1.0,10,8,17.402,0.0,219.0,1250.0,40.53,19.16
|
||||
fixed-2,2,2,0.5,1.0,10,8,16.56,0.0,219.0,1484.0,38.62,17.9
|
||||
fixed-4,1,4,0.25,1.0,10,8,25.164,0.0,94.0,1188.0,18.03,15.9
|
||||
fixed-4,2,4,0.25,1.0,10,8,22.235,0.0,110.0,1484.0,22.12,25.53
|
||||
pg-0.30,1,2,0.5,0.3,10,8,24.294,0.0,219.0,1079.0,42.1,17.8
|
||||
pg-0.30,2,2,0.5,0.3,10,8,17.483,0.0,281.0,1219.0,47.01,18.2
|
||||
pg-0.60,1,2,0.5,0.6,10,8,17.625,0.0,312.0,1422.0,39.66,17.52
|
||||
pg-0.60,2,2,0.5,0.6,10,8,18.331,0.0,234.0,1203.0,44.6,13.38
|
||||
pg-1.20,1,2,0.5,1.2,10,8,22.485,0.0,297.0,907.0,41.64,21.02
|
||||
pg-1.20,2,2,0.5,1.2,10,8,22.032,0.0,219.0,1172.0,47.22,14.82
|
||||
pool-2,1,2,0.5,1.0,2,16,48.0,0.0,281.0,922.0,44.11,20.69
|
||||
pool-2,2,2,0.5,1.0,2,16,36.709,0.0,453.0,1312.0,47.04,14.85
|
||||
pool-10,1,2,0.5,1.0,10,16,20.353,0.0,813.0,1718.0,46.07,24.71
|
||||
pool-10,2,2,0.5,1.0,10,16,17.657,0.0,563.0,2312.0,47.39,19.96
|
||||
|
@@ -0,0 +1,436 @@
|
||||
[
|
||||
{
|
||||
"name": "fixed-1",
|
||||
"repeat": 1,
|
||||
"api_replicas": 1,
|
||||
"api_cpus_each": 1.0,
|
||||
"api_memory_each": "1024m",
|
||||
"postgres_cpus": 1.0,
|
||||
"pool_max": 10,
|
||||
"concurrency": 8,
|
||||
"api_cpu_percent_avg": 103.56,
|
||||
"postgres_cpu_percent_avg": 15.87,
|
||||
"elapsed_seconds": 12.11,
|
||||
"ok": 290,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 23.947,
|
||||
"p50_ms": 328.0,
|
||||
"p95_ms": 672.0,
|
||||
"instances": {
|
||||
"0e2853f732e2": 290
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 290
|
||||
},
|
||||
"warmup_rps": 18.253
|
||||
},
|
||||
{
|
||||
"name": "fixed-1",
|
||||
"repeat": 2,
|
||||
"api_replicas": 1,
|
||||
"api_cpus_each": 1.0,
|
||||
"api_memory_each": "1024m",
|
||||
"postgres_cpus": 1.0,
|
||||
"pool_max": 10,
|
||||
"concurrency": 8,
|
||||
"api_cpu_percent_avg": 104.36,
|
||||
"postgres_cpu_percent_avg": 18.13,
|
||||
"elapsed_seconds": 12.188,
|
||||
"ok": 272,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 22.317,
|
||||
"p50_ms": 344.0,
|
||||
"p95_ms": 750.0,
|
||||
"instances": {
|
||||
"0e2853f732e2": 272
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 272
|
||||
},
|
||||
"warmup_rps": 13.902
|
||||
},
|
||||
{
|
||||
"name": "fixed-2",
|
||||
"repeat": 1,
|
||||
"api_replicas": 2,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 1.0,
|
||||
"pool_max": 10,
|
||||
"concurrency": 8,
|
||||
"api_cpu_percent_avg": 40.53,
|
||||
"postgres_cpu_percent_avg": 19.16,
|
||||
"elapsed_seconds": 12.125,
|
||||
"ok": 211,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 17.402,
|
||||
"p50_ms": 219.0,
|
||||
"p95_ms": 1250.0,
|
||||
"instances": {
|
||||
"5bebd8ab4f56": 105,
|
||||
"f1a5ba335e1e": 106
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 211
|
||||
},
|
||||
"warmup_rps": 10.629
|
||||
},
|
||||
{
|
||||
"name": "fixed-2",
|
||||
"repeat": 2,
|
||||
"api_replicas": 2,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 1.0,
|
||||
"pool_max": 10,
|
||||
"concurrency": 8,
|
||||
"api_cpu_percent_avg": 38.62,
|
||||
"postgres_cpu_percent_avg": 17.9,
|
||||
"elapsed_seconds": 12.5,
|
||||
"ok": 207,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 16.56,
|
||||
"p50_ms": 219.0,
|
||||
"p95_ms": 1484.0,
|
||||
"instances": {
|
||||
"5bebd8ab4f56": 104,
|
||||
"f1a5ba335e1e": 103
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 207
|
||||
},
|
||||
"warmup_rps": 15.443
|
||||
},
|
||||
{
|
||||
"name": "fixed-4",
|
||||
"repeat": 1,
|
||||
"api_replicas": 4,
|
||||
"api_cpus_each": 0.25,
|
||||
"api_memory_each": "256m",
|
||||
"postgres_cpus": 1.0,
|
||||
"pool_max": 10,
|
||||
"concurrency": 8,
|
||||
"api_cpu_percent_avg": 18.03,
|
||||
"postgres_cpu_percent_avg": 15.9,
|
||||
"elapsed_seconds": 12.359,
|
||||
"ok": 311,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 25.164,
|
||||
"p50_ms": 94.0,
|
||||
"p95_ms": 1188.0,
|
||||
"instances": {
|
||||
"329be75d4a30": 78,
|
||||
"c7e4f318a8a5": 78,
|
||||
"06cc7d7ee0fd": 78,
|
||||
"f0f75a31fff3": 77
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 311
|
||||
},
|
||||
"warmup_rps": 21.009
|
||||
},
|
||||
{
|
||||
"name": "fixed-4",
|
||||
"repeat": 2,
|
||||
"api_replicas": 4,
|
||||
"api_cpus_each": 0.25,
|
||||
"api_memory_each": "256m",
|
||||
"postgres_cpus": 1.0,
|
||||
"pool_max": 10,
|
||||
"concurrency": 8,
|
||||
"api_cpu_percent_avg": 22.12,
|
||||
"postgres_cpu_percent_avg": 25.53,
|
||||
"elapsed_seconds": 12.188,
|
||||
"ok": 271,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 22.235,
|
||||
"p50_ms": 110.0,
|
||||
"p95_ms": 1484.0,
|
||||
"instances": {
|
||||
"329be75d4a30": 72,
|
||||
"c7e4f318a8a5": 72,
|
||||
"06cc7d7ee0fd": 72,
|
||||
"f0f75a31fff3": 55
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 271
|
||||
},
|
||||
"warmup_rps": 12.577
|
||||
},
|
||||
{
|
||||
"name": "pg-0.30",
|
||||
"repeat": 1,
|
||||
"api_replicas": 2,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 0.3,
|
||||
"pool_max": 10,
|
||||
"concurrency": 8,
|
||||
"api_cpu_percent_avg": 42.1,
|
||||
"postgres_cpu_percent_avg": 17.8,
|
||||
"elapsed_seconds": 12.719,
|
||||
"ok": 309,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 24.294,
|
||||
"p50_ms": 219.0,
|
||||
"p95_ms": 1079.0,
|
||||
"instances": {
|
||||
"a0c6b859a0ae": 154,
|
||||
"dfa5caeae453": 155
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 309
|
||||
},
|
||||
"warmup_rps": 14.556
|
||||
},
|
||||
{
|
||||
"name": "pg-0.30",
|
||||
"repeat": 2,
|
||||
"api_replicas": 2,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 0.3,
|
||||
"pool_max": 10,
|
||||
"concurrency": 8,
|
||||
"api_cpu_percent_avg": 47.01,
|
||||
"postgres_cpu_percent_avg": 18.2,
|
||||
"elapsed_seconds": 12.469,
|
||||
"ok": 218,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 17.483,
|
||||
"p50_ms": 281.0,
|
||||
"p95_ms": 1219.0,
|
||||
"instances": {
|
||||
"a0c6b859a0ae": 109,
|
||||
"dfa5caeae453": 109
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 218
|
||||
},
|
||||
"warmup_rps": 26.065
|
||||
},
|
||||
{
|
||||
"name": "pg-0.60",
|
||||
"repeat": 1,
|
||||
"api_replicas": 2,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 0.6,
|
||||
"pool_max": 10,
|
||||
"concurrency": 8,
|
||||
"api_cpu_percent_avg": 39.66,
|
||||
"postgres_cpu_percent_avg": 17.52,
|
||||
"elapsed_seconds": 12.312,
|
||||
"ok": 217,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 17.625,
|
||||
"p50_ms": 312.0,
|
||||
"p95_ms": 1422.0,
|
||||
"instances": {
|
||||
"29bc337601db": 109,
|
||||
"d815cccbd156": 108
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 217
|
||||
},
|
||||
"warmup_rps": 7.111
|
||||
},
|
||||
{
|
||||
"name": "pg-0.60",
|
||||
"repeat": 2,
|
||||
"api_replicas": 2,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 0.6,
|
||||
"pool_max": 10,
|
||||
"concurrency": 8,
|
||||
"api_cpu_percent_avg": 44.6,
|
||||
"postgres_cpu_percent_avg": 13.38,
|
||||
"elapsed_seconds": 12.765,
|
||||
"ok": 234,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 18.331,
|
||||
"p50_ms": 234.0,
|
||||
"p95_ms": 1203.0,
|
||||
"instances": {
|
||||
"29bc337601db": 117,
|
||||
"d815cccbd156": 117
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 234
|
||||
},
|
||||
"warmup_rps": 21.556
|
||||
},
|
||||
{
|
||||
"name": "pg-1.20",
|
||||
"repeat": 1,
|
||||
"api_replicas": 2,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 1.2,
|
||||
"pool_max": 10,
|
||||
"concurrency": 8,
|
||||
"api_cpu_percent_avg": 41.64,
|
||||
"postgres_cpu_percent_avg": 21.02,
|
||||
"elapsed_seconds": 12.453,
|
||||
"ok": 280,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 22.485,
|
||||
"p50_ms": 297.0,
|
||||
"p95_ms": 907.0,
|
||||
"instances": {
|
||||
"829d3ebf1797": 140,
|
||||
"ecf3a641c98e": 140
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 280
|
||||
},
|
||||
"warmup_rps": 21.091
|
||||
},
|
||||
{
|
||||
"name": "pg-1.20",
|
||||
"repeat": 2,
|
||||
"api_replicas": 2,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 1.2,
|
||||
"pool_max": 10,
|
||||
"concurrency": 8,
|
||||
"api_cpu_percent_avg": 47.22,
|
||||
"postgres_cpu_percent_avg": 14.82,
|
||||
"elapsed_seconds": 12.391,
|
||||
"ok": 273,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 22.032,
|
||||
"p50_ms": 219.0,
|
||||
"p95_ms": 1172.0,
|
||||
"instances": {
|
||||
"ecf3a641c98e": 136,
|
||||
"829d3ebf1797": 137
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 273
|
||||
},
|
||||
"warmup_rps": 38.061
|
||||
},
|
||||
{
|
||||
"name": "pool-2",
|
||||
"repeat": 1,
|
||||
"api_replicas": 2,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 1.0,
|
||||
"pool_max": 2,
|
||||
"concurrency": 16,
|
||||
"api_cpu_percent_avg": 44.11,
|
||||
"postgres_cpu_percent_avg": 20.69,
|
||||
"elapsed_seconds": 12.25,
|
||||
"ok": 588,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 48.0,
|
||||
"p50_ms": 281.0,
|
||||
"p95_ms": 922.0,
|
||||
"instances": {
|
||||
"2a050c6c1a81": 294,
|
||||
"406ae8ebc74d": 294
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 588
|
||||
},
|
||||
"warmup_rps": 28.513
|
||||
},
|
||||
{
|
||||
"name": "pool-2",
|
||||
"repeat": 2,
|
||||
"api_replicas": 2,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 1.0,
|
||||
"pool_max": 2,
|
||||
"concurrency": 16,
|
||||
"api_cpu_percent_avg": 47.04,
|
||||
"postgres_cpu_percent_avg": 14.85,
|
||||
"elapsed_seconds": 12.531,
|
||||
"ok": 460,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 36.709,
|
||||
"p50_ms": 453.0,
|
||||
"p95_ms": 1312.0,
|
||||
"instances": {
|
||||
"406ae8ebc74d": 230,
|
||||
"2a050c6c1a81": 230
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 460
|
||||
},
|
||||
"warmup_rps": 60.297
|
||||
},
|
||||
{
|
||||
"name": "pool-10",
|
||||
"repeat": 1,
|
||||
"api_replicas": 2,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 1.0,
|
||||
"pool_max": 10,
|
||||
"concurrency": 16,
|
||||
"api_cpu_percent_avg": 46.07,
|
||||
"postgres_cpu_percent_avg": 24.71,
|
||||
"elapsed_seconds": 12.578,
|
||||
"ok": 256,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 20.353,
|
||||
"p50_ms": 813.0,
|
||||
"p95_ms": 1718.0,
|
||||
"instances": {
|
||||
"194c290719fa": 128,
|
||||
"8d9b89e30678": 128
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 256
|
||||
},
|
||||
"warmup_rps": 16.798
|
||||
},
|
||||
{
|
||||
"name": "pool-10",
|
||||
"repeat": 2,
|
||||
"api_replicas": 2,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_memory_each": "512m",
|
||||
"postgres_cpus": 1.0,
|
||||
"pool_max": 10,
|
||||
"concurrency": 16,
|
||||
"api_cpu_percent_avg": 47.39,
|
||||
"postgres_cpu_percent_avg": 19.96,
|
||||
"elapsed_seconds": 12.969,
|
||||
"ok": 229,
|
||||
"errors": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 17.657,
|
||||
"p50_ms": 563.0,
|
||||
"p95_ms": 2312.0,
|
||||
"instances": {
|
||||
"194c290719fa": 96,
|
||||
"8d9b89e30678": 133
|
||||
},
|
||||
"status_codes": {
|
||||
"201": 229
|
||||
},
|
||||
"warmup_rps": 21.478
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"method": "closed-loop POST messages, unique Idempotency-Key, warmup 4s discarded, measure 12s, 2 repeats, fresh chat per repeat",
|
||||
"fixed_total_api_cpu": 1.0,
|
||||
"fixed_total_api_memory": "1024m",
|
||||
"mean_successful_rps": {
|
||||
"fixed-1": 23.132,
|
||||
"fixed-2": 16.981,
|
||||
"fixed-4": 23.7,
|
||||
"pg-0.30": 20.889,
|
||||
"pg-0.60": 17.978,
|
||||
"pg-1.20": 22.258,
|
||||
"pool-2": 42.355,
|
||||
"pool-10": 19.005
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user