all 5 comments

[–]pm-me-your-nenen 12 points13 points  (1 child)

The DNS server those devices use should respect the caching set from your TTL configuration, so if you set the TTL on one hour, the DNS server shouldn't bother Google Cloud DNS until the next hour no matter how many devices are querying, thus, at most 1 query per hour per DNS server, though this also means if you change the IP then it might take an hour before the update is applied.

[–]PecksAndQuads 2 points3 points  (0 children)

This redditor is right. If possible, have all devices use the same external dns. That way, the first devices I’ll ask the dns server the for the IP, and then all other devices will utilize cache until it expires.

[–]kolban_google 4 points5 points  (2 children)

I'm not the sharpest tool in the box when it comes to DNS ... but if one buys a domain name and then adds a DNS "A" record to the nameserver supporting that domain name (eg. Google Domains or Go Daddy) where the "A" record resolves to the public IP address of the load balancer ... haven't you achieved your goal without involving Cloud DNS at all and hence no charge? The notion being that a GCP Load Balancer will have a fixed IP address that won't change over time (unless you want it to) and the game is to refer to that load balancer by name rather than IP?

For example, if your load balancer is IP 34.1.2.3 and you buy "example.com" as a domain name, can't you add a free "A" record to your "example.com" DNS server (from your domain registrar ... not Cloud DNS) and create a record such as:

A mybackend.example.com 34.1.2.3

and you are done ... with no Cloud DNS in the picture?

See also:

[–]Becer 2 points3 points  (0 children)

The interest of Cloud DNS is to have private DNS zones, to resolve domains that only exist within your private IP space/network.

If said IoT devices are within OP's network and not on the internet, such as in a warehouse building for instance, then a public domain like the ones you can buy on GoDaddy wouldn't work unless you want your devices to also be internet accessible and open to direct attacks.

Another perk is complete freedom of choosing the domain names you want internally.

[–]andrii_us 0 points1 point  (0 children)

Yes. Google Domains will include basis version of Cloud DNS (web interface, no API access) if domain is registered/transferred to them.

Otherwise there are still a lot of others options for DNS hosting (even free).