My DNS server is literally rate limiting my ROCK because of all the DNS requests. Why is Roon having to make so damn many? Is there not a way to streamline calls to servers?
This has been discussed before, but there hasn’t been a satisfactory answer:
I’ve installed Pi-Hole on my Linux Roon Core server, so most of these requests are just local hits on Pi-Hole’s cache. In fact, in any 24 h period, about 80-85% of all DNS requests go to the cache, and near all of that is by the Roon Core. This traffic comes from metadata and image updates.
With these periodically massive numbers of DNS queries I wonder why Roon wouldn’t implement some sort of DNS caching on its core server, to reduce the impact on people’s networks and routers…
Well, yeah… exactly. It seems like a minor thing to resolve and I have limited coding skills.
my guess is that with cloud services where in one minute you connect to tidal/qobuz/roonlabs at some IP and in another minute it can be other IP, the dns cache could eventually make more harm than good.
but it’s interesting observation, it makes me think i should try set roon server to use one of my local dns caches - who knows maybe it will work reliably and improve performance a bit
whoa… just tested having dnsmasq dns cache on the linux roon core and it makes quite a difference… roon feels much snappier now, let’s see if it stays like that
1000+ DNS queries per minute is 16+ per second, which is ridiculous. Every DNS response comes with a time-to-live (TTL) field, which specifies how long the result can be cached. In ye olde days, there were DNS servers that enforced a minimum TTL of 5 minutes, but I don’t think anyone does that anymore.
As to cloud infrastructure, the actual servers are most likely behind a load balancer or other front end, so users get a (at most) slowly changing IP address. You would expect to see the IP address change in case of a data center or regional failure — those happen, but are thankfully fairly rare, say a few times a year at most.
What is the issue here? If Roon would use HTTP(S) request instead of lightweight DNS queries that would tax your network much harder. If you believe that DNS queries are only good for resolving hostnames to IP-Addresses … these times are long gone.
Please enlighten us…
I don’t sell or gift light bulbs.
If Roon Labs is in control over the authoritative nameserver for
roonlabs.com, a user’s core could as example send a DNS request for
abba.metadata.roonlabs.com (In practice it is unlikely that one would use a name like
abba. Datasets in databases carry usually a unique identifier that would/could be used here instead.) and get a reply (an alias that points to
metadata.roonlabs.com) that contains a checksum or a “last update” timestamp in the TXT record which the core could use to determine if his local information for ABBA is still current. Such a method would generate a lot of DNS requests but would save a lot of bandwidth too as only data that got updated needs to be downloaded.
Again, this is only speculative thinking on my side, I never looked at the DNS traffic of my Roon cores, but would explain why there are so many DNS requests generated by Roon (as others claim).
Also, if our Roon cores use other methods to update metadata over TCP/IP, then keep in mind that Roon’s programming is high level using .NET. Related DNS requests would then be generated by the OS a core runs on and should follow the usual OS standards (if there are any) about sending/caching required DNS request. In this case there is nothing Roon can do about DNS requests as they are not generated by Roon.
In any case, if a user’s internet connection goes down because of the DNS request, then this could be because he uses the DNS proxy-server (addresses for Gateway and DNS is the same in network configuration) of his router (snail speed CPU). An upgrade of the router to a more capable device might resolve this but is not always feasible. Then the network configuration of the machine running the Roon Core can be changed to use another DNS proxy-server instead.
If there are no issues with the internet connection or the issues could be solved by upgrading the router or not using the router’s DNS proxy-server, then why bother with the amount of requests at all?
… and, as usual, no reply from official Roon team… and, as usual, the question remain without a reply and/or, even worse, with an additional provocating question:
would be possible to have official explanation? to avoid another expert, but not directly involved, opinion like, unfortunately, we are seeing in so huge number about different fields in the last years?
There was an official reply already in the thread linked above:
So these high numbers of DNS queries are normal expected behavior and nothing users should have to worry about.
Note: As a user of Roon I’m as much “directly involved” as any other Roon user. As a user with two cores maybe even more than the average.
indeed the number of dns queries made during library “scan” is lunatic, i’ve looked to the in detail and it seems like there are several parallel threads running, each making it’s own dns queries - e.g. 10s of dns queries fired in parallel, for the same fqdn. and that repeats at nausea until library “scan” is finished. I put scan in quotes, because it’s actually not showing in Roon client as ongoing scan (blue rotating circle progressbar), but i can see in Roon logs it’s doing some metadata scan. This is also bit unfortunate that there are running heavy jobs on background which are not visible to user - even worse during playback.
I think this should be addressed by Roonlabs as bug.
However good thing is, that now it’s couple of weeks i’m running DNS cache server for Roon server (actually also for clients) and in regards to streaming services it did not impact in any bad way, I would even say it improved load times not just when browsing Tidal/Qobuz libraries, but subjectively also the speed of start playing a new track from such services.
It even seemed like it solved intermittent search issues / load times of locally stored albums, but it haven’t last for long and these issues are intermittently still reappearing… Usually when this happens, I can see Roon server taking 100% cpu of single core for 10s of seconds without any obvious reason. This is unrelated to the DNS issue, I just wanted to brag a bit after some time. sorry for that
How do we set up the DNS cache for roon? Sounds like something I’d like to try.
A few people here are using https://pi-hole.net/.
Thanks for the link
Hey all, we just released Roon Build 903 which addresses excessive DNS requests on Linux platforms.
Full release notes here:
This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.