Multithread DNS Name Resolution Engine


Project Overview

This project is a multi-thread application that resolves domain names to IP addresses, similar to the operation performed each time a new website is accessed in a web browser. It’s composed of two sub-systems, each with one thread pool: requesters and resolvers. The sub-systems communicate with each other using a bounded queue.

This type of system architecture is the Producer-Consumer architecture. It’s used in search engine systems, like Google. In these systems, a set of crawler threads place URLs onto a queue. The queue is then serviced by a set of indexer threads, which connect to the websites, parse the content, and then add an entry to a search index.

This program processes a number of files containing a list of hostnames using requester threads to process each file. Each requester thread reads every line of the file, parses the hostname, places the name into a shared data area (a queue), and records the processing in a file. It also creates a number of resolver threads that take the names from the shared data area, finds the IP address for that host name, and writes the results to a file. Once all the files have been processed, the requestor threads terminate. Once all the names have been processed, the resolver threads terminate and the program exits.

Project Repo: https://github.com/Novota15/Multithread-DNS-Name-Resolution-Engine

Top