Vincent Bernat 将其个人博客的 DNS 和 CDN 服务从 AWS Route 53 和 CloudFront 迁移至 Bunny.net,旨在显著削减运营开支。1 此次迁移使得其月度 DNS 相关费用从原先在 AWS Route 53 上的约 5 美元降至目前的 1 美元。1 为实现这一成本优化并提升全球访问性能,Bernat 利用了 Bunny DNS 支持运行用户提供的 JavaScript 脚本以动态计算 DNS 响应的“Scriptable GeoDNS”特性,并在全球部署了由 Paris、Nuremberg、Ashburn、Singapore、San Jose、São Paulo 和 Sydney 七个节点组成的 NixOS 虚拟机集群。1
在具体技术实施层面,由于 Chrome 浏览器对 HTTPS DNS 记录支持的局限性以及 Bunny 当前功能的缺失,Bernat 采用了一种混合路由策略:当多个服务器距离相近时返回两个最近服务器的 IP,而当距离差异较大时仅返回最近服务器并设置较短 TTL(2分钟)。1 此外,针对 Bunny DNS 暂不支持发布 DS 记录的问题,他将 acme. 子域托管在 deSEC 上以处理 DNSSEC。1 对于 ACME DNS-01 挑战,他使用自建的基于 Rust 语言开发的 Hickory DNS 服务器进行处理,该服务器具备自动 DNSSEC 签名和动态更新能力。1 尽管 Bunny CDN 目前尚缺乏 HTTP/3 支持,但官方已表示该功能正在开发中。1
Vincent Bernat has transitioned his personal blog’s DNS and CDN services from Amazon Web Services (AWS) Route 53 and CloudFront to Bunny.net, a move primarily driven by the goal of significantly reducing operational costs 1. The migration resulted in a decrease in monthly expenses from approximately $5 on AWS to just $1 with the new provider 1. By leveraging Bunny DNS’s ability to execute user-provided JavaScript scripts, Bernat implemented a scriptable geolocation-based routing system that dynamically calculates DNS responses based on visitor location 1.
To optimize global access performance, the infrastructure relies on a cluster of seven NixOS virtual machine nodes located in Paris, Nuremberg, Ashburn, Singapore, San Jose, São Paulo, and Sydney 1. Due to limitations in Chrome’s support for HTTPS DNS records and current feature gaps in Bunny’s platform, Bernat adopted a hybrid strategy: when multiple servers are equidistant, the system returns two nearby IP addresses; however, if one server is significantly closer, it returns only that address with a short Time-To-Live (TTL) of two minutes 1. Additionally, because Bunny DNS does not currently support publishing DS records required for DNSSEC, the author hosted the acme. subdomain on deSEC to handle this aspect of security 1.
Bernat also replaced certain AWS functionalities with a self-hosted Hickory DNS server written in Rust to process ACME certificate validation challenges, which supports automatic DNSSEC signing and dynamic updates 1. While Bunny CDN lacks HTTP/3 support at present, official sources indicate that this feature is under development 1.
评论
还没有评论,欢迎留下第一条。