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

relay: recycle reservations for the same peer #2963

Open
burdiyan opened this issue Sep 17, 2024 · 0 comments · May be fixed by #2974
Open

relay: recycle reservations for the same peer #2963

burdiyan opened this issue Sep 17, 2024 · 0 comments · May be fixed by #2974

Comments

@burdiyan
Copy link
Contributor

I have a libp2p node configured with EnableRelay(), EnableHolePunching(), ForceReachabilityPrivate(), and EnableAutoRelayWithStaticRelays() options. So my node starts up and connects to a preconfigured relay server right away.

I have a few reservation slots per peer configured on the relay server.

If I restart my libp2p node a few times, after some time it will fail to obtain a reservation on the relay because all slots are exhausted.

I'm not sure the motivation for this design of slots, e.g. why there need to be more than 1 slot per peer at all? But I'd like to suggest an enhancement to recycle the slots, so when a relay server notices the peer has disconnected, it should free up those slots, and allocate new ones when the peer reconnects.

With the current design, seems like even temporary network flickering could cause all the reservation slots to finish, although in fact there're no resources busy on the relay server.

@sukunrt sukunrt linked a pull request Sep 23, 2024 that will close this issue
@sukunrt sukunrt changed the title autorelay: recycle reservations relay: recycle reservations for the same peer Sep 23, 2024
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 a pull request may close this issue.

1 participant