Technology1 min read

Scriptable GeoDNS: Leaving AWS for Bunny

By · Published by Everything Blog

In short

Bernat abandoned an AWS stack consisting of CloudFront and Route 53, which accumulated routine fees for queries, hosted zones, health checks, and encryption keys. By adopting Bunny.net, he leveraged custom JavaScript execution directly on DNS lookups to steer visitors toward the two closest servers among seven global NixOS nodes. The migration also included shifting asset delivery to Bunny's content network to separately cache optimized AVIF and WebP images without saving user access logs. Although the move successfully eliminated Route 53 expenses, the new CDN configuration currently lacks support for the modern HTTP/3 standard.

Key points

  • Scriptable DNS allows developers to compute dynamic routing responses and establish autom…: Scriptable DNS allows developers to compute dynamic routing responses and establish automatic fallback pairs without costly proprietary cloud setups.
  • Moving to Bunny.net reduces operational expenditures while supporting modern asset cachin…: Moving to Bunny.net reduces operational expenditures while supporting modern asset caching and privacy-friendly zero-logging configurations.
  • Adopting Bunny.net's content delivery network currently requires trading away HTTP/3 capa…: Adopting Bunny.net's content delivery network currently requires trading away HTTP/3 capabilities until the provider finishes active development.

Sources checked by our analysis pipeline: 1

Vincent Bernat

To optimize the performance metrics of this blog, I relied on Amazon CloudFront to serve the assets,1 and Route 53 for the geo-aware DNS2 to direct readers to the closest host serving the content. But Route 53 is expensive: US$0.50 per zone per month, US$0.70 per million geolocation queries, and US$0.75 per healthcheck per month[1], plus US$1 per month for the KMS key[2] needed to sign zones with DNSSEC. When I discovered that Bunny DNS is almost free[3] for up to 500 domains and features scriptable answers, I made the jump! Plus, it’s a European company based in Slovenia.

Bunny CDN#

Bunny.net[4] started as BunnyCDN in 2015[5]. They added IPv6

support in 2017[6]. Switching was uneventful. I don’t bring a custom domain: I

serve the content from the b-cdn.

domain. As I depend on content

negotiation to serve AVIF and WebP images[7], I configure the CDN to cache

each image format separately[8].

I disable logging[9] to avoid collecting personal information. While the bunny.net GDPR page[10] promises they anonymize data, it is unclear what CloudFront keeps in its own…

Technology