No, this is a great way to do it. Simplifies a bunch of stuff client-side IMO (for general WS, in my experience, can’t comment on MQTT cause I don’t use it).
There’s some keepalive
options you can play with in the reverse_proxy
’s HTTP
transport:
I’ve never needed to play around with changing keepalives, so I don’t have any specific recommendations there. But this is for the connection between Caddy and your upstream.
This thread mentions this was added to ListenConfig
, which seems like an alternate way to set up a listener. Caddy doesn’t use this, but maybe it could, to make keepalives configurable, for the connection between your client and Caddy.
What’s awkward though is that this server keepalive would be for all connections on the server listening on port 443, so if you were to turn off keepalives, it would also turn them off for regular HTTP traffic (which is maybe not ideal? I dunno).
FYI @matt you might understand this more.