Note:

Implement High Availability on BIND9 Domain Name System in Oracle Cloud Infrastructure

Introduction

OraStage is a leading company in the energy sector, specializing in renewable energy solutions and innovative power technologies, the company announced a strategic decision to migrate its workloads to Oracle Cloud Infrastructure (OCI) to enhance performance, scalability, and security.

image

Taking into account the specific needs and conditions that OraStage has outlined, the company requires a hybrid Domain Name System (DNS). Solution in the cloud, and by hybrid here means to use their own Berkeley Internet Name Domain version 9 (BIND9) DNS system in addition to OCI DNS service, where the final architecture they are looking to build is shown in the following image.

image

OraStage DNS requirements:

This tutorial series will guide you step by step to achieve the outlined requirements above, building the entire solution from scratch. You can easily navigate to each tutorial from the list below:

Overview

Today a reliable and efficient DNS infrastructure is crucial for ensuring seamless network operations. In the first tutorial: Configure BIND9 Domain Name System in Oracle Cloud Infrastructure, we already explained how BIND9, one of the most widely used DNS software, that provides robust features and flexibility to manage DNS services, can be deployed and used in OCI. While a single BIND9 server can handle DNS requests effectively, adding a second BIND9 server offers numerous advantages that enhance the overall performance and reliability of your network.

This tutorial will guide you through the process of setting up a secondary BIND9 server and a load balancer in OCI, highlighting the benefits of this configuration. By implementing this, you will achieve:

OCI Network Load Balancer

An OCI Flexible Network Load Balancer (NLB) is a service that helps distribute incoming traffic across multiple backend resources. This is particularly useful for managing high traffic volumes and ensuring that applications remain available and responsive even if one or more servers fail.

The OCI Network Load Balancer operates at Layer 3 and Layer 4 of the Open Systems Interconnection (OSI) model, handling protocols like Transmission Control Protocol (TCP), User Datagram Protocol (UDP), and Internet Control Message Protocol (ICMP). By balancing the load efficiently, it can enhance application performance, provide high availability, and improve the overall scalability of the system. The service also offers features such as health checks to monitor the status of backend servers, ensuring that traffic is only directed to healthy and operational instances.

In summary, an OCI Network Load Balancer plays a key role in maintaining the reliability and scalability of applications by intelligently distributing network traffic across multiple resources. Due to all of the benefits we mentioned we will add a network load balancer to our set up to optimize our DNS solution.

Objectives

Final Architecture

image

Prerequisites

Task 1: Provision Secondary-DNS Instance and Configure BIND9

Refer to the first tutorial: Configure BIND9 Domain Name System in Oracle Cloud Infrastructure, where Task 2 and Task 3 shows the creation and configuration of Primary-DNS instance, same tasks should be done to configure Secondary-DNS, consider the following information:

At the end of this task, the architecture should look like this:

image

Task 2: Configure an OCI Network Load Balancer

Task 2.1: Add Details

Task 2.2: Configure a Listener

A listener is an essential component in a load balancer that is responsible for receiving specific type of traffic with certain ports (for example, TCP/port 80, UDP/port 21) and direct it to backend servers. In this tutorial, we want the listener to listen on port 53 (TCP) and (UDP), as DNS use both of them.

Task 2.3: Choose a Backend Set

A backend set is a logical grouping of backend servers that the network load balancer routes traffic to. Our backend servers here will be Primary-DNS and Secondary-DNS.

Task 2.4: Review and Create

Task 2.5: Add a Security Rule

To avoid the failure of the health check and to ensure smooth communication without any traffic disruption.

Task 3: Configure OCI DNS Forwarding Rules

Task 3.1: Configure Frontend-VCN Forwarding Rule

Task 3.2: Configure Backend-VCN Forwarding Rule

Task 4: Test and Validate

Prerequisite

Now all the ingress and egress traffic for this subnet will be logged.

Test Scenario 1: Primary-DNS Responds to FE-VM Queries when Secondary-DNS is Down

In the event of a failure in the Secondary-DNS, we need to ensure that the Primary-DNS responds to queries coming from FE-VM, since the DNS-NLB is directing traffic to it.

Test Scenario 2: Secondary-DNS Responds to FE-VM Queries when Primary-DNS is Down

In the event of a failure in the Primary-DNS, we need to ensure that the Secondary-DNS responds to queries coming from FE-VM, since the DNS-NLB is directing traffic to it.

Test Scenario 3: Primary-DNS Responds to BE-VM Queries when Secondary-DNS is Down

In the event of a failure in the Secondary-DNS, we need to ensure that the Primary-DNS responds to queries coming from BE-VM, since the DNS-NLB is directing traffic to it.

Test Scenario 4: Secondary-DNS Responds to BE-VM Queries when Primary-DNS is Down

In the event of a failure in the Primary-DNS, we need to ensure that the Secondary-DNS responds to queries coming from BE-VM, since the DNS-NLB is directing traffic to it.

Next Steps

In this tutorial, we enhanced a simple client-server BIND9 DNS set up in OCI by integrating an OCI Network Load Balancer and a secondary DNS server to ensure continuous service availability in the event of a primary server failure.

So far, we have developed a high-performance and reliable DNS architecture specifically for handling orastage.com domain queries. However, OraStage company has a requirement to also resolve OCI native domain names, such as oraclevcn.com and oraclecloud.com, and for that, additional steps are necessary. In the next tutorial, Use OCI DNS to Resolve Native Domains, we will demonstrate how to achieve this configuration.

Acknowledgments

More Learning Resources

Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

For product documentation, visit Oracle Help Center.