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: add flags to configure bitswap tuning params #203

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

gammazero
Copy link
Contributor

@gammazero gammazero commented Dec 2, 2024

New CLI flags:

  • routing-max-requests - Maximum number of concurrent find requests
  • routing-max-providers - Maximum number of providers to return for each find request
  • routing-max-timeout - Maximum time for to find the maximum number of providers

Corresponding environ vars:

ROUTING_MAX_REQUESTS
ROUTING_MAX_PROVIDERS
ROUTING_MAX_TIMEOUT

Allow configuration of bitswap tuning params.

New CLI flags:

- `bitswap-max-requests` - Maximum number of concurrent bitswap find requests
- `bitswap-max-providers` - Maximum number of providers to return for each bitswap find request
- `bitswap-max-timeout` - Maximum time for bitswap to find the maximum number of providers

Correspoinding environ vars:

`BITSWAP_MAX_REQUESTS`
`BITSWAP_MAX_PROVIDERS`
`BITSWAP_MAX_TIMEOUT`
Copy link
Contributor

@aschmahmann aschmahmann left a comment

Choose a reason for hiding this comment

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

LGTM (found one typo). I'm not sure the bitswap prefix is quite accurate given that these are all content routing related, but it doesn't bother me much given these are largely internal parameters not too many folks are likely to mess with 😅

main.go Outdated Show resolved Hide resolved
@gammazero
Copy link
Contributor Author

gammazero commented Dec 2, 2024

@aschmahmann The bitswap_ prefix is used because these params are used only in setup_bitswap.go to create the ProviderQueryManager that the bitswap client uses. Would it make more sense to change bitswap_ to routing_ or query_ or something else?

@gammazero gammazero merged commit f3dcc26 into main Dec 3, 2024
9 checks passed
@gammazero gammazero deleted the bitswap-config-flags branch December 3, 2024 18:49
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.

4 participants