Run the load generators against our server: the window holds, memory returns to baseline, no defects

This commit is contained in:
2026-09-06 22:25:29 +02:00
parent a7f3ea70d7
commit 5e53fad802
14 changed files with 946 additions and 2 deletions
+32
View File
@@ -0,0 +1,32 @@
# smppload has no published image; built from source at a pinned commit (tag 2.5.3). Its deps
# resolve some sub-deps over git:// (rebar.config), rewritten to https below - see findings/07-load.md.
FROM --platform=linux/amd64 erlang:27.3.4.17-alpine AS builder
RUN apk add --no-cache curl git make build-base ca-certificates \
&& git config --global url."https://github.com/".insteadOf "git://github.com/"
ARG SMPPLOAD_COMMIT=49fb653966081052fa5d36fbadbdb0972f25ded5
ARG REBAR3_VERSION=3.27.0
# The commit's own vendored ./rebar3 escript predates OTP 27 and cannot even load under it
# ("please re-compile this module with an Erlang/OTP 27 compiler") - issue #8's BEAM load error.
# A current rebar3 release, which still reads this project's rebar.config, replaces it.
RUN curl -fsSL -o /usr/local/bin/rebar3 "https://github.com/erlang/rebar3/releases/download/${REBAR3_VERSION}/rebar3" \
&& chmod +x /usr/local/bin/rebar3
RUN git clone https://github.com/PowerMeMobile/smppload.git /build \
&& cd /build \
&& git checkout "${SMPPLOAD_COMMIT}" \
&& cp /usr/local/bin/rebar3 ./rebar3 \
&& make escriptize
FROM --platform=linux/amd64 erlang:27.3.4.17-alpine AS runtime
RUN apk add --no-cache netcat-openbsd
WORKDIR /app
COPY --from=builder /build/_build/default/bin/smppload /app/smppload
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh /app/smppload
ENTRYPOINT ["/app/entrypoint.sh"]
@@ -0,0 +1,17 @@
#!/bin/sh
# smppload is one-shot: it needs node:2775 already accepting connections, but compose starts this
# container first (its healthcheck is a bare marker file, not the SMPP link) so node can depend on
# it the same way compose.kannel.yaml's bearerbox does. This loop is the retry Kannel's own client
# gives it for free.
set -eu
touch /tmp/healthy
host="${SMPP_HOST:-node}"
port="${SMPP_PORT:-2775}"
until nc -z "$host" "$port"; do
sleep 1
done
exec /app/smppload "$@"