EndpointDNS
EndpointDNS
EndpointDNS is a developer-focused DNS hosting service built on a modern, distributed architecture. It uses an API-centric model where a central controller communicates with multiple remote name servers to manage and serve DNS records, ensuring high availability and efficient synchronization.
💡 Since my domain is hosted at Namecheap, I needed to configure glue records for the custom name servers so they could be properly resolved.
System Architecture
The platform is divided into two main parts:
-
PHP web application
Serves as the user-facing panel and initial API gateway. -
Go DNS controller
A high-performance core service that manages DNS records, synchronization, and communication with remote name servers.
The actual DNS queries are handled by multiple, geographically distributed name servers, also written in Go.
The Controller: Central Authority
The controller is the brain of the EndpointDNS system. It is the single source of truth, responsible for managing the state of the entire network.
-
API Gateway
Exposes a RESTful API (e.g.,/v1/...). All requests, whether from the PHP panel or user scripts, pass through this gateway. -
Business Logic
Validates API keys, checks subscription plan limits (domains, API calls), and logs usage. -
Database Interaction
Directly manages the MySQL database, which stores accounts, domains, DNS records, and plan information. -
Synchronization Hub
Keeps all remote name servers updated and consistent.
Remote Name Servers: Edge Responders
The name servers are lightweight Go applications designed to answer DNS queries with maximum speed.
-
In-Memory Zones
All zones and records are loaded into memory for instant lookups. -
Management API
Each server exposes a private HTTP API (on port8053) for updates and health checks, secured with unique keys. -
State Persistence
Zone data is cached to disk, allowing immediate recovery after a restart.
Communication & Synchronization
The system is entirely API-driven:
-
User Request
A user creates a DNS record via the PHP panel → forwarded to the Go controller. -
Controller Validation
The request is authenticated and checked against plan limits. -
Database Update
The record is saved to the central MySQL database. -
Fan-Out Sync
The controller sends updates concurrently to all active name servers. -
Name Server Update
Each server updates its in-memory zone and persists it to disk.
Full Sync for Consistency
When bringing a new server online or performing maintenance:
- The controller queries all records from the master database.
- It rebuilds the target name server’s zones by re-sending the complete dataset.
This ensures that the central database remains the ultimate source of truth, while distributed name servers provide fast, resilient, and globally consistent DNS resolution.
Like What You See?
I'm available for similar projects. Let's discuss how I can help you achieve your goals.
View My Services