Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [hono-dev] Reconnect interval

I'm not actually a developer here, so take this with a grain of salt, but this sounds like something an exponential back-off could address properly. I.e., wait x milliseconds, then 2x, then 4x... etc.

Cheers,
Bor

-----Ursprüngliche Nachricht-----
Von: hono-dev-bounces@xxxxxxxxxxx <hono-dev-bounces@xxxxxxxxxxx> Im Auftrag von Kai Hudalla
Gesendet: Donnerstag, 25. April 2019 17:03
An: hono-dev@xxxxxxxxxxx
Betreff: Re: [hono-dev] Reconnect interval

On Thu, 2019-04-25 at 14:21 +0000, Lohmann Carsten (INST/ECS4) wrote:
> Hi,
>
> I would like to get some opinions on how we should deal with the
> *reconnect
> interval* concerning AMQP connections between Hono components.
>
> Currently, when for example the connection between a protocol adapter
> and the device registry fails or is closed, the re-connect attempt
> happens only after 500ms (that is the DEFAULT_RECONNECT_INTERVAL_MILLIS = 500).
>
> I guess this was introduced for the scenario that the device registry
> is indeed unavailable and for example currently being (re)started, so
> that an immediately-after re-connect attempt would probably fail.
>
> But, there are other scenarios:
> - The device registry could be deployed with multiple instances
> (Kubernetes
> pods) and even if one instance is currently not responding, the next
> connection attempt could reach another, fully available instance.
> - The device registry could have actively closed the connection with a
> "access token expired" response, meaning there is no reason to wait
> for a re-connect attempt.
>
>

sounds reasonable

> IMHO, these two scenarios are quite common. I would therefore suggest
> to get rid of the reconnect interval altogether, always trying to
> re-connect immediately.

What about simply setting it to 0 in our example deployment? People could then still decide whether they want to adjust it according to their needs?

> This would for example prevent the protocol adapters from giving out
> 503 Unavailable responses while waiting for the reconnect interval to
> elapse before connecting again to the device registry.
>
> WDYT?
>
>
> Best regards
>
> Carsten Lohmann
>
> Engineering Cloud Services 4 Bosch IoT Hub (INST/ECS4) Bosch Software
> Innovations GmbH | Ullsteinstr. 128 | 12109 Berlin | GERMANY |
> www.bosch-si.com
>
> Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411
> B
> Aufsichtsratsvorsitzender: Dr.-Ing. Thorsten Lücke; Geschäftsführung: Dr.
> Stefan Ferber, Michael Hahn, Dr. Aleksandar Mitrovic
>
>
>
> _______________________________________________
> hono-dev mailing list
> hono-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or
> unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/hono-dev

_______________________________________________
hono-dev mailing list
hono-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/hono-dev

Back to the top