Run the load generators against our server: the window holds, memory returns to baseline, no defects
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
# smpp-dumb-client has no published image; built from source at a pinned commit. A second binary
|
||||
# is built from the same source with its own automatic enquire_link neutralised, for S6 - see
|
||||
# findings/07-load.md for why (every peer built for this phase sends enquire_link on its own
|
||||
# otherwise, and smppload, the one that never does, is blocked).
|
||||
FROM --platform=linux/amd64 golang:1.26.8-alpine3.23 AS builder
|
||||
|
||||
RUN apk add --no-cache git ca-certificates
|
||||
|
||||
ARG LIBSMPP_COMMIT=de0334bf2c1155fb3dd4f929674968254c932be6
|
||||
|
||||
RUN git clone https://github.com/vponomarev/libsmpp.git /build \
|
||||
&& cd /build \
|
||||
&& git checkout "${LIBSMPP_COMMIT}"
|
||||
|
||||
WORKDIR /build
|
||||
RUN go build -o /out/smpp-dumb-client ./app/smpp-dumb-client
|
||||
|
||||
# libsmpp's enquireSender(60)/enquireSender(10) are the two call sites that start its unconditional,
|
||||
# unconfigurable 10s/60s enquire_link ticker (smpp.go) - both neutralised here for the no-ping build.
|
||||
RUN sed -i \
|
||||
-e 's/go s\.enquireSender(60)/\/\/ patched for S6 (no enquire_link): &/' \
|
||||
-e 's/go s\.enquireSender(10)/\/\/ patched for S6 (no enquire_link): &/' \
|
||||
smpp.go \
|
||||
&& go build -o /out/smpp-dumb-client-noping ./app/smpp-dumb-client
|
||||
|
||||
FROM --platform=linux/amd64 alpine:3.23.5 AS runtime
|
||||
|
||||
RUN apk add --no-cache netcat-openbsd
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /out/smpp-dumb-client /app/smpp-dumb-client
|
||||
COPY --from=builder /out/smpp-dumb-client-noping /app/smpp-dumb-client-noping
|
||||
COPY entrypoint.sh /app/entrypoint.sh
|
||||
COPY conf ./conf
|
||||
RUN chmod +x /app/entrypoint.sh /app/smpp-dumb-client /app/smpp-dumb-client-noping
|
||||
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
@@ -0,0 +1,37 @@
|
||||
log:
|
||||
level: info
|
||||
rate: yes
|
||||
netbuf: false
|
||||
|
||||
profiler:
|
||||
enabled: no
|
||||
|
||||
smpp:
|
||||
remote: NODE_HOST:2775
|
||||
bind:
|
||||
systemID: dumb-idle
|
||||
systemType: ""
|
||||
password: dumbpw
|
||||
mode: TRX
|
||||
|
||||
generator:
|
||||
enabled: yes
|
||||
message:
|
||||
from:
|
||||
ton: 1
|
||||
npi: 1
|
||||
addr: "15550005678"
|
||||
to:
|
||||
ton: 1
|
||||
npi: 1
|
||||
addr: "15550001234"
|
||||
template: no
|
||||
registeredDelivery: 0
|
||||
dataCoding: 1
|
||||
body: "load phase 7 - S6 idle probe"
|
||||
count: 1
|
||||
rate: 1
|
||||
window: 10
|
||||
# Sends its one message, gets the response, then goes silent - run through the no-ping binary
|
||||
# (see the Dockerfile), so nothing at all crosses the wire after that: no enquire_link, no traffic.
|
||||
stayConnected: yes
|
||||
@@ -0,0 +1,35 @@
|
||||
log:
|
||||
level: info
|
||||
rate: yes
|
||||
netbuf: false
|
||||
|
||||
profiler:
|
||||
enabled: no
|
||||
|
||||
smpp:
|
||||
remote: NODE_HOST:2775
|
||||
bind:
|
||||
systemID: dumb-soak
|
||||
systemType: ""
|
||||
password: dumbpw
|
||||
mode: TRX
|
||||
|
||||
generator:
|
||||
enabled: yes
|
||||
message:
|
||||
from:
|
||||
ton: 1
|
||||
npi: 1
|
||||
addr: "15550005678"
|
||||
to:
|
||||
ton: 1
|
||||
npi: 1
|
||||
addr: "15550001234"
|
||||
template: no
|
||||
registeredDelivery: 0
|
||||
dataCoding: 1
|
||||
body: "load phase 7 - long soak, fast handler"
|
||||
count: 300000
|
||||
rate: 500
|
||||
window: 100
|
||||
stayConnected: yes
|
||||
@@ -0,0 +1,35 @@
|
||||
log:
|
||||
level: info
|
||||
rate: yes
|
||||
netbuf: false
|
||||
|
||||
profiler:
|
||||
enabled: no
|
||||
|
||||
smpp:
|
||||
remote: NODE_HOST:2775
|
||||
bind:
|
||||
systemID: dumb-w2000
|
||||
systemType: ""
|
||||
password: dumbpw
|
||||
mode: TRX
|
||||
|
||||
generator:
|
||||
enabled: yes
|
||||
message:
|
||||
from:
|
||||
ton: 1
|
||||
npi: 1
|
||||
addr: "15550005678"
|
||||
to:
|
||||
ton: 1
|
||||
npi: 1
|
||||
addr: "15550001234"
|
||||
template: no
|
||||
registeredDelivery: 0
|
||||
dataCoding: 1
|
||||
body: "load phase 7 - window 2000, above maxHeldMessages (S9)"
|
||||
count: 20000
|
||||
rate: 2000
|
||||
window: 2000
|
||||
stayConnected: no
|
||||
@@ -0,0 +1,35 @@
|
||||
log:
|
||||
level: info
|
||||
rate: yes
|
||||
netbuf: false
|
||||
|
||||
profiler:
|
||||
enabled: no
|
||||
|
||||
smpp:
|
||||
remote: NODE_HOST:2775
|
||||
bind:
|
||||
systemID: dumb-w500
|
||||
systemType: ""
|
||||
password: dumbpw
|
||||
mode: TRX
|
||||
|
||||
generator:
|
||||
enabled: yes
|
||||
message:
|
||||
from:
|
||||
ton: 1
|
||||
npi: 1
|
||||
addr: "15550005678"
|
||||
to:
|
||||
ton: 1
|
||||
npi: 1
|
||||
addr: "15550001234"
|
||||
template: no
|
||||
registeredDelivery: 0
|
||||
dataCoding: 1
|
||||
body: "load phase 7 - window 500, below maxHeldMessages"
|
||||
count: 20000
|
||||
rate: 2000
|
||||
window: 500
|
||||
stayConnected: no
|
||||
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
# smpp-dumb-client is one-shot and dials out, so it needs node:2775 already listening - the same
|
||||
# problem compose.smppload.yaml's entrypoint solves, and the same fix: a healthcheck this marker
|
||||
# satisfies at once, and node depends on it rather than the other way round.
|
||||
#
|
||||
# Its own smpp.remote config field is fed straight into net.ParseIP with no DNS resolution at all
|
||||
# (hdr.go), so the compose service name in every conf/*.yml is a NODE_HOST placeholder, resolved
|
||||
# here and substituted into a writable copy before the real binary ever sees the config file.
|
||||
set -eu
|
||||
|
||||
touch /tmp/healthy
|
||||
|
||||
host="${SMPP_HOST:-node}"
|
||||
port="${SMPP_PORT:-2775}"
|
||||
|
||||
until nc -z "$host" "$port"; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
ip="$(getent hosts "$host" | awk '{print $1}' | head -n1)"
|
||||
sed "s/NODE_HOST/$ip/" "$1" > /tmp/effective-config.yml
|
||||
|
||||
exec "${DUMBCLIENT_BIN:-/app/smpp-dumb-client}" -config /tmp/effective-config.yml
|
||||
@@ -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 "$@"
|
||||
Reference in New Issue
Block a user