Bunny DNS – A scriptable DNS platform
51–60 of 90 posts
Re: Bunny DNS – A scriptable DNS platform
#52I'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…
import { Router } from 'itty-router';
import { exportedObject } from './some/other/file';
const router = Router();
router.get('/update', async (request: Request, event: FetchEvent) => exportedObject.update(request, event));
router.all('*', () => new Response('404, not found!', { status: 404 }));
addEventListener('fetch', (event: FetchEvent) => {
event.respondWith(router.handle(event.request, event));
});
I don't even need to start up a http server to do testing of my handlers. I just test the functions directly.Re: Bunny DNS – A scriptable DNS platform
#53Well 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
#54Earlier quoted context omitted.
> 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
#55The end users of these domains are globally distributed and served from 14 different data centre locations across the world.
To do the geo IP matching we tried a lot of things, third party services etc but couldn't find one that works well and are priced well.
For example, the hosted DNS service we use also have a IP based filter chain feature but are priced around $22 per domain per month as add-on.
At the end, we built a anycast based solution that was very painful to setup but works fine now and can use a single A record that works across the world. We had a get a ASN, a /24 block and hell lot of back n forth with a government run org to set it up.
A "hosted" scriptable DNS server which takes the location as input and output IP of nearest edge server as output is the exact thing I needed. So yes there is definitely a niche market for it.
I still have to explore and see how closely bunnydns is able to get the source IP/location (tricky) and how does health check etc could work but definitely something I would explore and consider.
Re: Bunny DNS – A scriptable DNS platform
#56Earlier quoted context omitted.
Now I'm curious. Do you have a link for the geo-ip unreliability by any chance?
geo-ip has never returned the correct state for me (across 3 different ISPs). The automatic Timezone detection on phones also rarely works correctly here. So I can easily believe that it’s wildly inaccurate for a significant amount of the world.
Depending on the purpose you're using it for I'm just wondering about the accuracy level for sake of "good enough" uses.
Re: Bunny DNS – A scriptable DNS platform
#57Earlier quoted context omitted.
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.m…
> to block pm.me or to handle it like a throwaway address
How is a pm.me address more throwaway than a GMail one? I would say it's the other way around, especially considering that many ProtonMail users pay for their email service, so it's more likely to be a real user behind the address.
Re: Bunny DNS – A scriptable DNS platform
#58Earlier quoted context omitted.
>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?
One of these was Hugo(written in go, which is pretty young ecosystem, I'm not very familiar with). Everything was pretty straight forward.
Other one was Gatsby v4 (seems like pretty mature JS project). Oh boy.
Docs suggest multiple ways to initialize new project, depending which page you open and without clear explanation of the difference. NPM will download ungodly amount of dependencies and then inform you happily, that you have 16 critical vulnerabilities. Plugins tend to create dependency hell.
In general each time I try to do something with JS I end up debugging issues that require some arcane knowledge, filtering outdated docs and dealing with general flakiness of everything.
While I get, that on frontend it might be hard to avoid, I don't get why someone does it to themselves, when having other options (purely subjective opinion - I spend most time on backend, so I'm probably biased).
Re: Bunny DNS – A scriptable DNS platform
#59This is very clever, and something I wished existed inside of AWS/Route53. It would greatly simplify some of the work needed for redundancy/resilience. Something similar as a locally-deployable "unbound/dnsmasq style" component would be neat as well.
Re: Bunny DNS – A scriptable DNS platform
#60We serve thousands of custom domains for our SaaS customers. The end users of these domains are globally distributed and served from 14 different data centre locations across the world. To do the geo IP matching we tried a lot of things, third party services etc but couldn't find one that works well and are priced well. For example, the hosted DNS service we use also have a IP based filter chain feature but are price…