Back to Product Features

DNS Smart Routing | NOC.org Support

DNS Smart Routing is a NOC feature that intelligently directs DNS queries to the most appropriate server based on real-time health checks, server load, and routing policies. Instead of relying on static DNS records that point to a single server, smart routing continuously evaluates your infrastructure and routes traffic to healthy, available endpoints.

How DNS Smart Routing Works

Traditional DNS returns the same IP address for every query regardless of server status. If that server goes down, visitors see errors until someone manually updates the DNS record. DNS smart routing eliminates this problem by making DNS responses dynamic.

When a visitor queries your domain, NOC's DNS infrastructure evaluates all configured endpoints in real time. It considers health check results, routing policies you have defined, and current server conditions before returning the optimal IP address in the DNS response. This happens transparently — visitors simply receive the IP of the best available server.

Health Checks

Health checks are the foundation of smart routing. NOC continuously monitors your origin servers and endpoints to determine their availability and responsiveness:

  • HTTP/HTTPS checks: NOC sends requests to a specified URL on your server and verifies the response code (e.g., 200 OK). You can configure the expected status code, response body content, and timeout thresholds.
  • TCP checks: For non-HTTP services, NOC can verify that a TCP port is accepting connections.
  • Check intervals: Health checks run at configurable intervals (e.g., every 30 seconds, every 60 seconds). Shorter intervals detect failures faster but generate more monitoring traffic.
  • Check locations: Health checks are performed from multiple geographic locations to avoid false positives caused by localized network issues.

When a health check fails for a configured number of consecutive attempts, that endpoint is marked as unhealthy and removed from the DNS response pool. When it recovers and passes consecutive checks, it is added back automatically.

Failover

DNS smart routing enables automatic failover between primary and backup servers. You can configure failover behavior in several ways:

  • Active-passive failover: Traffic is sent to your primary server. If health checks detect the primary is down, DNS responses automatically switch to your secondary (backup) server. When the primary recovers, traffic returns to it.
  • Active-active failover: Traffic is distributed across multiple servers. If one server fails, the remaining healthy servers absorb the traffic. This provides both load distribution and redundancy.
  • Priority-based failover: Assign priority levels to each endpoint. Traffic goes to the highest-priority healthy endpoint. If it fails, traffic shifts to the next priority level.

Failover transitions depend on DNS TTL (time to live). NOC uses low TTL values for smart-routed records to ensure failover propagates quickly, typically within 30 to 60 seconds.

Load Balancing Policies

Beyond basic failover, DNS smart routing supports several load balancing strategies:

  • Round-robin: DNS responses rotate through all healthy endpoints evenly. Each query returns a different IP address from the pool.
  • Weighted routing: Assign weights to each endpoint to control traffic distribution. For example, send 70% of traffic to your primary server and 30% to a secondary server.
  • Least connections: Direct traffic to the server currently handling the fewest active connections, balancing load based on real-time demand.

Configuration

DNS smart routing is configured through the NOC dashboard or the REST API. To set up smart routing for your domain:

  1. Add your origin server IP addresses or hostnames as endpoints in the NOC dashboard.
  2. Configure health checks for each endpoint, specifying the check type (HTTP, HTTPS, or TCP), URL path, expected response, and check interval.
  3. Select your routing policy (failover, round-robin, weighted, or least connections).
  4. Set the DNS TTL for smart-routed records. Lower TTL values enable faster failover but increase DNS query volume.
  5. Enable the smart routing policy for the relevant DNS records.

Use Cases

  • Multi-server redundancy: Automatically fail over to a backup server when your primary goes down, minimizing downtime.
  • Blue-green deployments: Use weighted routing to gradually shift traffic from an old deployment to a new one.
  • Multi-cloud resilience: Distribute traffic across servers hosted on different cloud providers (AWS, GCP, Azure) to avoid single-provider outages.
  • Maintenance windows: Temporarily remove a server from rotation for maintenance without updating DNS records manually.

For geographic-based routing that directs visitors to servers in their region, see DNS Proximity Routing.

Improve Your Websites Speed and Security

14 days free trial. No credit card required.