matrix-org / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://matrix-org.github.io/dendrite/
Apache License 2.0
5.67k stars 664 forks source link

federation: Server without IPv6 support retries failed IPv6 connections without back off, spamming .well-known lookups many times a second #3291

Open Ablu opened 9 months ago

Ablu commented 9 months ago

Background information

Description

If a server does not support IPv6, but another server is only reachable via IPv6 connections are attempted in a tight loop without any back-off. This results in many .well-known lookups on the target server per second.

Steps to reproduce

Expected behaviour:

The connection should fail and exponentially back off. The .well-known entry should probably be cached as well.

/cc @davralin

davralin commented 9 months ago

So, the dendrite-server in question is mine, and the server it targeted is @Ablu 's.

To fill in the gaps: