Multi Deployment - multiple dmsg-discovery configuration [WIP] #281
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR attempts to support configuration of multiple dmsg discovery servers or multiple dmsg networks.
For
dmsg curl
or any short-lived dmsg client this can be implemented as fallback such that if the client configured with the first specified dmsg discovery makes a request which returns an error (i.e. dmsg errors - not http status code errors) or no response, the request is attempted again with a dmsg client configured with the next specified dmsg discovery server.For long-lived dmsg clients, or those which wrap an HTTP or TCP server application OR the dmsg client of the skywire visor, it will be required to use as many clients simultaneously as the number of dmsg-discovery servers which are specified, and to connect to or register the client in all configured dmsg discoveries simultaneously.
For the
dmsg server
it will be required to connect to both dmsg discoveries ; and separate or different ports must be used for each configured dmsg-discovery.NOTE: the retry logic for dmsg clients is very weak, currently. If the request cannot be fulfilled from a dmsg server that the client is currently connected to, but the client it is attempting to connect to is itself connected to more than one dmsg server, the first client should attempt to connect to the second one via the other dmsg server before using a client which is connected to another dmsg discovery server.
PR is WIP