[GH-ISSUE #370] DNS resolution performance improvements #128

Closed
opened 2026-02-26 04:34:08 +03:00 by kerem · 0 comments
Owner

Originally created by @mageddo on GitHub (Mar 17, 2023).
Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/370

Originally assigned to: @mageddo on GitHub.

Introduction

Most time spent on DNS resolution on DPS is caused by hostnames which won't get solved cause they are fake hostnames made by search feature (described on #336 ) or just a remote hostname query which got an timeout or spent a bit more time than expected to solve, it decreases DPS performance considerably.

Goals

Improve DPS cache intelligence on remote solved names so DPS will be much faster and stable:

1- I read is a common approach to DNS Servers to cache names for more time than specified on the TTL

In general people expects the server name address to be updated in some hours, then if DPS caches found hostnames for at least 5 minutes and the don't found for 1 hour, it might speed up a lot.

ref 1

By default, all proxied records have a TTL of Auto, which is set to 300 seconds.

ref 2

A change to a DNS record—for example, changing the IP address defined for a specific hostname—can take up to 72 hours to propagate worldwide, although it typically takes a few hours

ref 3

No geral, a propagação das alterações do DNS ocorre dentro de algumas horas. No entanto, pode levar até 48 horas para que a propagação alcance toda a internet

ref 4

Most registrars set the TTL to 24 hours IIRC, so for 24 hours some people will see the old address and some will see the new one and by 24 hours after the change everyone should have the new address, with some instead using a lower value like 4 hours.

2- DPS must improve the remote resolution to make distinguish when a name not exists or when it just got an resolution timeout then name which not exists must be cached for a bigger period of time, maybe 1 hour?

3- Create a mechanism so the user can flush the cache

Non Goals

todo

Originally created by @mageddo on GitHub (Mar 17, 2023). Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/370 Originally assigned to: @mageddo on GitHub. ### Introduction Most time spent on DNS resolution on DPS is caused by hostnames which won't get solved cause they are fake hostnames made by `search` feature (described on #336 ) or just a remote hostname query which got an timeout or spent a bit more time than expected to solve, it decreases DPS performance considerably. ### Goals Improve DPS cache intelligence on remote solved names so DPS will be much faster and stable: ✅ 1- I read is a common approach to DNS Servers to cache names for more time than specified on the TTL In general people expects the server name address to be updated in some hours, then if DPS caches *found hostnames* for at least 5 minutes and *the don't found* for 1 hour, it might speed up a lot. [ref 1][1] > By default, all [proxied records](https://developers.cloudflare.com/dns/manage-dns-records/reference/proxied-dns-records/) have a TTL of Auto, which is set to 300 seconds. [ref 2][2] > A change to a DNS record—for example, changing the IP address defined for a specific hostname—can take up to 72 hours to propagate worldwide, although it typically takes a few hours [ref 3][3] > No geral, a propagação das alterações do DNS ocorre dentro de algumas horas. No entanto, pode levar até 48 horas para que a propagação alcance toda a internet [ref 4][4] > Most registrars set the TTL to 24 hours IIRC, so for 24 hours some people will see the old address and some will see the new one and by 24 hours after the change everyone should have the new address, with some instead using a lower value like 4 hours. ✅ 2- DPS must improve the remote resolution to make distinguish when a name not exists or when it just got an resolution timeout then name which not exists must be cached for a bigger period of time, maybe 1 hour? ✅ 3- Create a mechanism so the user can flush the cache ### Non Goals todo [1]: https://developers.cloudflare.com/dns/manage-dns-records/reference/ttl/ [2]: https://ns1.com/resources/dns-propagation#:~:text=DNS%20propagation%20is%20the%20time,typically%20takes%20a%20few%20hours. [3]: https://br.godaddy.com/help/quais-fatores-afetam-o-tempo-de-propagacao-de-dns-1746 [4]: https://serverfault.com/questions/45470/how-long-will-a-dns-change-take
kerem 2026-02-26 04:34:08 +03:00
  • closed this issue
  • added the
    feature
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dns-proxy-server-mageddo#128
No description provided.