You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -471,6 +471,19 @@ This purge cache feature is useful for DNS records that have recently changed an
471
471
472
472
## Compatibility
473
473
474
+
> \[!NOTE]
475
+
> **Node.js v24+ DNS Record Type Property**
476
+
>
477
+
> Starting with Node.js v24, the native DNS resolver adds a `type` property to certain DNS record objects (MX, CAA, SRV, SOA, and NAPTR records). Tangerine automatically includes this property when running on Node.js v24+ to maintain 1:1 compatibility with the native `dns` module. For example:
The only known compatibility issue is for locally running DNS servers that have wildcard DNS matching.
475
488
476
489
If you are using `dnsmasq` with a wildcard match on "localhost" to "127.0.0.1", then the results may vary. For example, if your `dnsmasq` configuration has `address=/localhost/127.0.0.1`, then any match of `localhost` will resolve to `127.0.0.1`. This means that `dns.promises.lookup('foo.localhost')` will return `127.0.0.1` – however with :tangerine: Tangerine it will not return a value.
We have written extensive benchmarks to show that :tangerine: Tangerine is as fast as the native Node.js DNS module (with the exception of the `lookup` command). Note that performance is opinionated – since rate limiting plays a factor dependent on the DNS servers you are using and since caching is most likely going to takeover.
516
529
517
-
The latest benchmark results are viewable on GitHub under this repository's [GitHub CI actions logs](https://github.com/forwardemail/nodejs-dns-over-https-tangerine/actions?query=event%3Apush):
518
-
519
-
> [Node 16 on ubuntu-latest](https://github.com/forwardemail/nodejs-dns-over-https-tangerine/actions/runs/4297805550/jobs/7491228635#step:6:1)
tangerine.lookupPOSTwith caching using Cloudflare x 1,035 ops/sec ±195.73% (91 runs sampled)
611
-
tangerine.lookupPOST without caching using Cloudflare x 52.76 ops/sec ±51.29% (53 runs sampled)
612
-
tangerine.lookupGETwith caching using Cloudflare x 694,910 ops/sec ±1.54% (87 runs sampled)
613
-
+tangerine.lookupGET without caching using Cloudflare x 40.18 ops/sec ±60.19% (49 runs sampled)
614
-
dns.promises.lookupwith caching using Cloudflare x 12,645,103 ops/sec ±0.26% (90 runs sampled)
615
-
-dns.promises.lookup without caching using Cloudflare x 2,664 ops/sec ±0.54% (88 runs sampled)
616
-
Fastest without caching is:dns.promises.lookup without caching using Cloudflare
617
-
618
-
Started: resolve
619
-
tangerine.resolvePOSTwith caching using Cloudflare x 1,005 ops/sec ±195.93% (91 runs sampled)
620
-
tangerine.resolvePOST without caching using Cloudflare x 55.52 ops/sec ±46.26% (57 runs sampled)
621
-
tangerine.resolveGETwith caching using Cloudflare x 2,879,865 ops/sec ±0.35% (86 runs sampled)
622
-
+tangerine.resolveGET without caching using Cloudflare x 71.11 ops/sec ±2.94% (74 runs sampled)
623
-
tangerine.resolvePOSTwith caching using Google x 1,292 ops/sec ±195.91% (88 runs sampled)
624
-
tangerine.resolvePOST without caching using Google x 36.88 ops/sec ±41.76% (53 runs sampled)
625
-
tangerine.resolveGETwith caching using Google x 2,885,428 ops/sec ±0.22% (88 runs sampled)
626
-
tangerine.resolveGET without caching using Google x 70.38 ops/sec ±3.72% (68 runs sampled)
627
-
resolver.resolvewith caching using Cloudflare x 10,645,813 ops/sec ±0.23% (91 runs sampled)
628
-
-resolver.resolve without caching using Cloudflare x 71.80 ops/sec ±2.84% (67 runs sampled)
629
-
+Fastest without caching is:resolver.resolve without caching using Cloudflare, tangerine.resolveGET without caching using Cloudflare, tangerine.resolveGET without caching using Google, tangerine.resolvePOST without caching using Cloudflare
630
-
631
-
Started: reverse
632
-
tangerine.reverseGETwith caching x 917 ops/sec ±195.78% (88 runs sampled)
633
-
+tangerine.reverseGET without caching x 51.15 ops/sec ±51.92% (61 runs sampled)
634
-
resolver.reversewith caching x 11,058,579 ops/sec ±0.37% (88 runs sampled)
635
-
-resolver.reverse without caching x 62.30 ops/sec ±24.83% (64 runs sampled)
636
-
dns.promises.reversewith caching x 11,276,123 ops/sec ±0.17% (90 runs sampled)
637
-
-dns.promises.reverse without caching x 73.46 ops/sec ±1.99% (69 runs sampled)
638
-
Fastest without caching is:dns.promises.reverse without caching, resolver.reverse without caching
639
-
```
640
-
641
-
> Node v18.14.2 on MacBook Air M1 16GB (with DNS blackholed VPN) – **this highlights the DNS blackhole problem**:
tangerine.lookupPOSTwith caching using Cloudflare x 1,327 ops/sec ±195.65% (89 runs sampled)
651
-
tangerine.lookupPOST without caching using Cloudflare x 71.11 ops/sec ±8.24% (71 runs sampled)
652
-
tangerine.lookupGETwith caching using Cloudflare x 759,816 ops/sec ±0.46% (90 runs sampled)
653
-
+tangerine.lookupGET without caching using Cloudflare x 73.98 ops/sec ±1.78% (69 runs sampled)
654
-
dns.promises.lookupwith caching using Cloudflare x 1,744 ops/sec ±195.97% (88 runs sampled)
655
-
-dns.promises.lookup without caching using Cloudflare x 2,717 ops/sec ±0.82% (87 runs sampled)
656
-
Fastest without caching is:dns.promises.lookup without caching using Cloudflare
657
-
658
-
Started: resolve
659
-
tangerine.resolvePOSTwith caching using Cloudflare x 947 ops/sec ±195.93% (91 runs sampled)
660
-
tangerine.resolvePOST without caching using Cloudflare x 44.33 ops/sec ±73.30% (75 runs sampled)
661
-
tangerine.resolveGETwith caching using Cloudflare x 2,814,737 ops/sec ±0.17% (91 runs sampled)
662
-
+tangerine.resolveGET without caching using Cloudflare x 57.25 ops/sec ±51.61% (73 runs sampled)
663
-
tangerine.resolvePOSTwith caching using Google x 1,087 ops/sec ±195.92% (91 runs sampled)
664
-
tangerine.resolvePOST without caching using Google x 36.84 ops/sec ±7.04% (62 runs sampled)
665
-
tangerine.resolveGETwith caching using Google x 2,784,199 ops/sec ±0.15% (92 runs sampled)
666
-
tangerine.resolveGET without caching using Google x 47.55 ops/sec ±5.66% (76 runs sampled)
667
-
resolver.resolvewith caching using Cloudflare x 0.09 ops/sec ±6.41% (5 runs sampled)
668
-
-resolver.resolve without caching using Cloudflare x 0.10 ops/sec ±6.52% (5 runs sampled)
669
-
+Fastest without caching is:tangerine.resolveGET without caching using Google
670
-
671
-
Started: reverse
672
-
tangerine.reverseGETwith caching x 1,345 ops/sec ±195.66% (92 runs sampled)
673
-
+tangerine.reverseGET without caching x 71.73 ops/sec ±3.03% (73 runs sampled)
674
-
resolver.reversewith caching x 0.10 ops/sec ±6.54% (5 runs sampled)
675
-
-resolver.reverse without caching x 0.10 ops/sec ±0.01% (5 runs sampled)
676
-
dns.promises.reversewith caching x 0.10 ops/sec ±6.54% (5 runs sampled)
677
-
-dns.promises.reverse without caching x 0.10 ops/sec ±0.01% (5 runs sampled)
678
-
+Fastest without caching is:tangerine.reverseGET without caching
679
-
```
680
-
681
544
Also see this [write-up](https://samknows.com/blog/dns-over-https-performance) on UDP-based DNS versus DNS over HTTPS ("DoH") benchmarks.
682
545
683
546
**Speed could be increased** by switching to use [undici streams](https://undici.nodejs.org/#/?id=undicistreamurl-options-factory-promise) and [getStream.buffer](https://github.com/sindresorhus/get-stream) (pull request is welcome).
0 commit comments