nats.net icon indicating copy to clipboard operation
nats.net copied to clipboard

Full Reconnect Behavior

Open scottf opened this issue 3 years ago • 4 comments
trafficstars

  • [x] Server Pool

A server list pool is maintained. There is a complete implementation in Java for reference.

  • [x] Max Retries: How many times each server in the pool should be tried.
  • [x] Jitter
  • [ ] Tls Jitter
  • [ ] Server List Callback

When connecting, server returns list of URLs to other servers in the cluster. Client should store them and use when reconnecting, but users need to be able to disable this option, meaning that client ignores the returned additional URLs and use only the ones passed by a the user.

  • [ ] Ignore Discovered Urls:

Clients can ignore discovered servers instead using just bootstrap.

scottf avatar Jun 15 '22 21:06 scottf

Already part of the released alpha client.

Jarema avatar Jul 26 '23 09:07 Jarema

There is a full specification for reconnect behavior. In my head right now, but partially started in this ADR https://github.com/nats-io/nats-architecture-and-design/pull/202. I will work on it.

@mtmk Please see me in the meantime to discuss.

scottf avatar Jul 26 '23 12:07 scottf

This is mostly implemented. We will revisit.

mtmk avatar Jul 26 '23 18:07 mtmk

@scottf, I Updated the todo above. Let me know if I missed/messed something.

mtmk avatar Nov 21 '23 20:11 mtmk