Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configurable MQTT keepalive/ping interval for cloud connections #2939

Closed
reubenmiller opened this issue Jun 14, 2024 · 1 comment
Closed
Labels
improvement User value theme:mqtt Theme: mqtt and mosquitto related topics

Comments

@reubenmiller
Copy link
Contributor

reubenmiller commented Jun 14, 2024

Is your feature improvement request related to a problem? Please describe.

Allow control over the ping interval so that it is aligned with the different cloud requirements and it could be used to reduce some of the traffic for idle connections for those users who want to reduce the bandwidth by reducing the number of pings sent on idle connections.

It must also be noted that increasing the MQTT PING interval also affects how quickly the MQTT client detects whether the MQTT connection has been lost. Users should adjust the value with care, and they should verify that the interval is compatible with the cloud's requirements, as generally each cloud could also have additional settings on the load balancer to also disconnect idle connections after a period of time, and if the PING interval is above the idle connection setting, then it will also lead to the connection being closed by the server resulting in more traffic due to the reestablishment of the connection and the associated TLS handshake.

Describe the solution you'd like

A new tedge configuration value which is used by the bridge functionality (either mosquitto or the built-in bridge) to set MQTT PING keep-alive/ping interval:

  • On mosquitto: set the keepalive_interval seconds value in the <mapper>-bridge.conf file. See mosquitto docs
  • On built-in: use the value in the MQTT client which is connected to the cloud to control how often a MQTT PING_REQ is sent on idle connections

Describe alternatives you've considered

Additional context

@reubenmiller reubenmiller added improvement User value theme:mqtt Theme: mqtt and mosquitto related topics labels Jun 14, 2024
@reubenmiller
Copy link
Contributor Author

Duplicate of #3153

@reubenmiller reubenmiller marked this as a duplicate of #3153 Oct 10, 2024
@reubenmiller reubenmiller closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement User value theme:mqtt Theme: mqtt and mosquitto related topics
Projects
None yet
Development

No branches or pull requests

1 participant