# Ipfs-go question

**URL:** <https://discuss.ipfs.tech/t/ipfs-go-question/16825>\
**Category:** Uncategorized\
**Created:** [August 17, 2023, 12:51am UTC](https://discuss.ipfs.tech/t/ipfs-go-question/16825 "2023-08-17T00:51:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ptg](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@ptg](https://discuss.ipfs.tech/u/ptg)\
**Post date:** [August 17, 2023, 12:51am UTC](https://discuss.ipfs.tech/t/ipfs-go-question/16825/1 "2023-08-17T00:51:27Z")

</div>

Greetings,

If add a new file(for instance a media of ~2GB) to ipfs-go then I do observe an avalanche of UDP packets on the routers WAN interface.  
Because of that huge amount of UDP packets the access to internet is going down, when I stop ipfs-go in ~10 min the aceess is restored.

Ipfs-go resides behind the NAT and I also have set the port forward for port 4001.

Not sure why the router behaves like I described, perhaps someone has an idea.

Please advise

---

<div class="post-metadata">

**Author:** ![Jorropo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/jorropo/32/3230_2.png) [@Jorropo](https://discuss.ipfs.tech/u/Jorropo)\
**Post date:** [August 17, 2023, 6:47am UTC](https://discuss.ipfs.tech/t/ipfs-go-question/16825/2 "2023-08-17T06:47:00Z")

</div>

We have a tracking issue for [Router crashes when Kubo is being used · Issue #9998 · ipfs/kubo · GitHub](https://github.com/ipfs/kubo/issues/9998) it contains two workarounds you should try.

It would help us if you could also comment a report on the issue ❤ 🙂

We got a very similar report here [IPFS in Brave slows internet speeds to a crawl](https://discuss.ipfs.tech/t/ipfs-in-brave-slows-internet-speeds-to-a-crawl/16820)

About _why_ it does that, this is normal this is the DHT provide process, your node is storing itself in all the CIDs you are creating inside the Distributed Hashed Table. This is a big decentralised phone book that contains a map of `CID → List of nodes hosting it` and `Node → IP + PORT + Protocol list`

You can enable accelerated DHT client [https://github.com/ipfs/kubo/blob/master/docs/config.md#routingaccelerateddhtclient](https://github.com/ipfs/kubo/blob/master/docs/config.md#routingaccelerateddhtclient), however it is extremely bursty, overall it makes multiple order less connections and is a few hundred thousands times faster, but in a short time bursty.

---

<div class="post-metadata">

**Author:** ![ptg](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@ptg](https://discuss.ipfs.tech/u/ptg)\
**Post date:** [August 17, 2023, 11:06am UTC](https://discuss.ipfs.tech/t/ipfs-go-question/16825/3 "2023-08-17T11:06:08Z")

</div>

Thanks for your (@Jorropo) quick turnaround.  
I will fill out the report, and should I raise a PR or I can paste it here?

Speaking about the workaround.

## No Reuseport

This is exactly what is happening on the router, it receives a lot of UDP packets on a port that is already closed and the kernel sends an ICMP message with RST flag.

I will test it over the weekend and keep posted.

Thanks

---

<div class="post-metadata">

**Author:** ![ptg](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@ptg](https://discuss.ipfs.tech/u/ptg)\
**Post date:** [August 18, 2023, 1:14am UTC](https://discuss.ipfs.tech/t/ipfs-go-question/16825/4 "2023-08-18T01:14:07Z")

</div>

I have tried the workarounds proposed by @Jorropo and none of them worked.

I suspect the ISP(Bell Canada) applies some kind of rate limit, and I am not sure how to confirm that.

Probably I could do another test, for instance create a VPN tunnel and divert that traffic via the tunnel.

---

<div class="post-metadata">

**Author:** ![ptg](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@ptg](https://discuss.ipfs.tech/u/ptg)\
**Post date:** [August 23, 2023, 7:10pm UTC](https://discuss.ipfs.tech/t/ipfs-go-question/16825/5 "2023-08-23T19:10:39Z")

</div>

@Jorropo  
I have created IPinIP tunnel and migrated the service to IPv6 and I confirm no throttling was observed.

I come to conclusion that quic protocol generates a high volume of PPS(packet per second) and for home users Bell ISP applies the rate limit on UDP traffic and that causes the connection to be throttled.

I am attaching a chart with PPS, please note that the interval is per minute and the spikes sometimes reach 3.5 milions packets per minute

 ![image](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/2X/1/11ed03985a37fed4e1489337cf1b945029bf9a44.png)

---

<div class="post-metadata">

**Author:** ![Jorropo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/jorropo/32/3230_2.png) [@Jorropo](https://discuss.ipfs.tech/u/Jorropo)\
**Post date:** [August 23, 2023, 9:41pm UTC](https://discuss.ipfs.tech/t/ipfs-go-question/16825/6 "2023-08-23T21:41:21Z")

</div>

what is your advertised bandwidth by your ISP ?

---

<div class="post-metadata">

**Author:** ![ptg](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@ptg](https://discuss.ipfs.tech/u/ptg)\
**Post date:** [August 24, 2023, 3:36am UTC](https://discuss.ipfs.tech/t/ipfs-go-question/16825/7 "2023-08-24T03:36:04Z")

</div>

The bandwidth is 1Gbit/s up and down over the fiber.

---

<div class="post-metadata">

**Author:** ![Jorropo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/jorropo/32/3230_2.png) [@Jorropo](https://discuss.ipfs.tech/u/Jorropo)\
**Post date:** [August 25, 2023, 8:26am UTC](https://discuss.ipfs.tech/t/ipfs-go-question/16825/8 "2023-08-25T08:26:58Z")

</div>

`1Gbit/s / 1500bytes → 83Khz → 5 000 000 packets per minute` so as advertised your connection is able to handle 5m packets per minute flat.

> This is exactly what is happening on the router, it receives a lot of UDP packets on a port that is already closed and the kernel sends an ICMP message with RST flag.

I’m a bit confused / this is intresting, `LIBP2P_TCP_REUSEPORT` only affects TCP, UDP listener is always reused.  
On what port are you seeing UDP RSTs ?

Also which kernel is doing this, the router’s kernel or your IPFS host’s one ?

---

<div class="post-metadata">

**Author:** ![ptg](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@ptg](https://discuss.ipfs.tech/u/ptg)\
**Post date:** [August 25, 2023, 10:32pm UTC](https://discuss.ipfs.tech/t/ipfs-go-question/16825/9 "2023-08-25T22:32:10Z")

</div>

The router and ipfs are on the same host, where ipfs is running in a isolated process and network namespace.

1. The 1st attempt was using ipv4 where ipfs used to be behind NAT and with a port forward on port 4001. I noticed UDP tried to establish the connection on a closed sockets and on top of that ISP seems to apply the rate limit and that basically causes the Internet connection throttle.

2. The 2nd attempt I migrated ipfs to ipv6 via a VPN tunnel with no ipv4 configuration. In this set up I haven’t noticed the Internet connection to be throttled.

PS: It seems that ISP checks the amount of UDP packets sent per an interval form the home users and if it is more than X then the rate limit is applied. When sending ipfs traffic via a tunnel apparently it bypasses ISPs rate limits filters.

Conclusion: the amount of PPS generated by ipfs IMHO are normal, the problem is that the ISPs react on that traffic and apply various filters/traffic shaping…
