Live data from Hacker News

Bunny DNS – A scriptable DNS platform

bunny.net

41–50 of 90 posts

Re: Bunny DNS – A scriptable DNS platform

#41
post #36

Earlier quoted context omitted.

Curious how you imagined handling TTL and response caching in this kind of scenario? In my experience, ISPs (particularly residential providers) sometimes ignore/override the TTL in authoritative DNS records and aggressively cache responses, for reasons...

Yeah great question, and I don't fully have an answer yet! For the scenario I need it for, the hostname only does one thing and won't be looked up by the client until it's needed, which helps avoid that problem. Furthermore, thank to K8s nodePort routing, as long as one of the nodes is still alive and answering, the request will be routed even if the first IP is no longer valid. I've also considered as the cluster si…

I will admit my DNS knowledge is a bit out of date, so I am sure folks much smarter than me have indeed figured this out. I am also curious about how this gets mitigated.

Re: Bunny DNS – A scriptable DNS platform

#43
post #38

They had me at the combination of the words "scriptable" and "DNS." My monkey brain is susceptible to that clever trick. I'm struggling to see what this could be used for, but the comments here help. In summary: - an alternative to anycast. - an alternative to routing inside your app (your app could detect the IP, and have different behavior based on rules internally). This means you are always going to the same orig…

>They had me at the combination of the words "scriptable" and "DNS." Same, but then they lost me at Javascript.

May I interest you in some Lua instead? https://doc.powerdns.com/authoritative/lua-records/index.htm...

I run PowerDNS but haven't found a reason to play with this yet.

Re: Bunny DNS – A scriptable DNS platform

#44
post #38

They had me at the combination of the words "scriptable" and "DNS." My monkey brain is susceptible to that clever trick. I'm struggling to see what this could be used for, but the comments here help. In summary: - an alternative to anycast. - an alternative to routing inside your app (your app could detect the IP, and have different behavior based on rules internally). This means you are always going to the same orig…

>They had me at the combination of the words "scriptable" and "DNS." Same, but then they lost me at Javascript.

I know that we all have our preferences of langauges, but is Javascript in 2022 actually any worse than anything else as a scripting language? What would you prefer instead?

Re: Bunny DNS – A scriptable DNS platform

#45
post #2

It always puzzles me when people speak of "routing" in conjunction with DNS.

Why? It is a perfectly legitimate use of the term. You can use DNS responses to route visitors to the appropriate datacenter or regional network.

Head over to https://cachecheck.opendns.com/ and plug in 'www.google.com', you'll notice the Google returns different IPs in different geographic locations to route visitor traffic.

Re: Bunny DNS – A scriptable DNS platform

#46
post #31

I've been following Bunny (BunnyCDN/Bunny.net) for a while and love what they are doing. Couple of suggestions: • Every code snippet should be copy/pasteable (and work well), that article might be the entry point to what many are doing. • I have this feeling this is following Cloudflare's Workers style of `addEventListener('fetch', eventHandler);`. I need to write a 500-word essay on that, but the short version is th…

> I strongly believe that it'd be way better for their clients if the client could just do `export default async function handleDns(event) { ... }` I'm the tech lead of Cloudflare Workers and you're absolutely right about this. We actually introduced such a syntax as an option a while back and are encouraging people to move to it: https://blog.cloudflare.com/workers-javascript-modules/ Your argument is exactly one of…

Thanks! This article is pretty much what I had in mind and exactly my 500-words argument! I don't know how I missed it. This is def one of the things that made me think Cloudflare Workers were not so polished. Are you hiring? I've got many more ideas where this came from :)

Re: Bunny DNS – A scriptable DNS platform

#47

Well dang, that's what I get for taking too long to implement my idea :-D Seriously this is great. I started building a "scriptable DNS" to make it easy to have a DNS record that always points at the valid K8s nodes in my cluster (and randomizes the order of the IPs each time). Since nodes can come and go very quickly (especially during an upgrade), and their IP changes every time, it's useful to be able to act dynam…

I can't nail down the exact date, but I believe PowerDNS 2.0 shipped sometime around 2001-2002 with pipe backend support. It allowed you to craft dynamic responses to DNS queries from any language you could get to run on Linux.

Re: Bunny DNS – A scriptable DNS platform

#48
One of the things that would be nice is if this would mean that Bunny's Let's Encrypt support would do wildcard certs. Right now, because Bunny doesn't control the DNS, they can't create wildcard certs. I know this is mostly about the scriptable DNS, but it is also an announcement that they're entering DNS more generally.

Re: Bunny DNS – A scriptable DNS platform

#50
post #38

They had me at the combination of the words "scriptable" and "DNS." My monkey brain is susceptible to that clever trick. I'm struggling to see what this could be used for, but the comments here help. In summary: - an alternative to anycast. - an alternative to routing inside your app (your app could detect the IP, and have different behavior based on rules internally). This means you are always going to the same orig…

Years ago I did school IT, during the time when all websites moved to SSL-only. We used to filter websites easily with Squid and something called Dan's Guardian. When Google switched to SSL-only we had to change. We could have required everyone to install certificates, but instead we used PowerDNS with Lua to force all Google search related queries to answer with a Google-provided CNAME.

https://gist.github.com/hayesr/55b55d167f67f57fe5e56ec3ab1f8...

Post reply on HN