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

feat(rust): added support for multiple concurrent routes to tcp inlets #8832

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

davide-baldo
Copy link
Member

@davide-baldo davide-baldo commented Feb 28, 2025

This PR adds the possibility of multiple MultiAddr to the inlets.

There are few new parameters:

  • --ping-timeout, this is a proxy for ping interval and gets divided by the max. amount of failed pings
  • --target-redundancy, the amount of redundant routes instantiated, 0 means only one route will be instantiated, can still be specified when a single MultiAddr since dns could resolve into multiple IP addresses. By default it inherits the number of --to parameters.
  • --to can now be passed multiple times

A single MultiAddr can turn into multiple variants:
/project/default/... => /dnsaddr/xx.projects.orchestrator.io/... => [ /ip4/1.1.1.1/..., /ip4/2.2.2.2/...]

A session is created for each route (target redundancy+1) , every time it reconnects it selects a MultiAddr from the selector, making sure every MultiAddr variant gets used(unless redundancy+1 > available variants).
When DNS fails (or return empty) and no other MultiAddr is available, the session will retry every 15 seconds.

The inlet port will be bind upon creation, when a client connection reaches the inlet, a random route will be picked from the available ones, if no route is available it'll wait until one is available.

@davide-baldo davide-baldo force-pushed the davide-baldo/ha-inlet-communication branch 6 times, most recently from 79a6d1a to 1a7d9ea Compare March 4, 2025 14:37
@davide-baldo davide-baldo force-pushed the davide-baldo/ha-inlet-communication branch from 1a7d9ea to 1087b99 Compare March 4, 2025 15:05
@davide-baldo davide-baldo marked this pull request as ready for review March 4, 2025 15:22
@davide-baldo davide-baldo requested a review from a team as a code owner March 4, 2025 15:22
@mrinalwadhwa mrinalwadhwa requested a review from Copilot March 4, 2025 16:02

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@mrinalwadhwa mrinalwadhwa requested a review from Copilot March 4, 2025 16:17

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant