Live data from Hacker News

Bunny DNS – A scriptable DNS platform

bunny.net

31–40 of 90 posts

Re: Bunny DNS – A scriptable DNS platform

#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 the reasons for this. The more general version of the argument is that it enables composability: you can take a Worker implementation and incorporate it into a larger codebase without having to modify its code. This helps for testing (incorporating into a test harness), but also lets you do things like take two workers and combine them into one worker with a new top-level event handler that dispatches to one or the other.

Re: Bunny DNS – A scriptable DNS platform

#32
post #2

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

Makes me question what else they are incompetent in.

Now I am wondering what else I am incompetent in. This comment and the original give no context to why I would not use the word routing with DNS?

I looked up the definition of routing in a few places and I do not see why it does not fit. Does this also qualify as incompetent https://cloud.google.com/dns/docs/zones/manage-routing-polic... ?

"It always puzzles me when people speak of "routing" in conjunction with DNS." - original message for context

Re: Bunny DNS – A scriptable DNS platform

#34
post #25

Can't make an account with a .me tld in my email...

I assume it's a Protonmail account, I noticed many websites say a "pm.me" email address is invalid.

At my employer, some users register with a pm.me email address. When users contact us via email, they use a different protonmail address and never the pm.me address. I know you can never rely on the sender address, but from a support perspective this is still strange and extremely troublesome (for example it is tedious to assign the user to an account). I assume that Protonmail users can only receive emails with pm.me, but not send them. For me actually a reason to block pm.me or to handle it like a throwaway address.

Re: Bunny DNS – A scriptable DNS platform

#35
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 dynamically.

This is most assuredly better than what I was building though. Mine is rust-based but the "script language" is a very simple DSL. I considered allowing docker containers that receive some command arguments and must write the answer to standard out, but that felt like a brittle interface and I worried about performance (even with offering a cache). I also considered writing it in Elixir and allowing elixir code snippets, but I got scared of how hard it would be to secure that.

Anyway really neat idea! I hope to see more innovations and implementations!

Re: Bunny DNS – A scriptable DNS platform

#36

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…

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...

Re: Bunny DNS – A scriptable DNS platform

#37
post #36

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…

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 size grows, only returning the 3 to 5 newest node IPs present since I expect the ones most likely to get killed/recycled will be the older ones (not always true, but often is in my setup).

Has anybody else run into this and solved it? Cloudflare DNS seems to have figured out a decent way to deal with this. I may take a close look at their responses and see what they set for TTL, etc.

Re: Bunny DNS – A scriptable DNS platform

#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 origin, which scriptable DNS would prevent, you could put things at the edge and reduce hops.
Why else would you use this?

Re: Bunny DNS – A scriptable DNS platform

#39
post #2

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

Makes me question what else they are incompetent in.

When an expert is explaining things to non-experts (like a marketing page would), you use terms that your audience will understand and relate to. The goal is not perfect technical accuracy. The goal is to convey the basic idea so the reader can understand it.

Re: Bunny DNS – A scriptable DNS platform

#40
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.

Post reply on HN