[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [mosquitto-dev] [PATCH] Add option to use tcp keepalive
|
Hello Edwin,
On 19.02.2018 15:50, Edwin van den Oetelaar wrote:
Is the TCP keepalive really solving a real use-case problem?
If so which one precisely?
Yes, it does. We have an IoT device on a metered connection on a tight
budget. The connection is encrypted. If the device's power or connection
is lost, the broker needs to find out rather fast.
I understand how TCP keepalive works and how MQTT-PINGREQ/RESP works.
How can you prevent clients for sending MQTT-PING/RESP when keepalive
on TCP level is already active? (if you do not disable the PING/RESP
you are increasing traffic instead of decreasing it)
If the client does not have a reliable tcp channel, maybe it is better
for the client to enable TCP-KeepAlive instead of the server (for
every connection)
I can not prevent a client from sending frequent PING/RESP packets but
it will be our code as well running on the clients. I will also not
disable PING/RESP but use a slower rate. While badly chosen values for
TCP keepalive can in fact increase the data usage, well chosen values
can reduce the overall data usage (as it allows less frequent PING/RESP
for the same perceived functionality). A TCP keepalive sent from the
client does not allow the broker to realize that the client is gone.
While it might help in some cases, it has no benefits in our use-case.
Just thinking aloud.
Gr,
Edwin van den Oetelaar
Best regards
Raphael
--
---------------------------------------------------------------------
RADIODATA GmbH
Newtonstraße 18
12489 Berlin
Germany
Tel: +49 (0)30 756 81 -3
Fax: +49 (0)30 756 81 -599
e- Mail: rlisicki@xxxxxxxxxxxxx
Homepage: www.radiodata.biz
USt_IdNr.: DE 195663499
WEEE-Reg.-Nr.: DE 63967380
Sitz der Gesellschaft: Berlin
Registergericht: Amtsgericht Charlottenburg HRB Nr.: 67865
Geschäftsführer: Hans-Joachim Langermann