ipfs/kubo

Implement bandwidth limiting

Open

#3.065 geöffnet am 9. Aug. 2016

Auf GitHub ansehen
 (76 Kommentare) (73 Reaktionen) (0 zugewiesene Personen)Go (2.725 Forks)batch import
exp/experthelp wantedstatus/deferredtopic/libp2p

Repository-Metriken

Stars
 (13.906 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 4T 2h) (28 gemergte PRs in 30 T)

Beschreibung

We need to place limits on the bandwidth ipfs uses. We can do this a few different ways (or a combination thereof):

  • per peer limiting on each actual connection object
    • pros:
      • low coordination cost (no shared objects between connections)
      • should have lower impact on performance than blindly rate limiting the whole process
    • cons:
      • no flow control between protocols, dht could drown out bitswap traffic
  • per subnet limiting
    • pros:
      • avoids rate-limiting LAN/localhost connections.
    • cons:
      • it's not always possible to tell what's "local" (e.g., with IPv6).
  • per protocol limiting on each stream
    • pros:
      • should have the lowest impact on system performance of the three options
      • each protocol gets its own slice of the pie and doesnt impact others
    • cons:
      • increased coordination required, need to reference the same limits across multiple streams
      • still makes it difficult to precisely limit the overall bandwidth usage.
  • global limiting using a single rate limiter over all connections
    • pros:
      • will successfully limit the amount of bandwidth ipfs uses.
    • cons:
      • ipfs will be quite slow when rate limited in this way

Related Issues:

Contributor Guide