Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Performance Profile Server Options #1324

@hoffmabc

Description

@hoffmabc

There are several different IPFS configuration profiles that could benefit certain scenarios. I will outline the three scenarios I'm proposing we support and how the change could be implemented.

Scenarios

Low Power Profile

This profile would be for mobile devices or those looking to lower power on a Raspberry Pi or low bandwidth device.
pertinent to @drwasho

c.Routing.Type = "dhtclient"
c.Reprovider.Interval = "0"

c.Swarm.ConnMgr.LowWater = 20
c.Swarm.ConnMgr.HighWater = 40
c.Swarm.ConnMgr.GracePeriod = time.Minute.String()

Server Profile

I think this should be the default mode we package with the OpenBazaar desktop application and it essentially disables announcing itself available on local addresses because it is NOT going to be available to every peer on the network except ones this server owns. This would seriously increase discoverability performance.

c.Addresses.NoAnnounce = appendSingle(c.Addresses.NoAnnounce, defaultServerFilters)
c.Swarm.AddrFilters = appendSingle(c.Swarm.AddrFilters, defaultServerFilters)
c.Discovery.MDNS.Enabled = false
c.Swarm.DisableNatPortMap = true

Full Profile

This would be the standard option and not change from what we're currently doing. This would be if users really do want their node to be visible on localized addresses for those who need their node to talk to other local nodes more efficiently.

Implementation

I think we can easily implement this in a few steps.

  1. Add a command line argument that we can pass to the server to indicate a preferred profile. If it is omitted we should default to our standard profile.
  2. In start.go we can programmatically set these options.
  • We probably should defer to the config file though if they've overridden this.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions