InfluxDB node does DNS query in on every message

It would appear that a DNS query is done for every single message my flow. I have the TTL set to 3600 for my local network since things don't really change too often. Is there any reason that the InfluxDB node needs to do a lookup every time?

node-red - 3.0.0
node-red-contrib-influxdb - 0.6.1


Welcome to the forum @danielgoepp

I would expect that to be down to the OS rather then the node. The node will just pass the server name or IP as entered in the influx config node to the OS networking software.

Has a couple of dependencies so probably one of those that is doing the lookup. May be worth raising an issue on GitHub to see if Mike can do anything about it.

1 Like

I see your point, but the reality is that many applications will do a DNS lookup when connecting only, but don't need to for every transaction. An interesting difference with modern apps that don't persist connection I guess, so a DNS lookup comes from the app on every message. Yes, I would expect the OS to handle this better, but it's also reasonable to have a way for the application to not even do a DNS query in the first place. I will look into why DNS cache is not catching this but is working fine for all other queries. Thanks.

Ah, it was all about where I had DNS getting cached :frowning: So there is no local DNS cache on the server I'm running docker on. It is on the server that I'm using to query out. I mean, I guess it's not a big deal, it just feels dirty to me to query DNS for every single message.

For anyone else stumbling on this, I might save a few minutes of their time :slight_smile: I discovered that docker specifically ignores systemd-resolve.

And read the first answer. I don't know what I'm going to do to solve this yet, but I can figure that out, and at least I know what the reason is.

Maybe ditch Docker?! :slight_smile:

1 Like

Getting close :wink: I mean, I like it for some things, but I do run VMs for about half my stuff still too because of the benefits of having a full OS I can control. I have a love / hate relationship with Docker, no doubt.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.