This commit is contained in:
Vladislav Kunetskiy
2026-10-16 16:39:00 +03:00
parent 4e84354642
commit 1ed57cd49f
98 changed files with 6574 additions and 449 deletions
+25
View File
@@ -0,0 +1,25 @@
{
"lab": 3,
"workload": "closed-loop POST messages; failures counted, not raised",
"requested_duration_seconds": 60.0,
"elapsed_seconds": 60.012,
"concurrency": 8,
"successful_requests": 101685,
"failed_requests": 4,
"error_ratio": 3.9e-05,
"errors_by_kind": {
"http_error": 4
},
"successful_rps": 1694.423,
"successful_latency_ms": {
"p50": 3.971,
"p95": 8.062,
"p99": 23.175
},
"instances": {
"6f572ff329c7": 3673,
"8b63314a0aae": 51567,
"ed9b4a867eaf": 46445
},
"note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update."
}
+25
View File
@@ -0,0 +1,25 @@
{
"lab": 3,
"workload": "closed-loop POST messages; failures counted, not raised",
"requested_duration_seconds": 60.0,
"elapsed_seconds": 60.012,
"concurrency": 8,
"successful_requests": 101685,
"failed_requests": 4,
"error_ratio": 3.9e-05,
"errors_by_kind": {
"http_error": 4
},
"successful_rps": 1694.423,
"successful_latency_ms": {
"p50": 3.971,
"p95": 8.062,
"p99": 23.175
},
"instances": {
"6f572ff329c7": 3673,
"8b63314a0aae": 51567,
"ed9b4a867eaf": 46445
},
"note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update."
}
@@ -0,0 +1,136 @@
# Rolling update under load
# generated: 2026-10-16T13:36:30Z
# load: tests/load.py duration=60s concurrency=8 (closed loop)
# steps: delete one replica, recreate it from the freshly built image, wait for health + LB
time="2026-10-16T16:36:30+03:00" level=warning msg="buildx Docker CLI plugin not found: falling back to the classic builder. BuildKit-only build features (multi-arch, secrets, ssh, additional contexts, ...) will not be available"
Image mtusi-messenger:lab3 Building
Image mtusi-messenger:lab3 Building
Sending build context to Docker daemon 218.8kB␍
Step 1/25 : ARG GO_VERSION=1.27.1
Step 2/25 : ARG ALPINE_VERSION=3.22
Step 3/25 : FROM golang:${GO_VERSION}-alpine AS build
---> 8a5910f31396
Step 4/25 : ARG TARGETOS
---> Using cache
---> d5f2c47ea7a5
Step 5/25 : ARG TARGETARCH
---> Using cache
---> 047ee34b445c
Step 6/25 : ARG VERSION=dev
---> Using cache
---> a529d045efeb
Step 7/25 : ENV GOTOOLCHAIN=local
---> Using cache
---> 428f1b16b5c5
Step 8/25 : WORKDIR /opt
---> Using cache
---> f37febf8b423
Step 9/25 : COPY go.mod go.sum ./
---> Using cache
---> c4015f597b99
Step 10/25 : RUN go mod download
---> Using cache
---> 34ef6a6167b0
Step 11/25 : ARG GOFLAGS="-p=2"
---> Using cache
---> deb54a0ce57a
Step 12/25 : ENV GOFLAGS=$GOFLAGS
---> Using cache
---> 3da36569422d
Step 13/25 : COPY . .
---> 20bd22e6c5a6
Step 14/25 : RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -buildvcs=false -tags timetzdata -ldflags="-s -w -X main.version=${VERSION}" -o /out/messenger ./cmd/messenger && CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -buildvcs=false -tags timetzdata -ldflags="-s -w -X main.version=${VERSION}" -o /out/migrate ./cmd/migrate
---> Running in 3975cf2aa5aa
---> Removed intermediate container 3975cf2aa5aa
---> 3d418af44a0b
Step 15/25 : FROM alpine:${ALPINE_VERSION} AS runtime
---> 5291449c3df7
Step 16/25 : RUN apk add --no-cache ca-certificates wget && addgroup -S -g 10001 app && adduser -S -D -H -u 10001 -G app app
---> Using cache
---> f47b074d9bd5
Step 17/25 : COPY --from=build --chown=10001:10001 /out/messenger /usr/local/bin/messenger
---> Using cache
---> 50fc6abe3b04
Step 18/25 : COPY --from=build --chown=10001:10001 /out/migrate /usr/local/bin/migrate
---> Using cache
---> 9bf6afe0256d
Step 19/25 : COPY --chown=10001:10001 config/dev/config.yaml /etc/messenger/dev/config.yaml
---> Using cache
---> 0d1870a325ec
Step 20/25 : USER 10001:10001
---> Using cache
---> 1991f2ae06cc
Step 21/25 : EXPOSE 8080
---> Using cache
---> 762d1bfb7606
Step 22/25 : STOPSIGNAL SIGTERM
---> Using cache
---> 8a9d8f4f7101
Step 23/25 : HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 CMD wget -q -O /dev/null "http://127.0.0.1:${SERVER_PORT:-8080}/health/live" || exit 1
---> Using cache
---> 65dea502a3f3
Step 24/25 : ENTRYPOINT ["/usr/local/bin/messenger"]
---> Using cache
---> 83bbee72905e
Step 25/25 : LABEL com.docker.compose.image.builder=classic
---> Using cache
---> 037f969d5ea1
Successfully built 037f969d5ea1
Successfully tagged mtusi-messenger:lab3
Image mtusi-messenger:lab3 Built
Image mtusi-messenger:lab3 Built
Container mtusi-messenger-lab3-api-3 Recreate
Container mtusi-messenger-lab3-api-4 Recreate
Container mtusi-messenger-lab3-api-4 Recreated
Container mtusi-messenger-lab3-api-3 Recreated
Container mtusi-messenger-lab3-api-3 Starting
Container mtusi-messenger-lab3-api-3 Started
Container mtusi-messenger-lab3-api-4 Starting
Container mtusi-messenger-lab3-api-4 Started
replicas before: 2; instances seen through LB: 2
Container mtusi-messenger-lab3-api-4 Running
Container mtusi-messenger-lab3-api-5 Creating
Container mtusi-messenger-lab3-api-5 Created
Container mtusi-messenger-lab3-api-5 Starting
Container mtusi-messenger-lab3-api-5 Started
step 1: removed a9189349e890 at 2026-10-16T13:37:17Z, 2 healthy replicas served again at 2026-10-16T13:37:23Z
Container mtusi-messenger-lab3-api-5 Running
Container mtusi-messenger-lab3-api-6 Creating
Container mtusi-messenger-lab3-api-6 Created
Container mtusi-messenger-lab3-api-6 Starting
Container mtusi-messenger-lab3-api-6 Started
step 2: removed 6f572ff329c7 at 2026-10-16T13:37:23Z, 2 healthy replicas served again at 2026-10-16T13:37:28Z
load summary (tolerant generator):
{
"lab": 3,
"workload": "closed-loop POST messages; failures counted, not raised",
"requested_duration_seconds": 60.0,
"elapsed_seconds": 60.012,
"concurrency": 8,
"successful_requests": 101685,
"failed_requests": 4,
"error_ratio": 3.9e-05,
"errors_by_kind": {
"http_error": 4
},
"successful_rps": 1694.423,
"successful_latency_ms": {
"p50": 3.971,
"p95": 8.062,
"p99": 23.175
},
"instances": {
"6f572ff329c7": 3673,
"8b63314a0aae": 51567,
"ed9b4a867eaf": 46445
},
"note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update."
}
LB responses with 5xx during the update: 0
API containers after the update:
mtusi-messenger-lab3-api-6 Up 55 seconds (healthy)
mtusi-messenger-lab3-api-5 Up About a minute (healthy)
@@ -0,0 +1,25 @@
{
"lab": 3,
"workload": "closed-loop POST messages; failures counted, not raised",
"requested_duration_seconds": 60.0,
"elapsed_seconds": 60.023,
"concurrency": 8,
"successful_requests": 119005,
"failed_requests": 1323,
"error_ratio": 0.010995,
"errors_by_kind": {
"connection_broken": 1323
},
"successful_rps": 1982.673,
"successful_latency_ms": {
"p50": 3.88,
"p95": 5.891,
"p99": 7.733
},
"instances": {
"e327ef9e0e4e": 7594,
"0bd2666d4be8": 60080,
"c35d7accbbd1": 51331
},
"note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update."
}
@@ -0,0 +1,25 @@
{
"lab": 3,
"workload": "closed-loop POST messages; failures counted, not raised",
"requested_duration_seconds": 60.0,
"elapsed_seconds": 60.023,
"concurrency": 8,
"successful_requests": 119005,
"failed_requests": 1323,
"error_ratio": 0.010995,
"errors_by_kind": {
"connection_broken": 1323
},
"successful_rps": 1982.673,
"successful_latency_ms": {
"p50": 3.88,
"p95": 5.891,
"p99": 7.733
},
"instances": {
"e327ef9e0e4e": 7594,
"0bd2666d4be8": 60080,
"c35d7accbbd1": 51331
},
"note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update."
}
@@ -0,0 +1,144 @@
# Rolling update under load
# generated: 2026-10-15T18:59:10Z
# load: tests/load.py duration=60s concurrency=8 (closed loop)
# steps: delete one replica, recreate it from the freshly built image, wait for health + LB
time="2026-10-15T21:59:10+03:00" level=warning msg="buildx Docker CLI plugin not found: falling back to the classic builder. BuildKit-only build features (multi-arch, secrets, ssh, additional contexts, ...) will not be available"
Image mtusi-messenger:lab3 Building
Image mtusi-messenger:lab3 Building
Sending build context to Docker daemon 213.7kB␍
Step 1/25 : ARG GO_VERSION=1.27.1
Step 2/25 : ARG ALPINE_VERSION=3.22
Step 3/25 : FROM golang:${GO_VERSION}-alpine AS build
---> 8a5910f31396
Step 4/25 : ARG TARGETOS
---> Using cache
---> d5f2c47ea7a5
Step 5/25 : ARG TARGETARCH
---> Using cache
---> 047ee34b445c
Step 6/25 : ARG VERSION=dev
---> Using cache
---> a529d045efeb
Step 7/25 : ENV GOTOOLCHAIN=local
---> Using cache
---> 428f1b16b5c5
Step 8/25 : WORKDIR /opt
---> Using cache
---> f37febf8b423
Step 9/25 : COPY go.mod go.sum ./
---> Using cache
---> c4015f597b99
Step 10/25 : RUN go mod download
---> Using cache
---> 34ef6a6167b0
Step 11/25 : ARG GOFLAGS="-p=2"
---> Using cache
---> deb54a0ce57a
Step 12/25 : ENV GOFLAGS=$GOFLAGS
---> Using cache
---> 3da36569422d
Step 13/25 : COPY . .
---> 596dc1ab02d1
Step 14/25 : RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -buildvcs=false -tags timetzdata -ldflags="-s -w -X main.version=${VERSION}" -o /out/messenger ./cmd/messenger && CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -buildvcs=false -tags timetzdata -ldflags="-s -w -X main.version=${VERSION}" -o /out/migrate ./cmd/migrate
---> Running in dd30e24fc0a9
---> Removed intermediate container dd30e24fc0a9
---> 01aa8bc6200d
Step 15/25 : FROM alpine:${ALPINE_VERSION} AS runtime
---> 5291449c3df7
Step 16/25 : RUN apk add --no-cache ca-certificates wget && addgroup -S -g 10001 app && adduser -S -D -H -u 10001 -G app app
---> Using cache
---> f47b074d9bd5
Step 17/25 : COPY --from=build --chown=10001:10001 /out/messenger /usr/local/bin/messenger
---> Using cache
---> 50fc6abe3b04
Step 18/25 : COPY --from=build --chown=10001:10001 /out/migrate /usr/local/bin/migrate
---> Using cache
---> 9bf6afe0256d
Step 19/25 : COPY --chown=10001:10001 config/dev/config.yaml /etc/messenger/dev/config.yaml
---> Using cache
---> 0d1870a325ec
Step 20/25 : USER 10001:10001
---> Using cache
---> 1991f2ae06cc
Step 21/25 : EXPOSE 8080
---> Using cache
---> 762d1bfb7606
Step 22/25 : STOPSIGNAL SIGTERM
---> Using cache
---> 8a9d8f4f7101
Step 23/25 : HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 CMD wget -q -O /dev/null "http://127.0.0.1:${SERVER_PORT:-8080}/health/live" || exit 1
---> Using cache
---> 65dea502a3f3
Step 24/25 : ENTRYPOINT ["/usr/local/bin/messenger"]
---> Using cache
---> 83bbee72905e
Step 25/25 : LABEL com.docker.compose.image.builder=classic
---> Using cache
---> 037f969d5ea1
Successfully built 037f969d5ea1
Successfully tagged mtusi-messenger:lab3
Image mtusi-messenger:lab3 Built
Image mtusi-messenger:lab3 Built
Container mtusi-messenger-lab3-api-14 Stopping
Container mtusi-messenger-lab3-api-12 Recreate
Container mtusi-messenger-lab3-api-15 Stopping
Container mtusi-messenger-lab3-api-13 Recreate
Container mtusi-messenger-lab3-api-15 Stopped
Container mtusi-messenger-lab3-api-15 Removing
Container mtusi-messenger-lab3-api-14 Stopped
Container mtusi-messenger-lab3-api-14 Removing
Container mtusi-messenger-lab3-api-15 Removed
Container mtusi-messenger-lab3-api-14 Removed
Container mtusi-messenger-lab3-api-12 Recreated
Container mtusi-messenger-lab3-api-13 Recreated
Container mtusi-messenger-lab3-api-13 Starting
Container mtusi-messenger-lab3-api-13 Started
Container mtusi-messenger-lab3-api-12 Starting
Container mtusi-messenger-lab3-api-12 Started
replicas before: 2; instances seen through LB: 2
Container mtusi-messenger-lab3-api-12 Running
Container mtusi-messenger-lab3-api-13 Creating
Container mtusi-messenger-lab3-api-13 Created
Container mtusi-messenger-lab3-api-13 Starting
Container mtusi-messenger-lab3-api-13 Started
step 1: removed 3b7d42e67efa at 2026-10-15T18:59:58Z, 2 healthy replicas served again at 2026-10-15T19:00:04Z
Container mtusi-messenger-lab3-api-13 Running
Container mtusi-messenger-lab3-api-14 Creating
Container mtusi-messenger-lab3-api-14 Created
Container mtusi-messenger-lab3-api-14 Starting
Container mtusi-messenger-lab3-api-14 Started
step 2: removed e327ef9e0e4e at 2026-10-15T19:00:04Z, 2 healthy replicas served again at 2026-10-15T19:00:10Z
load summary (tolerant generator):
{
"lab": 3,
"workload": "closed-loop POST messages; failures counted, not raised",
"requested_duration_seconds": 60.0,
"elapsed_seconds": 60.023,
"concurrency": 8,
"successful_requests": 119005,
"failed_requests": 1323,
"error_ratio": 0.010995,
"errors_by_kind": {
"connection_broken": 1323
},
"successful_rps": 1982.673,
"successful_latency_ms": {
"p50": 3.88,
"p95": 5.891,
"p99": 7.733
},
"instances": {
"e327ef9e0e4e": 7594,
"0bd2666d4be8": 60080,
"c35d7accbbd1": 51331
},
"note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update."
}
LB responses with 5xx during the update: 0
API containers after the update:
mtusi-messenger-lab3-api-14 Up 55 seconds (healthy)
mtusi-messenger-lab3-api-13 Up About a minute (healthy)
@@ -0,0 +1,23 @@
{
"lab": 3,
"workload": "closed-loop POST messages; failures counted, not raised",
"requested_duration_seconds": 45.0,
"elapsed_seconds": 45.014,
"concurrency": 8,
"successful_requests": 89560,
"failed_requests": 0,
"error_ratio": 0.0,
"errors_by_kind": {},
"successful_rps": 1989.584,
"successful_latency_ms": {
"p50": 3.905,
"p95": 6.02,
"p99": 7.984
},
"instances": {
"388ebcb74200": 7524,
"73d07d7d76db": 45354,
"cc6274635bd6": 36682
},
"note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update."
}
+23
View File
@@ -0,0 +1,23 @@
{
"lab": 3,
"workload": "closed-loop POST messages; failures counted, not raised",
"requested_duration_seconds": 45.0,
"elapsed_seconds": 45.014,
"concurrency": 8,
"successful_requests": 89560,
"failed_requests": 0,
"error_ratio": 0.0,
"errors_by_kind": {},
"successful_rps": 1989.584,
"successful_latency_ms": {
"p50": 3.905,
"p95": 6.02,
"p99": 7.984
},
"instances": {
"388ebcb74200": 7524,
"73d07d7d76db": 45354,
"cc6274635bd6": 36682
},
"note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update."
}
@@ -0,0 +1,134 @@
# Rolling update under load
# generated: 2026-10-15T19:03:13Z
# load: tests/load.py duration=45s concurrency=8 (closed loop)
# steps: delete one replica, recreate it from the freshly built image, wait for health + LB
time="2026-10-15T22:03:13+03:00" level=warning msg="buildx Docker CLI plugin not found: falling back to the classic builder. BuildKit-only build features (multi-arch, secrets, ssh, additional contexts, ...) will not be available"
Image mtusi-messenger:lab3 Building
Image mtusi-messenger:lab3 Building
Sending build context to Docker daemon 213.7kB␍
Step 1/25 : ARG GO_VERSION=1.27.1
Step 2/25 : ARG ALPINE_VERSION=3.22
Step 3/25 : FROM golang:${GO_VERSION}-alpine AS build
---> 8a5910f31396
Step 4/25 : ARG TARGETOS
---> Using cache
---> d5f2c47ea7a5
Step 5/25 : ARG TARGETARCH
---> Using cache
---> 047ee34b445c
Step 6/25 : ARG VERSION=dev
---> Using cache
---> a529d045efeb
Step 7/25 : ENV GOTOOLCHAIN=local
---> Using cache
---> 428f1b16b5c5
Step 8/25 : WORKDIR /opt
---> Using cache
---> f37febf8b423
Step 9/25 : COPY go.mod go.sum ./
---> Using cache
---> c4015f597b99
Step 10/25 : RUN go mod download
---> Using cache
---> 34ef6a6167b0
Step 11/25 : ARG GOFLAGS="-p=2"
---> Using cache
---> deb54a0ce57a
Step 12/25 : ENV GOFLAGS=$GOFLAGS
---> Using cache
---> 3da36569422d
Step 13/25 : COPY . .
---> Using cache
---> 596dc1ab02d1
Step 14/25 : RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -buildvcs=false -tags timetzdata -ldflags="-s -w -X main.version=${VERSION}" -o /out/messenger ./cmd/messenger && CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -buildvcs=false -tags timetzdata -ldflags="-s -w -X main.version=${VERSION}" -o /out/migrate ./cmd/migrate
---> Using cache
---> 01aa8bc6200d
Step 15/25 : FROM alpine:${ALPINE_VERSION} AS runtime
---> 5291449c3df7
Step 16/25 : RUN apk add --no-cache ca-certificates wget && addgroup -S -g 10001 app && adduser -S -D -H -u 10001 -G app app
---> Using cache
---> f47b074d9bd5
Step 17/25 : COPY --from=build --chown=10001:10001 /out/messenger /usr/local/bin/messenger
---> Using cache
---> 50fc6abe3b04
Step 18/25 : COPY --from=build --chown=10001:10001 /out/migrate /usr/local/bin/migrate
---> Using cache
---> 9bf6afe0256d
Step 19/25 : COPY --chown=10001:10001 config/dev/config.yaml /etc/messenger/dev/config.yaml
---> Using cache
---> 0d1870a325ec
Step 20/25 : USER 10001:10001
---> Using cache
---> 1991f2ae06cc
Step 21/25 : EXPOSE 8080
---> Using cache
---> 762d1bfb7606
Step 22/25 : STOPSIGNAL SIGTERM
---> Using cache
---> 8a9d8f4f7101
Step 23/25 : HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 CMD wget -q -O /dev/null "http://127.0.0.1:${SERVER_PORT:-8080}/health/live" || exit 1
---> Using cache
---> 65dea502a3f3
Step 24/25 : ENTRYPOINT ["/usr/local/bin/messenger"]
---> Using cache
---> 83bbee72905e
Step 25/25 : LABEL com.docker.compose.image.builder=classic
---> Using cache
---> 037f969d5ea1
Successfully built 037f969d5ea1
Successfully tagged mtusi-messenger:lab3
Image mtusi-messenger:lab3 Built
Image mtusi-messenger:lab3 Built
Container mtusi-messenger-lab3-api-13 Recreate
Container mtusi-messenger-lab3-api-14 Recreate
Container mtusi-messenger-lab3-api-13 Recreated
Container mtusi-messenger-lab3-api-14 Recreated
Container mtusi-messenger-lab3-api-14 Starting
Container mtusi-messenger-lab3-api-14 Started
Container mtusi-messenger-lab3-api-13 Starting
Container mtusi-messenger-lab3-api-13 Started
replicas before: 2; instances seen through LB: 2
Container mtusi-messenger-lab3-api-13 Running
Container mtusi-messenger-lab3-api-14 Creating
Container mtusi-messenger-lab3-api-14 Created
Container mtusi-messenger-lab3-api-14 Starting
Container mtusi-messenger-lab3-api-14 Started
step 1: removed 54a7e7888b5f at 2026-10-15T19:03:20Z, 2 healthy replicas served again at 2026-10-15T19:03:26Z
Container mtusi-messenger-lab3-api-14 Running
Container mtusi-messenger-lab3-api-15 Creating
Container mtusi-messenger-lab3-api-15 Created
Container mtusi-messenger-lab3-api-15 Starting
Container mtusi-messenger-lab3-api-15 Started
step 2: removed 388ebcb74200 at 2026-10-15T19:03:26Z, 2 healthy replicas served again at 2026-10-15T19:03:31Z
load summary (tolerant generator):
{
"lab": 3,
"workload": "closed-loop POST messages; failures counted, not raised",
"requested_duration_seconds": 45.0,
"elapsed_seconds": 45.014,
"concurrency": 8,
"successful_requests": 89560,
"failed_requests": 0,
"error_ratio": 0.0,
"errors_by_kind": {},
"successful_rps": 1989.584,
"successful_latency_ms": {
"p50": 3.905,
"p95": 6.02,
"p99": 7.984
},
"instances": {
"388ebcb74200": 7524,
"73d07d7d76db": 45354,
"cc6274635bd6": 36682
},
"note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update."
}
LB responses with 5xx during the update: 0
API containers after the update:
mtusi-messenger-lab3-api-15 Up 41 seconds (healthy)
mtusi-messenger-lab3-api-14 Up 46 seconds (healthy)