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

Set sane limits for the browser node #60

Closed
p-shahi opened this issue Apr 19, 2023 · 1 comment
Closed

Set sane limits for the browser node #60

p-shahi opened this issue Apr 19, 2023 · 1 comment

Comments

@p-shahi
Copy link
Member

p-shahi commented Apr 19, 2023

The current limits set in libp2p.ts were set at their current values in order to get the app working for the IPFS Thing demo.
We need to configure saner limits instead of these arbitrarily high values.

Limits to address

    dht: kadDHT({
      protocolPrefix: "/universal-connectivity",
      maxInboundStreams: 5000,
      maxOutboundStreams: 5000,
      clientMode: true
    }),

https://github.com/libp2p/universal-connectivity/blob/main/packages/frontend/src/lib/libp2p.ts#L32

    identify: {
      // these are set because we were seeing a lot of identify and identify push
      // stream limits being hit
      maxPushOutgoingStreams: 1000,
      maxPushIncomingStreams: 1000,
      maxInboundStreams: 1000,
      maxOutboundStreams: 1000,
    },

https://github.com/libp2p/universal-connectivity/blob/main/packages/frontend/src/lib/libp2p.ts#L70

Documented more in https://hackmd.io/K_MkPfjOTyaLfLME4b25aw

@2color
Copy link
Collaborator

2color commented Apr 29, 2024

I believe this can be closed as the connection limits are set using the libp2p connection manager:

connectionManager: {
maxConnections: 10,
minConnections: 3,
},

@2color 2color closed this as completed Apr 29, 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

No branches or pull requests

2 participants