mqtt keep alive
seneribrahim
FREEOP

11 hours ago

Title: TCP Proxy sends keepalive probes every 15 s on idle connections - can it be disabled or raised?

We run an MQTT broker (Mosquitto, TLS on 8883) behind a Railway TCP Proxy

(xxx.proxy.rlwy.net:) for battery-powered LTE devices. Devices keep one

MQTT connection open with a 900 s MQTT keepalive.

Packet captures show the proxy sending a zero-length TCP keepalive probe on

idle client connections every ~15 s (we measured 15.07-15.18 s and

30.18-30.28 s on four separate idle connections). This matches Go's default

TCP keepalive (idle = interval = 15 s). Our broker config sets no TCP keepalive.

On cellular, each probe pages the device and forces an LTE connection; our

devices draw 17-20 mA instead of 3.4 mA while idle, which cuts battery life

by about 5x.

Questions:

  1. Does the TCP Proxy set SO_KEEPALIVE with 15 s idle/interval on client-side connections?

  2. Can it be disabled or raised (e.g. >= 1800 s) per service?

  3. If not, what is the recommended way to serve long-lived, mostly idle TCP

    connections to cellular clients on Railway?

Under Review

0 Threads mention this feature

0 Replies

Welcome!

Sign in to your Railway account to join the conversation.

Loading...