forked from mtusi2026/mtusi2026lab3
fix(lab3): verify fixed-resource scaling and prepare submission
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
$ python scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
|
||||
exit=0
|
||||
$ python tests/smoke.py --base-url http://127.0.0.1:8080
|
||||
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
|
||||
|
||||
exit=0
|
||||
$ python -m unittest discover -s student-tests -p test_api.py -v
|
||||
test_bearer_rules (test_api.AuthTest.test_bearer_rules) ... ok
|
||||
test_concurrent_registration_of_same_username (test_api.AuthTest.test_concurrent_registration_of_same_username) ... ok
|
||||
test_logout_revokes_in_database_and_cache (test_api.AuthTest.test_logout_revokes_in_database_and_cache) ... ok
|
||||
test_password_is_not_exposed_or_stored_plain (test_api.AuthTest.test_password_is_not_exposed_or_stored_plain) ... ok
|
||||
test_register_validation (test_api.AuthTest.test_register_validation) ... ok
|
||||
test_session_shape_entropy_and_logout (test_api.AuthTest.test_session_shape_entropy_and_logout) ... ok
|
||||
test_token_only_stored_as_hash (test_api.AuthTest.test_token_only_stored_as_hash) ... ok
|
||||
test_wrong_password_and_unknown_user_are_indistinguishable (test_api.AuthTest.test_wrong_password_and_unknown_user_are_indistinguishable) ... ok
|
||||
test_chat_creation_is_atomic (test_api.DataTest.test_chat_creation_is_atomic) ... ok
|
||||
test_foreign_chat_empty_message_bad_json (test_api.DataTest.test_foreign_chat_empty_message_bad_json) ... ok
|
||||
test_multi_page_history_and_cursor_binding (test_api.DataTest.test_multi_page_history_and_cursor_binding) ... ok
|
||||
test_parallel_writes_from_many_clients (test_api.DataTest.test_parallel_writes_from_many_clients) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 12 tests in 2.437s
|
||||
|
||||
OK
|
||||
|
||||
exit=0
|
||||
$ python -m unittest discover -s student-tests -p test_idempotency.py -v
|
||||
test_concurrent_same_key_creates_exactly_one_message_across_replicas (test_idempotency.IdempotencyTest.test_concurrent_same_key_creates_exactly_one_message_across_replicas) ... ok
|
||||
test_different_body_same_key_is_409 (test_idempotency.IdempotencyTest.test_different_body_same_key_is_409) ... ok
|
||||
test_expired_key_is_reusable_after_ttl (test_idempotency.IdempotencyTest.test_expired_key_is_reusable_after_ttl) ... ok
|
||||
test_key_validation (test_idempotency.IdempotencyTest.test_key_validation) ... ok
|
||||
test_replay_rechecks_session_and_membership (test_idempotency.IdempotencyTest.test_replay_rechecks_session_and_membership) ... ok
|
||||
test_replay_returns_same_message_and_creates_no_duplicate (test_idempotency.IdempotencyTest.test_replay_returns_same_message_and_creates_no_duplicate) ... ok
|
||||
test_scope_is_user_and_chat (test_idempotency.IdempotencyTest.test_scope_is_user_and_chat) ... ok
|
||||
test_semantically_equal_body_is_replayed (test_idempotency.IdempotencyTest.test_semantically_equal_body_is_replayed) ... ok
|
||||
test_session_is_shared_between_replicas_without_relogin (test_idempotency.IdempotencyTest.test_session_is_shared_between_replicas_without_relogin) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 9 tests in 2.503s
|
||||
|
||||
OK
|
||||
|
||||
exit=0
|
||||
$ python -m unittest discover -s student-tests -p test_topology.py -v
|
||||
test_api_runs_as_non_root (test_topology.TopologyTest.test_api_runs_as_non_root) ... ok
|
||||
test_at_least_two_api_replicas_without_published_ports (test_topology.TopologyTest.test_at_least_two_api_replicas_without_published_ports) ... ok
|
||||
test_no_fixed_container_names (test_topology.TopologyTest.test_no_fixed_container_names) ... ok
|
||||
test_only_lb_is_published_and_only_on_localhost (test_topology.TopologyTest.test_only_lb_is_published_and_only_on_localhost) ... ok
|
||||
test_resource_limits_are_set (test_topology.TopologyTest.test_resource_limits_are_set) ... ok
|
||||
test_stop_grace_period_covers_drain (test_topology.TopologyTest.test_stop_grace_period_covers_drain) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 6 tests in 1.344s
|
||||
|
||||
OK
|
||||
|
||||
exit=0
|
||||
$ python tests/resilience.py --mode persistence --action-script scripts/restart.cmd --base-url http://127.0.0.1:8080
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
|
||||
exit=0
|
||||
$ python tests/resilience.py --mode failover --action-script scripts/stop-one.cmd --base-url http://127.0.0.1:8080
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 118, "failed_attempts": 0, "first_recovery_seconds": 2.438}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
|
||||
exit=0
|
||||
$ docker compose --env-file .env start api
|
||||
Container mtusi-lab3-postgres-1 Waiting
|
||||
Container mtusi-lab3-postgres-1 Healthy
|
||||
Container mtusi-lab3-migrate-1 Starting
|
||||
Container mtusi-lab3-migrate-1 Started
|
||||
Container mtusi-lab3-migrate-1 Waiting
|
||||
Container mtusi-lab3-valkey-1 Waiting
|
||||
Container mtusi-lab3-valkey-1 Healthy
|
||||
Container mtusi-lab3-migrate-1 Exited
|
||||
Container mtusi-lab3-api-9 Starting
|
||||
Container mtusi-lab3-api-9 Started
|
||||
|
||||
exit=0
|
||||
$ python student-tests/test_expiry.py
|
||||
..
|
||||
----------------------------------------------------------------------
|
||||
Ran 2 tests in 23.234s
|
||||
|
||||
OK
|
||||
|
||||
exit=0
|
||||
$ python student-tests/test_dependencies.py
|
||||
..
|
||||
----------------------------------------------------------------------
|
||||
Ran 2 tests in 8.236s
|
||||
|
||||
OK
|
||||
|
||||
exit=0
|
||||
$ python tests/smoke.py --base-url http://127.0.0.1:8080
|
||||
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
|
||||
|
||||
exit=0
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 106 KiB |
@@ -0,0 +1,586 @@
|
||||
{
|
||||
"date": "2026-11-11 17:50:57",
|
||||
"series": "A",
|
||||
"tag": "base_fixed_resources",
|
||||
"args": {
|
||||
"series": "A",
|
||||
"out": "evidence",
|
||||
"tag": "base_fixed_resources",
|
||||
"seconds": 30,
|
||||
"concurrency": 64,
|
||||
"procs": 8,
|
||||
"pg_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"repeat": 2
|
||||
},
|
||||
"results": [
|
||||
{
|
||||
"config": "1x2.0",
|
||||
"replicas": 1,
|
||||
"api_cpus_each": 2.0,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 1024,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 39595,
|
||||
"ok": 39561,
|
||||
"errors": {
|
||||
"429": 34
|
||||
},
|
||||
"seconds": 30,
|
||||
"ok_rps": 1318.7,
|
||||
"error_ratio": 0.0009,
|
||||
"p50_ms": 41.51,
|
||||
"p95_ms": 76.58,
|
||||
"p99_ms": 106.5
|
||||
},
|
||||
"get": {
|
||||
"requests": 4303,
|
||||
"ok": 4302,
|
||||
"errors": {
|
||||
"429": 1
|
||||
},
|
||||
"seconds": 30,
|
||||
"ok_rps": 143.4,
|
||||
"error_ratio": 0.0002,
|
||||
"p50_ms": 37.12,
|
||||
"p95_ms": 72.26,
|
||||
"p99_ms": 96.87
|
||||
},
|
||||
"total_rps": 1436.3,
|
||||
"replica_share": [
|
||||
40147
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 97.4,
|
||||
"samples": 14
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 14.5,
|
||||
"samples": 14
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 93.2,
|
||||
"samples": 14
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 3.7,
|
||||
"samples": 14
|
||||
}
|
||||
},
|
||||
"total_rps_runs": [
|
||||
1462.1,
|
||||
1410.5
|
||||
],
|
||||
"post_p95_runs": [
|
||||
76.58,
|
||||
80.56
|
||||
],
|
||||
"runs": [
|
||||
{
|
||||
"config": "1x2.0",
|
||||
"replicas": 1,
|
||||
"api_cpus_each": 2.0,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 1024,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 39595,
|
||||
"ok": 39561,
|
||||
"errors": {
|
||||
"429": 34
|
||||
},
|
||||
"seconds": 30,
|
||||
"ok_rps": 1318.7,
|
||||
"error_ratio": 0.0009,
|
||||
"p50_ms": 41.51,
|
||||
"p95_ms": 76.58,
|
||||
"p99_ms": 106.5
|
||||
},
|
||||
"get": {
|
||||
"requests": 4303,
|
||||
"ok": 4302,
|
||||
"errors": {
|
||||
"429": 1
|
||||
},
|
||||
"seconds": 30,
|
||||
"ok_rps": 143.4,
|
||||
"error_ratio": 0.0002,
|
||||
"p50_ms": 37.12,
|
||||
"p95_ms": 72.26,
|
||||
"p99_ms": 96.87
|
||||
},
|
||||
"total_rps": 1462.1,
|
||||
"replica_share": [
|
||||
40147
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 97.4,
|
||||
"samples": 14
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 14.5,
|
||||
"samples": 14
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 93.2,
|
||||
"samples": 14
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 3.7,
|
||||
"samples": 14
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "1x2.0",
|
||||
"replicas": 1,
|
||||
"api_cpus_each": 2.0,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 1024,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 38213,
|
||||
"ok": 38179,
|
||||
"errors": {
|
||||
"429": 34
|
||||
},
|
||||
"seconds": 30,
|
||||
"ok_rps": 1272.6,
|
||||
"error_ratio": 0.0009,
|
||||
"p50_ms": 42.5,
|
||||
"p95_ms": 80.56,
|
||||
"p99_ms": 104.62
|
||||
},
|
||||
"get": {
|
||||
"requests": 4139,
|
||||
"ok": 4135,
|
||||
"errors": {
|
||||
"429": 4
|
||||
},
|
||||
"seconds": 30,
|
||||
"ok_rps": 137.8,
|
||||
"error_ratio": 0.001,
|
||||
"p50_ms": 38.06,
|
||||
"p95_ms": 75.18,
|
||||
"p99_ms": 100.22
|
||||
},
|
||||
"total_rps": 1410.5,
|
||||
"replica_share": [
|
||||
38713
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 93.6,
|
||||
"samples": 15
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 14.8,
|
||||
"samples": 15
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 93.3,
|
||||
"samples": 15
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 3.7,
|
||||
"samples": 15
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "2x1.0",
|
||||
"replicas": 2,
|
||||
"api_cpus_each": 1.0,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 512,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 63318,
|
||||
"ok": 63317,
|
||||
"errors": {
|
||||
"429": 1
|
||||
},
|
||||
"seconds": 30,
|
||||
"ok_rps": 2110.6,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 21.51,
|
||||
"p95_ms": 65.69,
|
||||
"p99_ms": 104.19
|
||||
},
|
||||
"get": {
|
||||
"requests": 6926,
|
||||
"ok": 6926,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 230.9,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 15.75,
|
||||
"p95_ms": 59.35,
|
||||
"p99_ms": 93.11
|
||||
},
|
||||
"total_rps": 2139.7,
|
||||
"replica_share": [
|
||||
32033,
|
||||
32039
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 89.9,
|
||||
"samples": 26
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 28.5,
|
||||
"samples": 13
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 177.7,
|
||||
"samples": 13
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 6.7,
|
||||
"samples": 13
|
||||
}
|
||||
},
|
||||
"total_rps_runs": [
|
||||
2341.4,
|
||||
1938.0
|
||||
],
|
||||
"post_p95_runs": [
|
||||
65.69,
|
||||
79.86
|
||||
],
|
||||
"runs": [
|
||||
{
|
||||
"config": "2x1.0",
|
||||
"replicas": 2,
|
||||
"api_cpus_each": 1.0,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 512,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 63318,
|
||||
"ok": 63317,
|
||||
"errors": {
|
||||
"429": 1
|
||||
},
|
||||
"seconds": 30,
|
||||
"ok_rps": 2110.6,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 21.51,
|
||||
"p95_ms": 65.69,
|
||||
"p99_ms": 104.19
|
||||
},
|
||||
"get": {
|
||||
"requests": 6926,
|
||||
"ok": 6926,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 230.9,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 15.75,
|
||||
"p95_ms": 59.35,
|
||||
"p99_ms": 93.11
|
||||
},
|
||||
"total_rps": 2341.4,
|
||||
"replica_share": [
|
||||
32033,
|
||||
32039
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 89.9,
|
||||
"samples": 26
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 28.5,
|
||||
"samples": 13
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 177.7,
|
||||
"samples": 13
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 6.7,
|
||||
"samples": 13
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "2x1.0",
|
||||
"replicas": 2,
|
||||
"api_cpus_each": 1.0,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 512,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 52397,
|
||||
"ok": 52396,
|
||||
"errors": {
|
||||
"429": 1
|
||||
},
|
||||
"seconds": 30,
|
||||
"ok_rps": 1746.5,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 27.25,
|
||||
"p95_ms": 79.86,
|
||||
"p99_ms": 124.25
|
||||
},
|
||||
"get": {
|
||||
"requests": 5743,
|
||||
"ok": 5743,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 191.4,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 19.31,
|
||||
"p95_ms": 69.85,
|
||||
"p99_ms": 112.83
|
||||
},
|
||||
"total_rps": 1938.0,
|
||||
"replica_share": [
|
||||
26564,
|
||||
26641
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 74.2,
|
||||
"samples": 28
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 23.3,
|
||||
"samples": 14
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 140.7,
|
||||
"samples": 14
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 5.2,
|
||||
"samples": 14
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "4x0.5",
|
||||
"replicas": 4,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 256,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 51560,
|
||||
"ok": 51559,
|
||||
"errors": {
|
||||
"429": 1
|
||||
},
|
||||
"seconds": 30,
|
||||
"ok_rps": 1718.6,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 17.19,
|
||||
"p95_ms": 91.21,
|
||||
"p99_ms": 197.61
|
||||
},
|
||||
"get": {
|
||||
"requests": 5642,
|
||||
"ok": 5642,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 188.1,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 7.24,
|
||||
"p95_ms": 78.64,
|
||||
"p99_ms": 180.88
|
||||
},
|
||||
"total_rps": 1900.2,
|
||||
"replica_share": [
|
||||
13055,
|
||||
13071,
|
||||
13087,
|
||||
13123
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 47.5,
|
||||
"samples": 60
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 26.2,
|
||||
"samples": 15
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 162.8,
|
||||
"samples": 15
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 6.0,
|
||||
"samples": 15
|
||||
}
|
||||
},
|
||||
"total_rps_runs": [
|
||||
1906.7,
|
||||
1893.6
|
||||
],
|
||||
"post_p95_runs": [
|
||||
91.21,
|
||||
88.75
|
||||
],
|
||||
"runs": [
|
||||
{
|
||||
"config": "4x0.5",
|
||||
"replicas": 4,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 256,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 51560,
|
||||
"ok": 51559,
|
||||
"errors": {
|
||||
"429": 1
|
||||
},
|
||||
"seconds": 30,
|
||||
"ok_rps": 1718.6,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 17.19,
|
||||
"p95_ms": 91.21,
|
||||
"p99_ms": 197.61
|
||||
},
|
||||
"get": {
|
||||
"requests": 5642,
|
||||
"ok": 5642,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 188.1,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 7.24,
|
||||
"p95_ms": 78.64,
|
||||
"p99_ms": 180.88
|
||||
},
|
||||
"total_rps": 1906.7,
|
||||
"replica_share": [
|
||||
13055,
|
||||
13071,
|
||||
13087,
|
||||
13123
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 47.5,
|
||||
"samples": 60
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 26.2,
|
||||
"samples": 15
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 162.8,
|
||||
"samples": 15
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 6.0,
|
||||
"samples": 15
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "4x0.5",
|
||||
"replicas": 4,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 256,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 51195,
|
||||
"ok": 51195,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 1706.5,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 17.61,
|
||||
"p95_ms": 88.75,
|
||||
"p99_ms": 191.49
|
||||
},
|
||||
"get": {
|
||||
"requests": 5614,
|
||||
"ok": 5614,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 187.1,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 7.28,
|
||||
"p95_ms": 74.12,
|
||||
"p99_ms": 161.87
|
||||
},
|
||||
"total_rps": 1893.6,
|
||||
"replica_share": [
|
||||
12896,
|
||||
12938,
|
||||
12987,
|
||||
13020
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 47.7,
|
||||
"samples": 56
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 26.1,
|
||||
"samples": 14
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 161.4,
|
||||
"samples": 14
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 6.2,
|
||||
"samples": 14
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,576 @@
|
||||
{
|
||||
"date": "2026-11-11 17:55:14",
|
||||
"series": "A",
|
||||
"tag": "improved_fixed_resources",
|
||||
"args": {
|
||||
"series": "A",
|
||||
"out": "evidence",
|
||||
"tag": "improved_fixed_resources",
|
||||
"seconds": 30,
|
||||
"concurrency": 64,
|
||||
"procs": 8,
|
||||
"pg_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"repeat": 2
|
||||
},
|
||||
"results": [
|
||||
{
|
||||
"config": "1x2.0",
|
||||
"replicas": 1,
|
||||
"api_cpus_each": 2.0,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 1024,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 36780,
|
||||
"ok": 36745,
|
||||
"errors": {
|
||||
"429": 35
|
||||
},
|
||||
"seconds": 30,
|
||||
"ok_rps": 1224.8,
|
||||
"error_ratio": 0.001,
|
||||
"p50_ms": 41.98,
|
||||
"p95_ms": 73.11,
|
||||
"p99_ms": 106.4
|
||||
},
|
||||
"get": {
|
||||
"requests": 3964,
|
||||
"ok": 3963,
|
||||
"errors": {
|
||||
"429": 1
|
||||
},
|
||||
"seconds": 30,
|
||||
"ok_rps": 132.1,
|
||||
"error_ratio": 0.0003,
|
||||
"p50_ms": 66.32,
|
||||
"p95_ms": 114.9,
|
||||
"p99_ms": 134.98
|
||||
},
|
||||
"total_rps": 1363.6,
|
||||
"replica_share": [
|
||||
37279
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 60.1,
|
||||
"samples": 12
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 13.8,
|
||||
"samples": 12
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 63.7,
|
||||
"samples": 12
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 3.1,
|
||||
"samples": 12
|
||||
}
|
||||
},
|
||||
"total_rps_runs": [
|
||||
1356.9,
|
||||
1370.3
|
||||
],
|
||||
"post_p95_runs": [
|
||||
73.11,
|
||||
67.04
|
||||
],
|
||||
"runs": [
|
||||
{
|
||||
"config": "1x2.0",
|
||||
"replicas": 1,
|
||||
"api_cpus_each": 2.0,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 1024,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 36780,
|
||||
"ok": 36745,
|
||||
"errors": {
|
||||
"429": 35
|
||||
},
|
||||
"seconds": 30,
|
||||
"ok_rps": 1224.8,
|
||||
"error_ratio": 0.001,
|
||||
"p50_ms": 41.98,
|
||||
"p95_ms": 73.11,
|
||||
"p99_ms": 106.4
|
||||
},
|
||||
"get": {
|
||||
"requests": 3964,
|
||||
"ok": 3963,
|
||||
"errors": {
|
||||
"429": 1
|
||||
},
|
||||
"seconds": 30,
|
||||
"ok_rps": 132.1,
|
||||
"error_ratio": 0.0003,
|
||||
"p50_ms": 66.32,
|
||||
"p95_ms": 114.9,
|
||||
"p99_ms": 134.98
|
||||
},
|
||||
"total_rps": 1356.9,
|
||||
"replica_share": [
|
||||
37279
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 60.1,
|
||||
"samples": 12
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 13.8,
|
||||
"samples": 12
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 63.7,
|
||||
"samples": 12
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 3.1,
|
||||
"samples": 12
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "1x2.0",
|
||||
"replicas": 1,
|
||||
"api_cpus_each": 2.0,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 1024,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 37146,
|
||||
"ok": 37113,
|
||||
"errors": {
|
||||
"429": 33
|
||||
},
|
||||
"seconds": 30,
|
||||
"ok_rps": 1237.1,
|
||||
"error_ratio": 0.0009,
|
||||
"p50_ms": 41.04,
|
||||
"p95_ms": 67.04,
|
||||
"p99_ms": 108.44
|
||||
},
|
||||
"get": {
|
||||
"requests": 3995,
|
||||
"ok": 3995,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 133.2,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 65.15,
|
||||
"p95_ms": 116.19,
|
||||
"p99_ms": 137.05
|
||||
},
|
||||
"total_rps": 1370.3,
|
||||
"replica_share": [
|
||||
37696
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 60.5,
|
||||
"samples": 15
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 13.6,
|
||||
"samples": 15
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 63.3,
|
||||
"samples": 15
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 3.2,
|
||||
"samples": 15
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "2x1.0",
|
||||
"replicas": 2,
|
||||
"api_cpus_each": 1.0,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 512,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 72773,
|
||||
"ok": 72773,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 2425.8,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 21.44,
|
||||
"p95_ms": 35.99,
|
||||
"p99_ms": 85.93
|
||||
},
|
||||
"get": {
|
||||
"requests": 7950,
|
||||
"ok": 7950,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 265.0,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 24.37,
|
||||
"p95_ms": 53.55,
|
||||
"p99_ms": 103.17
|
||||
},
|
||||
"total_rps": 2657.6,
|
||||
"replica_share": [
|
||||
36843,
|
||||
36962
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 66.2,
|
||||
"samples": 30
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 30.9,
|
||||
"samples": 15
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 138.1,
|
||||
"samples": 15
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 5.9,
|
||||
"samples": 15
|
||||
}
|
||||
},
|
||||
"total_rps_runs": [
|
||||
2690.8,
|
||||
2624.3
|
||||
],
|
||||
"post_p95_runs": [
|
||||
35.99,
|
||||
41.08
|
||||
],
|
||||
"runs": [
|
||||
{
|
||||
"config": "2x1.0",
|
||||
"replicas": 2,
|
||||
"api_cpus_each": 1.0,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 512,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 72773,
|
||||
"ok": 72773,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 2425.8,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 21.44,
|
||||
"p95_ms": 35.99,
|
||||
"p99_ms": 85.93
|
||||
},
|
||||
"get": {
|
||||
"requests": 7950,
|
||||
"ok": 7950,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 265.0,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 24.37,
|
||||
"p95_ms": 53.55,
|
||||
"p99_ms": 103.17
|
||||
},
|
||||
"total_rps": 2690.8,
|
||||
"replica_share": [
|
||||
36843,
|
||||
36962
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 66.2,
|
||||
"samples": 30
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 30.9,
|
||||
"samples": 15
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 138.1,
|
||||
"samples": 15
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 5.9,
|
||||
"samples": 15
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "2x1.0",
|
||||
"replicas": 2,
|
||||
"api_cpus_each": 1.0,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 512,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 70978,
|
||||
"ok": 70977,
|
||||
"errors": {
|
||||
"429": 1
|
||||
},
|
||||
"seconds": 30,
|
||||
"ok_rps": 2365.9,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 22.0,
|
||||
"p95_ms": 41.08,
|
||||
"p99_ms": 86.02
|
||||
},
|
||||
"get": {
|
||||
"requests": 7752,
|
||||
"ok": 7752,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 258.4,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 24.87,
|
||||
"p95_ms": 62.36,
|
||||
"p99_ms": 102.83
|
||||
},
|
||||
"total_rps": 2624.3,
|
||||
"replica_share": [
|
||||
35999,
|
||||
36034
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 72.0,
|
||||
"samples": 28
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 33.5,
|
||||
"samples": 14
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 148.3,
|
||||
"samples": 14
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 6.5,
|
||||
"samples": 14
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "4x0.5",
|
||||
"replicas": 4,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 256,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 72370,
|
||||
"ok": 72370,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 2412.3,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 12.69,
|
||||
"p95_ms": 67.31,
|
||||
"p99_ms": 142.31
|
||||
},
|
||||
"get": {
|
||||
"requests": 7916,
|
||||
"ok": 7916,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 263.9,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 7.99,
|
||||
"p95_ms": 69.94,
|
||||
"p99_ms": 200.78
|
||||
},
|
||||
"total_rps": 2675.1,
|
||||
"replica_share": [
|
||||
18332,
|
||||
18363,
|
||||
18384,
|
||||
18399
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 45.9,
|
||||
"samples": 56
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 34.5,
|
||||
"samples": 14
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 162.3,
|
||||
"samples": 14
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 8.1,
|
||||
"samples": 14
|
||||
}
|
||||
},
|
||||
"total_rps_runs": [
|
||||
2676.2,
|
||||
2673.9
|
||||
],
|
||||
"post_p95_runs": [
|
||||
67.31,
|
||||
67.88
|
||||
],
|
||||
"runs": [
|
||||
{
|
||||
"config": "4x0.5",
|
||||
"replicas": 4,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 256,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 72370,
|
||||
"ok": 72370,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 2412.3,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 12.69,
|
||||
"p95_ms": 67.31,
|
||||
"p99_ms": 142.31
|
||||
},
|
||||
"get": {
|
||||
"requests": 7916,
|
||||
"ok": 7916,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 263.9,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 7.99,
|
||||
"p95_ms": 69.94,
|
||||
"p99_ms": 200.78
|
||||
},
|
||||
"total_rps": 2676.2,
|
||||
"replica_share": [
|
||||
18332,
|
||||
18363,
|
||||
18384,
|
||||
18399
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 45.9,
|
||||
"samples": 56
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 34.5,
|
||||
"samples": 14
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 162.3,
|
||||
"samples": 14
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 8.1,
|
||||
"samples": 14
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "4x0.5",
|
||||
"replicas": 4,
|
||||
"api_cpus_each": 0.5,
|
||||
"api_cpus_total": 2.0,
|
||||
"api_memory_mib_each": 256,
|
||||
"api_memory_mib_total": 1024,
|
||||
"postgres_cpus": 2.0,
|
||||
"lb_cpus": 2.0,
|
||||
"concurrency": 64,
|
||||
"client_processes": 8,
|
||||
"post": {
|
||||
"requests": 72314,
|
||||
"ok": 72314,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 2410.5,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 13.28,
|
||||
"p95_ms": 67.88,
|
||||
"p99_ms": 116.45
|
||||
},
|
||||
"get": {
|
||||
"requests": 7903,
|
||||
"ok": 7903,
|
||||
"errors": {},
|
||||
"seconds": 30,
|
||||
"ok_rps": 263.4,
|
||||
"error_ratio": 0.0,
|
||||
"p50_ms": 8.06,
|
||||
"p95_ms": 71.78,
|
||||
"p99_ms": 190.09
|
||||
},
|
||||
"total_rps": 2673.9,
|
||||
"replica_share": [
|
||||
18245,
|
||||
18289,
|
||||
18294,
|
||||
18352
|
||||
],
|
||||
"docker_stats": {
|
||||
"api": {
|
||||
"avg_cpu_percent_per_container": 47.9,
|
||||
"samples": 56
|
||||
},
|
||||
"lb": {
|
||||
"avg_cpu_percent_per_container": 38.3,
|
||||
"samples": 14
|
||||
},
|
||||
"postgres": {
|
||||
"avg_cpu_percent_per_container": 177.5,
|
||||
"samples": 14
|
||||
},
|
||||
"valkey": {
|
||||
"avg_cpu_percent_per_container": 8.6,
|
||||
"samples": 14
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user