Implement lab3 scaling, shared idempotency, failure research and defense guide
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
@@ -0,0 +1,4 @@
|
||||
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:8083"
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 127, "failed_attempts": 2, "first_recovery_seconds": 0.22}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"parallel_requests": 24,
|
||||
"created_messages": 1,
|
||||
"observed_instances": [
|
||||
"06c17f3fd78c",
|
||||
"46116d767576"
|
||||
],
|
||||
"user_chat_scope": true,
|
||||
"revalidation_after_logout": true
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
PASS: {"parallel_requests": 24, "created_messages": 1, "observed_instances": ["06c17f3fd78c", "46116d767576"], "user_chat_scope": true, "revalidation_after_logout": true}
|
||||
@@ -0,0 +1,3 @@
|
||||
/private/tmp/highload-plot-venv/lib/python3.9/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
|
||||
warnings.warn(
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"failures": [
|
||||
{
|
||||
"successful_writes": 233,
|
||||
"errors": 3,
|
||||
"successful_rps": 28.26398295000387,
|
||||
"first_recovery_seconds": 1.247,
|
||||
"action_seconds": 0.215,
|
||||
"instances": [
|
||||
"32d750fe3f45",
|
||||
"738574307aaf"
|
||||
],
|
||||
"confirmed_preserved": true,
|
||||
"stopped_alias": "738574307aaf"
|
||||
},
|
||||
{
|
||||
"successful_writes": 225,
|
||||
"errors": 3,
|
||||
"successful_rps": 27.114240700400842,
|
||||
"first_recovery_seconds": 0.731,
|
||||
"action_seconds": 0.247,
|
||||
"instances": [
|
||||
"32d750fe3f45",
|
||||
"738574307aaf"
|
||||
],
|
||||
"confirmed_preserved": true,
|
||||
"stopped_alias": "32d750fe3f45"
|
||||
}
|
||||
],
|
||||
"rolling": {
|
||||
"successful_writes": 576,
|
||||
"errors": 3,
|
||||
"successful_rps": 30.377124752850243,
|
||||
"first_recovery_seconds": 15.885,
|
||||
"action_seconds": 15.858,
|
||||
"instances": [
|
||||
"32d750fe3f45",
|
||||
"738574307aaf",
|
||||
"7c6406e3d6f5",
|
||||
"c56a9ffc6739"
|
||||
],
|
||||
"confirmed_preserved": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
Container mtusi-lab3-kraykin-api-2 Running
|
||||
Container mtusi-lab3-kraykin-api-3 Creating
|
||||
Container mtusi-lab3-kraykin-api-3 Created
|
||||
Container mtusi-lab3-kraykin-api-3 Starting
|
||||
Container mtusi-lab3-kraykin-api-3 Started
|
||||
Container mtusi-lab3-kraykin-api-3 Waiting
|
||||
Container mtusi-lab3-kraykin-api-2 Waiting
|
||||
Container mtusi-lab3-kraykin-api-3 Healthy
|
||||
Container mtusi-lab3-kraykin-api-2 Healthy
|
||||
Container mtusi-lab3-kraykin-api-3 Running
|
||||
Container mtusi-lab3-kraykin-api-4 Creating
|
||||
Container mtusi-lab3-kraykin-api-4 Created
|
||||
Container mtusi-lab3-kraykin-api-4 Starting
|
||||
Container mtusi-lab3-kraykin-api-4 Started
|
||||
Container mtusi-lab3-kraykin-api-4 Waiting
|
||||
Container mtusi-lab3-kraykin-api-3 Waiting
|
||||
Container mtusi-lab3-kraykin-api-4 Healthy
|
||||
Container mtusi-lab3-kraykin-api-3 Healthy
|
||||
PASS: each API stopped and rolling replacement completed; confirmed writes preserved
|
||||
@@ -0,0 +1,3 @@
|
||||
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8083"
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
@@ -0,0 +1 @@
|
||||
Wrote PNG/PDF/CSV/Markdown from raw evidence
|
||||
@@ -0,0 +1,159 @@
|
||||
docker compose --profile verify run --build --rm tests
|
||||
Compose can now delegate builds to bake for better performance.
|
||||
To do so, set COMPOSE_BAKE=true.
|
||||
#0 building with "desktop-linux" instance using docker driver
|
||||
|
||||
#1 [migrate internal] load build definition from Dockerfile
|
||||
#1 transferring dockerfile: 782B done
|
||||
#1 DONE 0.0s
|
||||
|
||||
#2 [migrate internal] load metadata for docker.io/library/golang:1.24.4-alpine3.22
|
||||
#2 DONE 0.3s
|
||||
|
||||
#3 [migrate internal] load metadata for docker.io/library/alpine:3.22.1
|
||||
#3 DONE 0.3s
|
||||
|
||||
#4 [migrate stage-2 1/3] FROM docker.io/library/alpine:3.22.1@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1
|
||||
#4 resolve docker.io/library/alpine:3.22.1@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1 0.0s done
|
||||
#4 DONE 0.0s
|
||||
|
||||
#5 [migrate build 1/7] FROM docker.io/library/golang:1.24.4-alpine3.22@sha256:68932fa6d4d4059845c8f40ad7e654e626f3ebd3706eef7846f319293ab5cb7a
|
||||
#5 resolve docker.io/library/golang:1.24.4-alpine3.22@sha256:68932fa6d4d4059845c8f40ad7e654e626f3ebd3706eef7846f319293ab5cb7a 0.0s done
|
||||
#5 DONE 0.0s
|
||||
|
||||
#6 [migrate internal] load .dockerignore
|
||||
#6 transferring context: 196B done
|
||||
#6 DONE 0.0s
|
||||
|
||||
#7 [migrate internal] load build context
|
||||
#7 transferring context: 5.34kB done
|
||||
#7 DONE 0.0s
|
||||
|
||||
#8 [migrate build 2/7] WORKDIR /src
|
||||
#8 CACHED
|
||||
|
||||
#9 [migrate build 3/7] COPY go.mod go.sum ./
|
||||
#9 CACHED
|
||||
|
||||
#10 [migrate build 4/7] RUN go mod download
|
||||
#10 CACHED
|
||||
|
||||
#11 [migrate build 5/7] COPY cmd/ ./cmd/
|
||||
#11 CACHED
|
||||
|
||||
#12 [migrate build 6/7] COPY internal/ ./internal/
|
||||
#12 DONE 0.3s
|
||||
|
||||
#13 [migrate build 7/7] RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/messenger ./cmd/server
|
||||
#13 DONE 5.1s
|
||||
|
||||
#14 [migrate stage-2 2/3] RUN addgroup -g 10001 app && adduser -D -u 10001 -G app app
|
||||
#14 CACHED
|
||||
|
||||
#15 [migrate stage-2 3/3] COPY --from=build /out/messenger /usr/local/bin/messenger
|
||||
#15 CACHED
|
||||
|
||||
#16 [migrate] exporting to image
|
||||
#16 exporting layers done
|
||||
#16 exporting manifest sha256:479caccf1b376a731376de59ec25689e8ecf7564074a3075e853894fd49295bc done
|
||||
#16 exporting config sha256:a86075f392678de5f157a45da823caf1e985ed402d7a8e56c4e59096370ece40 done
|
||||
#16 exporting attestation manifest sha256:ed3666ae24617e9f559f2155f1bee622742a745844eafbe50da557cb6f07e6b2 done
|
||||
#16 exporting manifest list sha256:fdde101e220e9726275ee8c068be667b9a69637b8724ebfce5e4385b06d8033d done
|
||||
#16 naming to docker.io/library/mtusi-messenger:lab3 done
|
||||
#16 unpacking to docker.io/library/mtusi-messenger:lab3 done
|
||||
#16 DONE 0.0s
|
||||
|
||||
#17 [migrate] resolving provenance for metadata file
|
||||
#17 DONE 0.0s
|
||||
migrate Built
|
||||
Container mtusi-lab3-kraykin-postgres-1 Running
|
||||
Container mtusi-lab3-kraykin-migrate-1 Recreate
|
||||
Container mtusi-lab3-kraykin-migrate-1 Recreated
|
||||
Container mtusi-lab3-kraykin-postgres-1 Waiting
|
||||
Container mtusi-lab3-kraykin-postgres-1 Healthy
|
||||
Container mtusi-lab3-kraykin-migrate-1 Starting
|
||||
Container mtusi-lab3-kraykin-migrate-1 Started
|
||||
#0 building with "desktop-linux" instance using docker driver
|
||||
|
||||
#1 [tests internal] load build definition from Dockerfile
|
||||
#1 transferring dockerfile: 782B done
|
||||
#1 DONE 0.0s
|
||||
|
||||
#2 [tests internal] load metadata for docker.io/library/golang:1.24.4-alpine3.22
|
||||
#2 DONE 0.3s
|
||||
|
||||
#3 [tests internal] load .dockerignore
|
||||
#3 transferring context: 196B done
|
||||
#3 DONE 0.0s
|
||||
|
||||
#4 [tests build 1/7] FROM docker.io/library/golang:1.24.4-alpine3.22@sha256:68932fa6d4d4059845c8f40ad7e654e626f3ebd3706eef7846f319293ab5cb7a
|
||||
#4 resolve docker.io/library/golang:1.24.4-alpine3.22@sha256:68932fa6d4d4059845c8f40ad7e654e626f3ebd3706eef7846f319293ab5cb7a done
|
||||
#4 DONE 0.0s
|
||||
|
||||
#5 [tests internal] load build context
|
||||
#5 transferring context: 752B done
|
||||
#5 DONE 0.0s
|
||||
|
||||
#6 [tests build 3/7] COPY go.mod go.sum ./
|
||||
#6 CACHED
|
||||
|
||||
#7 [tests build 4/7] RUN go mod download
|
||||
#7 CACHED
|
||||
|
||||
#8 [tests build 6/7] COPY internal/ ./internal/
|
||||
#8 CACHED
|
||||
|
||||
#9 [tests build 2/7] WORKDIR /src
|
||||
#9 CACHED
|
||||
|
||||
#10 [tests build 5/7] COPY cmd/ ./cmd/
|
||||
#10 CACHED
|
||||
|
||||
#11 [tests build 7/7] RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/messenger ./cmd/server
|
||||
#11 CACHED
|
||||
|
||||
#12 [tests tests 1/1] RUN apk add --no-cache gcc musl-dev
|
||||
#12 0.085 fetch https://dl-cdn.alpinelinux.org/alpine/v3.22/main/aarch64/APKINDEX.tar.gz
|
||||
#12 0.952 fetch https://dl-cdn.alpinelinux.org/alpine/v3.22/community/aarch64/APKINDEX.tar.gz
|
||||
#12 3.857 (1/14) Upgrading musl (1.2.5-r10 -> 1.2.5-r13)
|
||||
#12 4.265 (2/14) Installing libgcc (14.2.0-r6)
|
||||
#12 4.373 (3/14) Installing jansson (2.14.1-r0)
|
||||
#12 4.577 (4/14) Installing libstdc++ (14.2.0-r6)
|
||||
#12 5.223 (5/14) Installing zstd-libs (1.5.7-r0)
|
||||
#12 5.673 (6/14) Installing binutils (2.44-r3)
|
||||
#12 12.60 (7/14) Installing libgomp (14.2.0-r6)
|
||||
#12 12.93 (8/14) Installing libatomic (14.2.0-r6)
|
||||
#12 13.01 (9/14) Installing gmp (6.3.0-r3)
|
||||
#12 13.54 (10/14) Installing isl26 (0.26-r1)
|
||||
#12 16.22 (11/14) Installing mpfr4 (4.2.1_p1-r0)
|
||||
#12 17.13 (12/14) Installing mpc1 (1.3.1-r1)
|
||||
#12 17.29 (13/14) Installing gcc (14.2.0-r6)
|
||||
#12 93.80 (14/14) Installing musl-dev (1.2.5-r13)
|
||||
#12 95.48 Executing busybox-1.37.0-r18.trigger
|
||||
#12 95.49 OK: 163 MiB in 30 packages
|
||||
#12 DONE 95.6s
|
||||
|
||||
#13 [tests] exporting to image
|
||||
#13 exporting layers
|
||||
#13 exporting layers 3.2s done
|
||||
#13 exporting manifest sha256:2948a3bd161f3868bcd0cd8605e21410a47f5f09df7877bcb515c5131f0772de done
|
||||
#13 exporting config sha256:f25ea1a182acdb13804c4ecfcdb4ed4cd137531595a047a3bc493108b50293cd done
|
||||
#13 exporting attestation manifest sha256:7e1b47374a0223c7914872d55781e4be71c95df238f1823cdd9df156ef04ee45 done
|
||||
#13 exporting manifest list sha256:6290cc89df8d6b85ef6d93e48951b5395b536406cf8e0c58250e6e0e3f72c1ea done
|
||||
#13 naming to docker.io/library/mtusi-lab3-kraykin-tests:latest done
|
||||
#13 unpacking to docker.io/library/mtusi-lab3-kraykin-tests:latest
|
||||
#13 unpacking to docker.io/library/mtusi-lab3-kraykin-tests:latest 0.9s done
|
||||
#13 DONE 4.2s
|
||||
|
||||
#14 [tests] resolving provenance for metadata file
|
||||
#14 DONE 0.0s
|
||||
? mtusi/messenger/cmd/bench [no test files]
|
||||
? mtusi/messenger/cmd/server [no test files]
|
||||
? mtusi/messenger/internal/database [no test files]
|
||||
=== RUN TestDatabaseConcurrentHTTP
|
||||
database_test.go:162: 100 confirmed messages from 10 clients through real HTTP and PostgreSQL; race detector enabled
|
||||
--- PASS: TestDatabaseConcurrentHTTP (1.83s)
|
||||
=== RUN TestPasswordFullUnicodeRange
|
||||
--- PASS: TestPasswordFullUnicodeRange (2.10s)
|
||||
PASS
|
||||
ok mtusi/messenger/internal/messenger 4.957s
|
||||
@@ -0,0 +1,160 @@
|
||||
docker compose --profile verify run --build --rm tests
|
||||
Compose can now delegate builds to bake for better performance.
|
||||
To do so, set COMPOSE_BAKE=true.
|
||||
#0 building with "desktop-linux" instance using docker driver
|
||||
|
||||
#1 [migrate internal] load build definition from Dockerfile
|
||||
#1 transferring dockerfile: 782B done
|
||||
#1 DONE 0.0s
|
||||
|
||||
#2 [migrate internal] load metadata for docker.io/library/golang:1.24.4-alpine3.22
|
||||
#2 DONE 0.2s
|
||||
|
||||
#3 [migrate internal] load metadata for docker.io/library/alpine:3.22.1
|
||||
#3 DONE 0.3s
|
||||
|
||||
#4 [migrate internal] load .dockerignore
|
||||
#4 transferring context: 196B done
|
||||
#4 DONE 0.0s
|
||||
|
||||
#5 [migrate stage-2 1/3] FROM docker.io/library/alpine:3.22.1@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1
|
||||
#5 resolve docker.io/library/alpine:3.22.1@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1 0.0s done
|
||||
#5 DONE 0.0s
|
||||
|
||||
#6 [migrate build 1/7] FROM docker.io/library/golang:1.24.4-alpine3.22@sha256:68932fa6d4d4059845c8f40ad7e654e626f3ebd3706eef7846f319293ab5cb7a
|
||||
#6 resolve docker.io/library/golang:1.24.4-alpine3.22@sha256:68932fa6d4d4059845c8f40ad7e654e626f3ebd3706eef7846f319293ab5cb7a 0.0s done
|
||||
#6 DONE 0.0s
|
||||
|
||||
#7 [migrate internal] load build context
|
||||
#7 transferring context: 752B done
|
||||
#7 DONE 0.0s
|
||||
|
||||
#8 [migrate build 2/7] WORKDIR /src
|
||||
#8 CACHED
|
||||
|
||||
#9 [migrate stage-2 2/3] RUN addgroup -g 10001 app && adduser -D -u 10001 -G app app
|
||||
#9 CACHED
|
||||
|
||||
#10 [migrate build 6/7] COPY internal/ ./internal/
|
||||
#10 CACHED
|
||||
|
||||
#11 [migrate build 4/7] RUN go mod download
|
||||
#11 CACHED
|
||||
|
||||
#12 [migrate build 5/7] COPY cmd/ ./cmd/
|
||||
#12 CACHED
|
||||
|
||||
#13 [migrate build 7/7] RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/messenger ./cmd/server
|
||||
#13 CACHED
|
||||
|
||||
#14 [migrate build 3/7] COPY go.mod go.sum ./
|
||||
#14 CACHED
|
||||
|
||||
#15 [migrate stage-2 3/3] COPY --from=build /out/messenger /usr/local/bin/messenger
|
||||
#15 CACHED
|
||||
|
||||
#16 [migrate] exporting to image
|
||||
#16 exporting layers done
|
||||
#16 exporting manifest sha256:479caccf1b376a731376de59ec25689e8ecf7564074a3075e853894fd49295bc done
|
||||
#16 exporting config sha256:a86075f392678de5f157a45da823caf1e985ed402d7a8e56c4e59096370ece40 done
|
||||
#16 exporting attestation manifest sha256:7abe9b6d56a952512b86cb6d5f0f040db2bffd7d0dc24e5f9f2ea880bee01be3 done
|
||||
#16 exporting manifest list sha256:70cb65187adb8e4b8a11df2a4b94115f251a1f0289531305e774dd7de4ca5a1e done
|
||||
#16 naming to docker.io/library/mtusi-messenger:lab3 done
|
||||
#16 unpacking to docker.io/library/mtusi-messenger:lab3 done
|
||||
#16 DONE 0.0s
|
||||
|
||||
#17 [migrate] resolving provenance for metadata file
|
||||
#17 DONE 0.0s
|
||||
migrate Built
|
||||
Container mtusi-lab3-kraykin-postgres-1 Running
|
||||
Container mtusi-lab3-kraykin-migrate-1 Recreate
|
||||
Container mtusi-lab3-kraykin-migrate-1 Recreated
|
||||
Container mtusi-lab3-kraykin-postgres-1 Waiting
|
||||
Container mtusi-lab3-kraykin-postgres-1 Healthy
|
||||
Container mtusi-lab3-kraykin-migrate-1 Starting
|
||||
Container mtusi-lab3-kraykin-migrate-1 Started
|
||||
#0 building with "desktop-linux" instance using docker driver
|
||||
|
||||
#1 [tests internal] load build definition from Dockerfile
|
||||
#1 transferring dockerfile: 782B done
|
||||
#1 DONE 0.0s
|
||||
|
||||
#2 [tests internal] load metadata for docker.io/library/golang:1.24.4-alpine3.22
|
||||
#2 DONE 0.5s
|
||||
|
||||
#3 [tests internal] load .dockerignore
|
||||
#3 transferring context: 196B done
|
||||
#3 DONE 0.0s
|
||||
|
||||
#4 [tests build 1/7] FROM docker.io/library/golang:1.24.4-alpine3.22@sha256:68932fa6d4d4059845c8f40ad7e654e626f3ebd3706eef7846f319293ab5cb7a
|
||||
#4 resolve docker.io/library/golang:1.24.4-alpine3.22@sha256:68932fa6d4d4059845c8f40ad7e654e626f3ebd3706eef7846f319293ab5cb7a done
|
||||
#4 DONE 0.0s
|
||||
|
||||
#5 [tests internal] load build context
|
||||
#5 transferring context: 752B done
|
||||
#5 DONE 0.0s
|
||||
|
||||
#6 [tests build 4/7] RUN go mod download
|
||||
#6 CACHED
|
||||
|
||||
#7 [tests build 2/7] WORKDIR /src
|
||||
#7 CACHED
|
||||
|
||||
#8 [tests build 5/7] COPY cmd/ ./cmd/
|
||||
#8 CACHED
|
||||
|
||||
#9 [tests build 6/7] COPY internal/ ./internal/
|
||||
#9 CACHED
|
||||
|
||||
#10 [tests build 3/7] COPY go.mod go.sum ./
|
||||
#10 CACHED
|
||||
|
||||
#11 [tests build 7/7] RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/messenger ./cmd/server
|
||||
#11 CACHED
|
||||
|
||||
#12 [tests tests 1/1] RUN apk add --no-cache gcc musl-dev
|
||||
#12 0.112 fetch https://dl-cdn.alpinelinux.org/alpine/v3.22/main/aarch64/APKINDEX.tar.gz
|
||||
#12 5.322 fetch https://dl-cdn.alpinelinux.org/alpine/v3.22/community/aarch64/APKINDEX.tar.gz
|
||||
#12 21.47 (1/14) Upgrading musl (1.2.5-r10 -> 1.2.5-r13)
|
||||
#12 84.10 (2/14) Installing libgcc (14.2.0-r6)
|
||||
#12 85.02 (3/14) Installing jansson (2.14.1-r0)
|
||||
#12 85.35 (4/14) Installing libstdc++ (14.2.0-r6)
|
||||
#12 87.72 (5/14) Installing zstd-libs (1.5.7-r0)
|
||||
#12 88.36 (6/14) Installing binutils (2.44-r3)
|
||||
#12 93.81 (7/14) Installing libgomp (14.2.0-r6)
|
||||
#12 94.03 (8/14) Installing libatomic (14.2.0-r6)
|
||||
#12 94.11 (9/14) Installing gmp (6.3.0-r3)
|
||||
#12 94.47 (10/14) Installing isl26 (0.26-r1)
|
||||
#12 95.44 (11/14) Installing mpfr4 (4.2.1_p1-r0)
|
||||
#12 95.80 (12/14) Installing mpc1 (1.3.1-r1)
|
||||
#12 95.93 (13/14) Installing gcc (14.2.0-r6)
|
||||
#12 132.6 (14/14) Installing musl-dev (1.2.5-r13)
|
||||
#12 134.9 Executing busybox-1.37.0-r18.trigger
|
||||
#12 134.9 OK: 163 MiB in 30 packages
|
||||
#12 DONE 135.0s
|
||||
|
||||
#13 [tests] exporting to image
|
||||
#13 exporting layers
|
||||
#13 exporting layers 3.2s done
|
||||
#13 exporting manifest sha256:bfa1e3e3bb8a1f6a9a4db0899715c9e3909ee29ce8cf082a49822e8cb91fbe18
|
||||
#13 exporting manifest sha256:bfa1e3e3bb8a1f6a9a4db0899715c9e3909ee29ce8cf082a49822e8cb91fbe18 done
|
||||
#13 exporting config sha256:1506a136748cfbd472d81c1d74ea8e9a2579892d87ce708fd801f768e7b1e344 done
|
||||
#13 exporting attestation manifest sha256:809ca57a725da3c94f2b46bd49447e42e57698653aea568f1c52be0eb7ac05f4 done
|
||||
#13 exporting manifest list sha256:c884cefe063a10970ba9fcf0607a91b2631391d793c9d1172334a601fc66329c done
|
||||
#13 naming to docker.io/library/mtusi-lab3-kraykin-tests:latest done
|
||||
#13 unpacking to docker.io/library/mtusi-lab3-kraykin-tests:latest
|
||||
#13 unpacking to docker.io/library/mtusi-lab3-kraykin-tests:latest 1.1s done
|
||||
#13 DONE 4.4s
|
||||
|
||||
#14 [tests] resolving provenance for metadata file
|
||||
#14 DONE 0.0s
|
||||
? mtusi/messenger/cmd/bench [no test files]
|
||||
? mtusi/messenger/cmd/server [no test files]
|
||||
? mtusi/messenger/internal/database [no test files]
|
||||
=== RUN TestDatabaseConcurrentHTTP
|
||||
database_test.go:122: 100 confirmed messages from 10 clients through real HTTP and PostgreSQL; race detector enabled
|
||||
--- PASS: TestDatabaseConcurrentHTTP (1.62s)
|
||||
=== RUN TestPasswordFullUnicodeRange
|
||||
--- PASS: TestPasswordFullUnicodeRange (2.04s)
|
||||
PASS
|
||||
ok mtusi/messenger/internal/messenger 4.669s
|
||||
@@ -0,0 +1,117 @@
|
||||
{
|
||||
"platform": "macOS-26.6.2-arm64-arm-64bit",
|
||||
"containers": [
|
||||
{
|
||||
"service": "api",
|
||||
"name": "/mtusi-lab3-kraykin-api-4",
|
||||
"alias": "077c3cc912a5",
|
||||
"image": "mtusi-messenger:lab3",
|
||||
"image_id": "sha256:0d6cc9cc717039d834bb9f3266766d267c13f54334c9e686eadd16a549e4d9c0",
|
||||
"user": "10001:10001",
|
||||
"pid1_path": "/usr/local/bin/messenger",
|
||||
"started_at": "2026-10-29T18:33:40.164295083Z",
|
||||
"memory_limit_bytes": 268435456,
|
||||
"nano_cpus_limit": 1000000000,
|
||||
"published_ports": {
|
||||
"8080/tcp": null
|
||||
},
|
||||
"health": "healthy",
|
||||
"mount_targets": [
|
||||
"/run/secrets/cursor_key",
|
||||
"/run/secrets/database_url",
|
||||
"/run/secrets/cache_url"
|
||||
]
|
||||
},
|
||||
{
|
||||
"service": "api",
|
||||
"name": "/mtusi-lab3-kraykin-api-5",
|
||||
"alias": "bf1cb3864ee7",
|
||||
"image": "mtusi-messenger:lab3",
|
||||
"image_id": "sha256:0d6cc9cc717039d834bb9f3266766d267c13f54334c9e686eadd16a549e4d9c0",
|
||||
"user": "10001:10001",
|
||||
"pid1_path": "/usr/local/bin/messenger",
|
||||
"started_at": "2026-10-29T18:33:40.252165583Z",
|
||||
"memory_limit_bytes": 268435456,
|
||||
"nano_cpus_limit": 1000000000,
|
||||
"published_ports": {
|
||||
"8080/tcp": null
|
||||
},
|
||||
"health": "healthy",
|
||||
"mount_targets": [
|
||||
"/run/secrets/database_url",
|
||||
"/run/secrets/cache_url",
|
||||
"/run/secrets/cursor_key"
|
||||
]
|
||||
},
|
||||
{
|
||||
"service": "lb",
|
||||
"name": "/mtusi-lab3-kraykin-lb-1",
|
||||
"alias": "92c6d29aef68",
|
||||
"image": "haproxy:3.2.6-alpine",
|
||||
"image_id": "sha256:3a819392f5a6af2a9203d1c63ff0feba74f0c940623a558511be06d7d85e361c",
|
||||
"user": "haproxy",
|
||||
"pid1_path": "docker-entrypoint.sh",
|
||||
"started_at": "2026-10-29T18:15:13.909943835Z",
|
||||
"memory_limit_bytes": 134217728,
|
||||
"nano_cpus_limit": 1000000000,
|
||||
"published_ports": {
|
||||
"8080/tcp": [
|
||||
{
|
||||
"HostIp": "127.0.0.1",
|
||||
"HostPort": "8083"
|
||||
}
|
||||
]
|
||||
},
|
||||
"health": "healthy",
|
||||
"mount_targets": [
|
||||
"/usr/local/etc/haproxy/haproxy.cfg"
|
||||
]
|
||||
},
|
||||
{
|
||||
"service": "postgres",
|
||||
"name": "/mtusi-lab3-kraykin-postgres-1",
|
||||
"alias": "1d0cf8d740b1",
|
||||
"image": "postgres:17.6-alpine",
|
||||
"image_id": "sha256:ef257d85f76e48da1c64832459b59fcaba1a4dac97bf5d7450c77753542eee94",
|
||||
"user": "",
|
||||
"pid1_path": "docker-entrypoint.sh",
|
||||
"started_at": "2026-10-29T18:15:06.073096012Z",
|
||||
"memory_limit_bytes": 536870912,
|
||||
"nano_cpus_limit": 2000000000,
|
||||
"published_ports": {
|
||||
"5432/tcp": null
|
||||
},
|
||||
"health": "healthy",
|
||||
"mount_targets": [
|
||||
"/var/lib/postgresql/data",
|
||||
"/run/secrets/postgres_password"
|
||||
]
|
||||
},
|
||||
{
|
||||
"service": "valkey",
|
||||
"name": "/mtusi-lab3-kraykin-valkey-1",
|
||||
"alias": "8c5779560cc7",
|
||||
"image": "valkey/valkey:8.1.3-alpine",
|
||||
"image_id": "sha256:d827e7f7552cdee40cc7482dbae9da020f42bc47669af6f71182a4ef76a22773",
|
||||
"user": "",
|
||||
"pid1_path": "docker-entrypoint.sh",
|
||||
"started_at": "2026-10-29T18:15:06.127369887Z",
|
||||
"memory_limit_bytes": 134217728,
|
||||
"nano_cpus_limit": 500000000,
|
||||
"published_ports": {
|
||||
"6379/tcp": null
|
||||
},
|
||||
"health": null,
|
||||
"mount_targets": [
|
||||
"/run/secrets/valkey_config",
|
||||
"/data"
|
||||
]
|
||||
}
|
||||
],
|
||||
"postgres_durability": [
|
||||
"fsync=on",
|
||||
"full_page_writes=on",
|
||||
"max_connections=100",
|
||||
"synchronous_commit=on"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
## Вывод по гипотезе и подтверждённое улучшение
|
||||
|
||||
При fixed total 2 CPU/1024 MiB и 64 клиентах 1/2/4 API дали **3455.8/3790.2/3562.1 RPS**. Удвоение числа процессов не удваивает ресурс; четыре процесса здесь хуже двух. p99 вырос с 49.6 до 71.9 ms.
|
||||
|
||||
При growing resources и 64 клиентах 1/2/4 API дали **1612.0/3735.5/3624.7 RPS**. Переход 2→4 увеличил бюджет API с 2 до 4 CPU, но throughput не вырос. PostgreSQL при 4 API использует около 187%CPU при лимите 200%, throttled примерно в каждом 100 ms периоде; API суммарно около 157% из доступных 400%, LB около 27% из 100%. Samples содержат WalSync/WALWrite и transactionid/tuple waits. Это указывает на saturation общей SQL/WAL/lock части профиля, а не дефицит backend-слотов LB. Нельзя по этим данным отделить точный вклад WAL от row locks: нужен отдельный профилирующий эксперимент.
|
||||
|
||||
У 1 API с лимитом 1 CPU повышение конкуренции 4→16 ухудшило RPS, p99 резко вырос. В cgroups при высокой конкуренции видны постоянное CPU throttling API и загрузка около одного core. Дополнительные запросы создают очереди и накладные расходы в условиях CPU quota, а не гарантируют рост RPS; сами по себе эти наблюдения не доказывают единственную причину падения. Это полезная граница модели, а не пропущенные неудачные прогоны.
|
||||
|
||||
**Проверенное улучшение:** при неизменных 2 API×1 CPU/512 MiB,16 чатах и 32 клиентах увеличение pool1→10 дало медианы **2134.6→3845.3 RPS**, **80.1%**. p99: **24.438→40.739 ms**; ошибок 0. Выигрыш throughput имеет цену: p99 здесь ухудшился, поэтому это улучшение пропускной способности, не хвостовой задержки. В cumulative diagnostics время ожидания пустого пула уменьшилось, хотя число обслуженных обращений выросло. Выбран default10; дальнейшее бесконечное увеличение pool не обосновано — общая PostgreSQL уже ограничивает масштабирование. Диагностические counters накоплены за 20s warm+measurement окна и setup; они не являются точной per-request latency или отдельным суммируемым временем CPU.
|
||||
|
||||
Итоговые точки fixed4/growing1 и pool comparison повторены отдельно от функциональных нагрузок ЛР 4; raw отчёт содержит именно повторную серию. Набор данных и размеры таблиц растут между прогонами; для каждого scaling point сохранён count сообщений после измерения. Это позволяет оценить ограничение сравнения, но не заменяет рандомизацию и длинные confidence intervals.
|
||||
@@ -0,0 +1,13 @@
|
||||
fixed 4 4 1 2325
|
||||
fixed 4 4 2 2350
|
||||
fixed 4 16 1 3231
|
||||
fixed 4 16 2 3203
|
||||
fixed 4 64 1 3532
|
||||
fixed 4 64 2 3592
|
||||
growing 1 4 1 2655
|
||||
growing 1 4 2 2572
|
||||
growing 1 16 1 1594
|
||||
growing 1 16 2 1586
|
||||
growing 1 64 1 1612
|
||||
growing 1 64 2 1612
|
||||
DONE
|
||||
@@ -0,0 +1,37 @@
|
||||
fixed 1 4 1 2600
|
||||
fixed 1 4 2 2454
|
||||
fixed 1 16 1 3035
|
||||
fixed 1 16 2 3302
|
||||
fixed 1 64 1 3586
|
||||
fixed 1 64 2 3325
|
||||
fixed 2 4 1 2549
|
||||
fixed 2 4 2 2551
|
||||
fixed 2 16 1 3490
|
||||
fixed 2 16 2 3461
|
||||
fixed 2 64 1 3778
|
||||
fixed 2 64 2 3803
|
||||
fixed 4 4 1 2348
|
||||
fixed 4 4 2 2336
|
||||
fixed 4 16 1 3280
|
||||
fixed 4 16 2 3312
|
||||
fixed 4 64 1 3538
|
||||
fixed 4 64 2 3528
|
||||
growing 1 4 1 2585
|
||||
growing 1 4 2 2649
|
||||
growing 1 16 1 1648
|
||||
growing 1 16 2 1621
|
||||
growing 1 64 1 1659
|
||||
growing 1 64 2 1658
|
||||
growing 2 4 1 2553
|
||||
growing 2 4 2 2553
|
||||
growing 2 16 1 3454
|
||||
growing 2 16 2 3494
|
||||
growing 2 64 1 3823
|
||||
growing 2 64 2 3648
|
||||
growing 4 4 1 2333
|
||||
growing 4 4 2 2356
|
||||
growing 4 16 1 3708
|
||||
growing 4 16 2 3762
|
||||
growing 4 64 1 3667
|
||||
growing 4 64 2 3582
|
||||
DONE
|
||||
@@ -0,0 +1,21 @@
|
||||
series,replicas,clients,pool_per_api,repeats,successful_rps,error_fraction,p50_ms,p95_ms,p99_ms
|
||||
fixed,1,4,10,2,2526.7821716808385,0.0,1.4655,2.2385,3.3475
|
||||
fixed,1,16,10,2,3168.568037715847,0.0,3.8255,9.702,22.808999999999997
|
||||
fixed,1,64,10,2,3455.8048788974993,0.0,14.1775,41.173,49.584
|
||||
fixed,2,4,10,2,2549.9768154882013,0.0,1.4980000000000002,2.0105,2.6235
|
||||
fixed,2,16,10,2,3475.4139686012795,0.0,3.0519999999999996,12.9225,37.8275
|
||||
fixed,2,64,10,2,3790.17126227632,0.0,11.0245,51.482,61.117999999999995
|
||||
fixed,4,4,10,2,2337.54022524052,0.0,1.6480000000000001,2.1574999999999998,2.783
|
||||
fixed,4,16,10,2,3216.765588952754,0.0,3.0095,17.4,44.254999999999995
|
||||
fixed,4,64,10,2,3562.144152545966,0.0,8.338000000000001,65.682,71.8925
|
||||
growing,1,4,10,2,2613.533998135019,0.0,1.4209999999999998,2.1479999999999997,3.145
|
||||
growing,1,16,10,2,1589.9087121230227,0.0,3.6045,67.6925,76.37100000000001
|
||||
growing,1,64,10,2,1612.0391778347437,0.0,15.611,87.81450000000001,91.053
|
||||
growing,2,4,10,2,2552.619687178545,0.0,1.4935,2.02,2.7595
|
||||
growing,2,16,10,2,3473.7263637419273,0.0,3.0345,17.1825,34.192499999999995
|
||||
growing,2,64,10,2,3735.458582718481,0.0,11.5075,53.346000000000004,61.7555
|
||||
growing,4,4,10,2,2344.574773428969,0.0,1.645,2.1574999999999998,2.7895000000000003
|
||||
growing,4,16,10,2,3735.0366232022843,0.0,3.0645,6.1745,33.475
|
||||
growing,4,64,10,2,3624.6849244654904,0.0,9.866,61.2975,69.81299999999999
|
||||
pool_improvement,2,32,1,3,2134.5603419921717,0,14.851,21.305,24.438
|
||||
pool_improvement,2,32,10,3,3845.2509210131784,0,4.961,31.46,40.739
|
||||
|
@@ -0,0 +1,62 @@
|
||||
# Масштабирование: измеренные результаты
|
||||
|
||||
Raw: `scaling.json`. График: `scaling.png`; таблица: `scaling-summary.csv`.
|
||||
|
||||
Медианы двух 6-секундных прогонов после 2 s прогрева на каждую конкуренцию. PostgreSQL2 CPU/512MiB, LB1 CPU/128MiB. 16 чатов, 4/16/64 closed-loop клиента, reusable HTTP connections; без retry. Процентили только успешных HTTP201; ошибки отдельно. Каждый point содержит raw cgroups и samples PostgreSQL.
|
||||
|
||||
| Серия | API | Клиенты | RPS | Ошибки % | p50 ms | p95 ms | p99 ms |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|
|
||||
| fixed | 1 | 4 | 2526.8 | 0.000 | 1.466 | 2.239 | 3.348 |
|
||||
| fixed | 1 | 16 | 3168.6 | 0.000 | 3.825 | 9.702 | 22.809 |
|
||||
| fixed | 1 | 64 | 3455.8 | 0.000 | 14.178 | 41.173 | 49.584 |
|
||||
| fixed | 2 | 4 | 2550.0 | 0.000 | 1.498 | 2.010 | 2.623 |
|
||||
| fixed | 2 | 16 | 3475.4 | 0.000 | 3.052 | 12.922 | 37.828 |
|
||||
| fixed | 2 | 64 | 3790.2 | 0.000 | 11.024 | 51.482 | 61.118 |
|
||||
| fixed | 4 | 4 | 2337.5 | 0.000 | 1.648 | 2.157 | 2.783 |
|
||||
| fixed | 4 | 16 | 3216.8 | 0.000 | 3.010 | 17.400 | 44.255 |
|
||||
| fixed | 4 | 64 | 3562.1 | 0.000 | 8.338 | 65.682 | 71.892 |
|
||||
| growing | 1 | 4 | 2613.5 | 0.000 | 1.421 | 2.148 | 3.145 |
|
||||
| growing | 1 | 16 | 1589.9 | 0.000 | 3.604 | 67.692 | 76.371 |
|
||||
| growing | 1 | 64 | 1612.0 | 0.000 | 15.611 | 87.815 | 91.053 |
|
||||
| growing | 2 | 4 | 2552.6 | 0.000 | 1.494 | 2.020 | 2.760 |
|
||||
| growing | 2 | 16 | 3473.7 | 0.000 | 3.034 | 17.183 | 34.192 |
|
||||
| growing | 2 | 64 | 3735.5 | 0.000 | 11.508 | 53.346 | 61.755 |
|
||||
| growing | 4 | 4 | 2344.6 | 0.000 | 1.645 | 2.157 | 2.790 |
|
||||
| growing | 4 | 16 | 3735.0 | 0.000 | 3.064 | 6.175 | 33.475 |
|
||||
| growing | 4 | 64 | 3624.7 | 0.000 | 9.866 | 61.297 | 69.813 |
|
||||
| pool_improvement pool=1 | 2 | 32 | 2134.6 | 0.000 | 14.851 | 21.305 | 24.438 |
|
||||
| pool_improvement pool=10 | 2 | 32 | 3845.3 | 0.000 | 4.961 | 31.460 | 40.739 |
|
||||
|
||||
## Ресурсы и ожидания
|
||||
|
||||
| Серия | API | Клиенты | CPU API sum % | CPU PostgreSQL % | CPU LB % | API max cgroup peak MiB |
|
||||
|---|---:|---:|---:|---:|---:|---:|
|
||||
| fixed | 1 | 4 | 93.8 | 90.9 | 16.1 | 141.2 |
|
||||
| fixed | 1 | 16 | 150.4 | 161.7 | 25.0 | 141.2 |
|
||||
| fixed | 1 | 64 | 187.3 | 161.0 | 25.7 | 141.2 |
|
||||
| fixed | 2 | 4 | 122.2 | 97.0 | 16.8 | 140.1 |
|
||||
| fixed | 2 | 16 | 186.5 | 165.8 | 25.1 | 140.1 |
|
||||
| fixed | 2 | 64 | 183.5 | 185.6 | 26.6 | 140.1 |
|
||||
| fixed | 4 | 4 | 162.2 | 101.1 | 17.7 | 137.5 |
|
||||
| fixed | 4 | 16 | 184.9 | 164.6 | 25.0 | 137.5 |
|
||||
| fixed | 4 | 64 | 156.7 | 185.8 | 28.2 | 137.5 |
|
||||
| growing | 1 | 4 | 93.1 | 96.4 | 15.8 | 137.8 |
|
||||
| growing | 1 | 16 | 94.3 | 78.9 | 12.1 | 137.8 |
|
||||
| growing | 1 | 64 | 95.3 | 81.2 | 12.8 | 137.8 |
|
||||
| growing | 2 | 4 | 125.1 | 97.4 | 16.8 | 137.1 |
|
||||
| growing | 2 | 16 | 188.8 | 164.1 | 24.9 | 137.1 |
|
||||
| growing | 2 | 64 | 182.7 | 185.7 | 26.3 | 137.1 |
|
||||
| growing | 4 | 4 | 161.6 | 99.2 | 17.5 | 137.0 |
|
||||
| growing | 4 | 16 | 207.2 | 185.6 | 35.8 | 137.0 |
|
||||
| growing | 4 | 64 | 156.8 | 186.8 | 27.0 | 137.0 |
|
||||
|
||||
CPU100%=один core. CPU измерен за окно snapshots, включающее небольшую инструментальную накладную стоимость, не только ровно6s. memory.peak накоплен с запуска контейнера, current до/после тоже сохранён. Pg_stat_activity samples позволяют наблюдать WAL/locks/CPU, но не являются непрерывным профилем.
|
||||
|
||||
- Pool1, instance420ec0304c59: acquires=64076, empty_acquires=63562, accumulated empty wait=227.262s (process lifetime counters).
|
||||
- Pool1, instance95ed258e2e00: acquires=63957, empty_acquires=63919, accumulated empty wait=348.705s (process lifetime counters).
|
||||
- Pool10, instance0ee0266b5951: acquires=115748, empty_acquires=75758, accumulated empty wait=48.476s (process lifetime counters).
|
||||
- Pool10, instance0a0d445bde35: acquires=115747, empty_acquires=79577, accumulated empty wait=56.580s (process lifetime counters).
|
||||
|
||||
## Границы измерения
|
||||
|
||||
Короткие прогоны на одном host, warm caches, fixed ordering, растущие tables и coordinated omission. Предельные задержки во время перегрузки могут быть недооценены closed-loop моделью. Токены только в памяти и stdin генератора, в evidence не сохраняются. SQL/RAM/WAL и работа нескольких процессов ограничивают масштабирование; выводы относятся к измеренному POST-профилю.
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 212 KiB |
@@ -0,0 +1,2 @@
|
||||
python3 tests/smoke.py --base-url "http://localhost:8083"
|
||||
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
|
||||
@@ -0,0 +1,2 @@
|
||||
python3 tests/smoke.py --base-url "http://localhost:8083"
|
||||
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
|
||||
@@ -0,0 +1,174 @@
|
||||
python3 scripts/bootstrap.py
|
||||
Local secrets ready (values hidden); .env and secrets/ are ignored by Git.
|
||||
docker compose --env-file .env up -d --build --wait
|
||||
Compose can now delegate builds to bake for better performance.
|
||||
To do so, set COMPOSE_BAKE=true.
|
||||
#0 building with "desktop-linux" instance using docker driver
|
||||
|
||||
#1 [migrate internal] load build definition from Dockerfile
|
||||
#1 transferring dockerfile: 782B done
|
||||
#1 DONE 0.0s
|
||||
|
||||
#2 [migrate internal] load metadata for docker.io/library/golang:1.24.4-alpine3.22
|
||||
#2 ...
|
||||
|
||||
#3 [migrate internal] load metadata for docker.io/library/alpine:3.22.1
|
||||
#3 DONE 2.2s
|
||||
|
||||
#2 [migrate internal] load metadata for docker.io/library/golang:1.24.4-alpine3.22
|
||||
#2 DONE 2.2s
|
||||
|
||||
#4 [migrate internal] load .dockerignore
|
||||
#4 transferring context: 196B done
|
||||
#4 DONE 0.0s
|
||||
|
||||
#5 [migrate stage-2 1/3] FROM docker.io/library/alpine:3.22.1@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1
|
||||
#5 resolve docker.io/library/alpine:3.22.1@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1 done
|
||||
#5 DONE 0.0s
|
||||
|
||||
#6 [migrate build 1/7] FROM docker.io/library/golang:1.24.4-alpine3.22@sha256:68932fa6d4d4059845c8f40ad7e654e626f3ebd3706eef7846f319293ab5cb7a
|
||||
#6 resolve docker.io/library/golang:1.24.4-alpine3.22@sha256:68932fa6d4d4059845c8f40ad7e654e626f3ebd3706eef7846f319293ab5cb7a done
|
||||
#6 DONE 0.0s
|
||||
|
||||
#7 [migrate internal] load build context
|
||||
#7 transferring context: 4.90kB done
|
||||
#7 DONE 0.0s
|
||||
|
||||
#8 [migrate build 3/7] COPY go.mod go.sum ./
|
||||
#8 CACHED
|
||||
|
||||
#9 [migrate build 2/7] WORKDIR /src
|
||||
#9 CACHED
|
||||
|
||||
#10 [migrate build 4/7] RUN go mod download
|
||||
#10 CACHED
|
||||
|
||||
#11 [migrate build 5/7] COPY cmd/ ./cmd/
|
||||
#11 DONE 0.0s
|
||||
|
||||
#12 [migrate build 6/7] COPY internal/ ./internal/
|
||||
#12 DONE 0.0s
|
||||
|
||||
#13 [migrate build 7/7] RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/messenger ./cmd/server
|
||||
#13 DONE 5.0s
|
||||
|
||||
#14 [migrate stage-2 2/3] RUN addgroup -g 10001 app && adduser -D -u 10001 -G app app
|
||||
#14 CACHED
|
||||
|
||||
#15 [migrate stage-2 3/3] COPY --from=build /out/messenger /usr/local/bin/messenger
|
||||
#15 DONE 0.0s
|
||||
|
||||
#16 [migrate] exporting to image
|
||||
#16 exporting layers
|
||||
#16 exporting layers 0.2s done
|
||||
#16 exporting manifest sha256:914121e1994b898b5227e70e0c9d8dd70a8267b8ee148bc610ea6e791b6325a9
|
||||
#16 exporting manifest sha256:914121e1994b898b5227e70e0c9d8dd70a8267b8ee148bc610ea6e791b6325a9 done
|
||||
#16 exporting config sha256:760e2d33c701da4980c1d4dfe67cb32236675384bcaa14eb1c192ef213658b91 done
|
||||
#16 exporting attestation manifest sha256:076c4d4f1e88b43ed28523d1f29c16ad35683c66a2fcf9188f086674e8b283f1 done
|
||||
#16 exporting manifest list sha256:a6cb3e7311677571829ff9f38ae6d1689d89eed23677bcb64fdf96d4f28038ed done
|
||||
#16 naming to docker.io/library/mtusi-messenger:lab3 done
|
||||
#16 unpacking to docker.io/library/mtusi-messenger:lab3 0.0s done
|
||||
#16 DONE 0.3s
|
||||
|
||||
#17 [migrate] resolving provenance for metadata file
|
||||
#17 DONE 0.0s
|
||||
|
||||
#18 [api internal] load build definition from Dockerfile
|
||||
#18 transferring dockerfile: 782B done
|
||||
#18 DONE 0.0s
|
||||
|
||||
#2 [api internal] load metadata for docker.io/library/golang:1.24.4-alpine3.22
|
||||
#2 DONE 3.5s
|
||||
|
||||
#3 [api internal] load metadata for docker.io/library/alpine:3.22.1
|
||||
#3 DONE 3.5s
|
||||
|
||||
#19 [api internal] load .dockerignore
|
||||
#19 transferring context: 196B done
|
||||
#19 DONE 0.0s
|
||||
|
||||
#5 [api stage-2 1/3] FROM docker.io/library/alpine:3.22.1@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1
|
||||
#5 resolve docker.io/library/alpine:3.22.1@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1 done
|
||||
#5 DONE 0.0s
|
||||
|
||||
#6 [api build 1/7] FROM docker.io/library/golang:1.24.4-alpine3.22@sha256:68932fa6d4d4059845c8f40ad7e654e626f3ebd3706eef7846f319293ab5cb7a
|
||||
#6 resolve docker.io/library/golang:1.24.4-alpine3.22@sha256:68932fa6d4d4059845c8f40ad7e654e626f3ebd3706eef7846f319293ab5cb7a done
|
||||
#6 DONE 0.0s
|
||||
|
||||
#20 [api internal] load build context
|
||||
#20 transferring context: 752B done
|
||||
#20 DONE 0.0s
|
||||
|
||||
#9 [api build 2/7] WORKDIR /src
|
||||
#9 CACHED
|
||||
|
||||
#21 [api build 6/7] COPY internal/ ./internal/
|
||||
#21 CACHED
|
||||
|
||||
#22 [api build 4/7] RUN go mod download
|
||||
#22 CACHED
|
||||
|
||||
#23 [api build 3/7] COPY go.mod go.sum ./
|
||||
#23 CACHED
|
||||
|
||||
#24 [api build 7/7] RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/messenger ./cmd/server
|
||||
#24 CACHED
|
||||
|
||||
#25 [api build 5/7] COPY cmd/ ./cmd/
|
||||
#25 CACHED
|
||||
|
||||
#14 [api stage-2 2/3] RUN addgroup -g 10001 app && adduser -D -u 10001 -G app app
|
||||
#14 CACHED
|
||||
|
||||
#26 [api stage-2 3/3] COPY --from=build /out/messenger /usr/local/bin/messenger
|
||||
#26 CACHED
|
||||
|
||||
#27 [api] exporting to image
|
||||
#27 exporting layers done
|
||||
#27 exporting manifest sha256:b57f8cd185cd559ee119ce1f32af9840c2e3351bca2ddd635ed84cd60d1d7046 done
|
||||
#27 exporting config sha256:baaabcb3786c817cb129fdb7a2075bf92322689e25cc77661c85f49d51b28c99 done
|
||||
#27 exporting attestation manifest sha256:3cd7e2f98562ce22c384b473c3ec4dc67eb4be89e2346f063cbcff4c19028124 done
|
||||
#27 exporting manifest list sha256:0d6cc9cc717039d834bb9f3266766d267c13f54334c9e686eadd16a549e4d9c0 done
|
||||
#27 naming to docker.io/library/mtusi-messenger:lab3 done
|
||||
#27 unpacking to docker.io/library/mtusi-messenger:lab3 done
|
||||
#27 DONE 0.0s
|
||||
|
||||
#28 [api] resolving provenance for metadata file
|
||||
#28 DONE 0.0s
|
||||
api Built
|
||||
migrate Built
|
||||
Container mtusi-lab3-kraykin-valkey-1 Running
|
||||
Container mtusi-lab3-kraykin-postgres-1 Running
|
||||
Container mtusi-lab3-kraykin-migrate-1 Recreate
|
||||
Container mtusi-lab3-kraykin-migrate-1 Recreated
|
||||
Container mtusi-lab3-kraykin-api-3 Recreate
|
||||
Container mtusi-lab3-kraykin-api-4 Recreate
|
||||
Container mtusi-lab3-kraykin-api-4 Recreated
|
||||
Container mtusi-lab3-kraykin-api-3 Recreated
|
||||
Container mtusi-lab3-kraykin-lb-1 Running
|
||||
Container mtusi-lab3-kraykin-postgres-1 Waiting
|
||||
Container mtusi-lab3-kraykin-postgres-1 Healthy
|
||||
Container mtusi-lab3-kraykin-migrate-1 Starting
|
||||
Container mtusi-lab3-kraykin-migrate-1 Started
|
||||
Container mtusi-lab3-kraykin-migrate-1 Waiting
|
||||
Container mtusi-lab3-kraykin-migrate-1 Exited
|
||||
Container mtusi-lab3-kraykin-api-3 Starting
|
||||
Container mtusi-lab3-kraykin-api-3 Started
|
||||
Container mtusi-lab3-kraykin-api-4 Starting
|
||||
Container mtusi-lab3-kraykin-api-4 Started
|
||||
Container mtusi-lab3-kraykin-api-3 Waiting
|
||||
Container mtusi-lab3-kraykin-api-4 Waiting
|
||||
Container mtusi-lab3-kraykin-api-3 Healthy
|
||||
Container mtusi-lab3-kraykin-api-4 Healthy
|
||||
Container mtusi-lab3-kraykin-api-3 Waiting
|
||||
Container mtusi-lab3-kraykin-api-4 Waiting
|
||||
Container mtusi-lab3-kraykin-lb-1 Waiting
|
||||
Container mtusi-lab3-kraykin-postgres-1 Waiting
|
||||
Container mtusi-lab3-kraykin-valkey-1 Waiting
|
||||
Container mtusi-lab3-kraykin-migrate-1 Waiting
|
||||
Container mtusi-lab3-kraykin-lb-1 Healthy
|
||||
Container mtusi-lab3-kraykin-postgres-1 Healthy
|
||||
Container mtusi-lab3-kraykin-migrate-1 Exited
|
||||
Container mtusi-lab3-kraykin-valkey-1 Healthy
|
||||
Container mtusi-lab3-kraykin-api-3 Healthy
|
||||
Container mtusi-lab3-kraykin-api-4 Healthy
|
||||
@@ -0,0 +1,4 @@
|
||||
? mtusi/messenger/cmd/bench [no test files]
|
||||
? mtusi/messenger/cmd/server [no test files]
|
||||
? mtusi/messenger/internal/database [no test files]
|
||||
ok mtusi/messenger/internal/messenger 3.007s
|
||||
Reference in New Issue
Block a user