DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Low-Code Development: Leverage low and no code to streamline your workflow so that you can focus on higher priorities.

DZone Security Research: Tell us your top security strategies in 2024, influence our research, and enter for a chance to win $!

Launch your software development career: Dive head first into the SDLC and learn how to build high-quality software and teams.

Open Source Migration Practices and Patterns: Explore key traits of migrating open-source software and its impact on software development.

Related

  • Capturing Acknowledgement in Kafka Streaming With RecordMetadata
  • How To Fix Kafka Consumers Due To Corrupted Log Files or Missing Log Files
  • Level up Your Streaming Skills: A Comprehensive Introduction to Redpanda for Developers
  • Unlocking the Potential of IoT Applications With Real-Time Alerting Using Apache Kafka Data Streams and KSQL

Trending

  • How To Plan a (Successful) MuleSoft VPN Migration (Part II)
  • Benchmarking Java Streams
  • GBase 8a Implementation Guide: Performance Optimization
  • Leveraging Test Containers With Docker for Efficient Unit Testing
  1. DZone
  2. Data Engineering
  3. Big Data
  4. Private DNS Zone With Azure HDInsight Kafka

Private DNS Zone With Azure HDInsight Kafka

This article presents a comprehensive guide to integrating Azure Private DNS with HDInsight Kafka Cluster.

By 
Prakashkumar Patel user avatar
Prakashkumar Patel
·
Apr. 11, 23 · Tutorial
Like (1)
Save
Tweet
Share
3.8K Views

Join the DZone community and get the full member experience.

Join For Free

What Is HDInsight Kafka?

Azure HDInsight Kafka is a cloud-based, managed Apache Kafka service offered by Microsoft Azure. Apache Kafka is an open-source, distributed streaming platform that allows for the processing and analyzing of high-volume, real-time data streams.

Azure HDInsight Kafka provides a fully managed and scalable environment for deploying and running Apache Kafka clusters, allowing users to easily create, configure, and manage Kafka topics, producers, and consumers. It also provides integration with other Azure services, such as Azure Data Lake Storage, Azure Event Hubs, and Azure Stream Analytics, enabling users to ingest, process, and analyze large volumes of data in real-time.

With Azure HDInsight Kafka, users can leverage the benefits of Apache Kafka without the hassle of managing the underlying infrastructure, allowing them to focus on building real-time data pipelines and applications to support their business needs.

HDInsight Architecture

The following diagram shows a typical Kafka configuration that uses consumer groups, partitioning, and replication to offer a parallel reading of events with fault tolerance:

typical Kafka configuration

Challenge

The Azure DNS Private Zone auto registration feature provides DNS record management for virtual machines deployed in a virtual network. When you link a virtual network with a private DNS zone and enable auto registration for all the virtual machines, the DNS records for the virtual machines deployed in the virtual network are automatically created in the private DNS zone.

However, the Azure HDInsght Kafka cluster created under your Virtual New broker doesn't get auto-linked to the Private DNS attached to the virtual network. So, if you would like to call the Kafka broker, you can not do it. Kafka Broker information is very important — clients need to pass to Kafka broker names to connect with the Kafka cluster.

Virtual Network

Most of the time, customers use the default broker names provided by Azure (provided by Ambari UI)  and connect with the cluster. This works perfectly fine for most customers. However, enterprise customers want to use Private DNS records for calling every object they have in their network. These allow enterprise customers to call resources among multiple networks with ease.

Subscription

Solution

Follow the below steps to integrate the private DNS zone with HDInsight Kafka:

  1. Enable the auto registration of the foundation level DNS e.g local.company.net for the HDInsight VNET — Click here for more info.
  2. Using Ambari UI or API — Update Kafka-env template to set the Kafka listener property with DNS local.company.net

    #Configure Kafka to advertise host name based on Private DNS Zone
    HOST_NAME=$(hostname) + '.local.company.net' 
    echo advertised.listeners=$HOST_NAME sed -i.bak -e '/advertised/{/advertised@/!d;}' /usr/hdp/current/kafka-broker/conf/server.properties 
    echo "advertised.listeners=PLAINTEXT://$HOST_NAME:9092" >> /usr/hdp/current/kafka-broker/conf/server.properties 

Benefits

Azure Private DNS integration with HDInsight Kafka provides the following benefits:

  • Removes the need for custom DNS solutions. Many customers created custom DNS solutions to manage DNS zones in their virtual network. You can now manage DNS zones using the native Azure infrastructure, which removes the burden of creating and managing custom DNS solutions.
  • Automatic hostname record management. Along with hosting your custom DNS records, Azure automatically maintains hostname records for the Kafka brokers in the specified virtual networks. In this scenario, you can optimize the Broker names you use without needing to create custom DNS solutions or modify applications.
  • Hostname resolution between virtual networks. Unlike Azure-provided default Kafka Broker names, private DNS zones can be shared between virtual networks. This capability simplifies cross-network and service-discovery scenarios, such as virtual network peering. Kafka clusters can easily discover among virtual networks.
  • Split-horizon DNS support. With Azure DNS, you can create zones with the same name that resolve to different answers from within a virtual network and the public internet. A typical scenario for split-horizon DNS is to provide a dedicated version of a service for use inside your virtual network.
Domain Name System azure kafka Data stream

Opinions expressed by DZone contributors are their own.

Related

  • Capturing Acknowledgement in Kafka Streaming With RecordMetadata
  • How To Fix Kafka Consumers Due To Corrupted Log Files or Missing Log Files
  • Level up Your Streaming Skills: A Comprehensive Introduction to Redpanda for Developers
  • Unlocking the Potential of IoT Applications With Real-Time Alerting Using Apache Kafka Data Streams and KSQL

Partner Resources


Comments

ABOUT US

  • About DZone
  • Send feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: