<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Pankaj Thapaliya]]></title><description><![CDATA[Software Engineer with 4+ years of experience working on full-stack development (backend leaning). 

Building and maintaining platforms which is being used by recognized OEMs like TVS Motors, Royal Enfield and Force Motors which includes processing of high volume of time series data, complex dashboards. 

Current Tech Stack: NodeJS, Angular, MongoDB, SQLite, AWS]]></description><link>https://blogs.pank.cloud</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 01:22:46 GMT</lastBuildDate><atom:link href="https://blogs.pank.cloud/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Arrow Functions in JavaScript: A Simpler Way to Write Functions]]></title><description><![CDATA[new content is being added :D]]></description><link>https://blogs.pank.cloud/arrow-functions-in-javascript-a-simpler-way-to-write-functions</link><guid isPermaLink="true">https://blogs.pank.cloud/arrow-functions-in-javascript-a-simpler-way-to-write-functions</guid><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Sat, 14 Mar 2026 19:28:10 GMT</pubDate><content:encoded><![CDATA[<p>new content is being added :D</p>
]]></content:encoded></item><item><title><![CDATA[Understanding Objects in JavaScript]]></title><description><![CDATA[content being added soon. Please wait :D]]></description><link>https://blogs.pank.cloud/understanding-objects-in-javascript</link><guid isPermaLink="true">https://blogs.pank.cloud/understanding-objects-in-javascript</guid><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Sat, 14 Mar 2026 19:27:34 GMT</pubDate><content:encoded><![CDATA[<p>content being added soon. Please wait :D</p>
]]></content:encoded></item><item><title><![CDATA[Understanding Object-Oriented Programming in JavaScript]]></title><description><![CDATA[Content is being updated. Please wait :D]]></description><link>https://blogs.pank.cloud/understanding-object-oriented-programming-in-javascript</link><guid isPermaLink="true">https://blogs.pank.cloud/understanding-object-oriented-programming-in-javascript</guid><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Sat, 14 Mar 2026 19:26:58 GMT</pubDate><content:encoded><![CDATA[<p>Content is being updated. Please wait :D</p>
]]></content:encoded></item><item><title><![CDATA[JavaScript Arrays 101]]></title><description><![CDATA[Content is being updated. Please wait :D]]></description><link>https://blogs.pank.cloud/javascript-arrays-101</link><guid isPermaLink="true">https://blogs.pank.cloud/javascript-arrays-101</guid><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Sat, 14 Mar 2026 19:26:21 GMT</pubDate><content:encoded><![CDATA[<p>Content is being updated. Please wait :D</p>
]]></content:encoded></item><item><title><![CDATA[Function Declaration vs Function Expression: What’s the Difference?]]></title><description><![CDATA[Draft being updated. Please wait :D]]></description><link>https://blogs.pank.cloud/function-declaration-vs-function-expression-what-s-the-difference</link><guid isPermaLink="true">https://blogs.pank.cloud/function-declaration-vs-function-expression-what-s-the-difference</guid><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Sat, 14 Mar 2026 19:25:32 GMT</pubDate><content:encoded><![CDATA[<p>Draft being updated. Please wait :D</p>
]]></content:encoded></item><item><title><![CDATA[The Magic of this, call(), apply(), and bind() in JavaScript]]></title><description><![CDATA[Draft is being updated. Please wait a while :D]]></description><link>https://blogs.pank.cloud/the-magic-of-this-call-apply-and-bind-in-javascript</link><guid isPermaLink="true">https://blogs.pank.cloud/the-magic-of-this-call-apply-and-bind-in-javascript</guid><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Sat, 14 Mar 2026 19:24:55 GMT</pubDate><content:encoded><![CDATA[<p>Draft is being updated. Please wait a while :D</p>
]]></content:encoded></item><item><title><![CDATA[Basic JavaScript Operators]]></title><description><![CDATA[content is being added. Draft is being updated :D]]></description><link>https://blogs.pank.cloud/basic-javascript-operators</link><guid isPermaLink="true">https://blogs.pank.cloud/basic-javascript-operators</guid><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Sat, 14 Mar 2026 19:23:57 GMT</pubDate><content:encoded><![CDATA[<p>content is being added. Draft is being updated :D</p>
]]></content:encoded></item><item><title><![CDATA[Array Methods In JavaScript ]]></title><description><![CDATA[Array And JavaScript
In real life, data rarely exists only in a primitive data type as a single value. It is manged with different types of data structures. An array is one of the most common data str]]></description><link>https://blogs.pank.cloud/array-methods-in-javascript</link><guid isPermaLink="true">https://blogs.pank.cloud/array-methods-in-javascript</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[array methods]]></category><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Mon, 09 Mar 2026 18:28:37 GMT</pubDate><content:encoded><![CDATA[<h2>Array And JavaScript</h2>
<p>In real life, data rarely exists only in a primitive data type as a single value. It is manged with different types of data structures. An array is one of the most common data structure used in any programming language.</p>
<blockquote>
<p>An array is an ordered collection of values (mostly of same data type but variable in JavaScript) stored in a single variable. Each value is stored at a specific position called an index.</p>
</blockquote>
<p>In JavaScript ecosystem, Array is heavily used not only to store data but also to develop UI with libraries like React.</p>
<p>Some of the common use cases of array are:</p>
<ul>
<li><p>Sharing data as API response</p>
</li>
<li><p>Managing and developing UI in libraries like React</p>
</li>
<li><p>Database records in backend systems</p>
</li>
<li><p>Handling collections of objects</p>
</li>
</ul>
<p>Let's understand it and it's methods by using a real life example of a college library system. A college library system, for example, does not manage just one book. It manages thousands of books, each with details such as title, author, number of copies, and availability.</p>
<p>A example of such can look like following:</p>
<p>(Here we are storing array of objects. Each object contains data related to a book)</p>
<pre><code class="language-javascript">const libraryBooks = [
  { id: 1, title: "Introduction to Algorithms", author: "Thomas Cormen", copies: 4, issued: 2 },
  { id: 2, title: "Clean Code", author: "Robert Martin", copies: 3, issued: 1 },
  { id: 3, title: "JavaScript: The Good Parts", author: "Douglas Crockford", copies: 2, issued: 2 }
]
</code></pre>
<hr />
<h2>Array Operations In JavaScript</h2>
<p>Let's consider a</p>
<p>Array operations can be categorized in following:</p>
<ul>
<li><p>Insertion (push, unshift)</p>
</li>
<li><p>Deletion (pop, shift)</p>
</li>
<li><p>Transformation (map, filter)</p>
</li>
<li><p>Validations (forEach)</p>
</li>
<li><p>Generating new data (reduce)</p>
</li>
</ul>
<p>Let's dive into each each one of them:</p>
<h3>Insertion Methods (Push, unshift)</h3>
<blockquote>
<p>NOTE: Both of the methods will modify the original array</p>
</blockquote>
<p>Insertion methods add new elements to an array. In a library system, this might represent adding new books to the database.</p>
<p>For reference, considering an array of strings, containing name of books can look like following:</p>
<pre><code class="language-javascript">const books = [
  "Clean Code",
  "JavaScript: The Good Parts"
]
</code></pre>
<h4>Push()</h4>
<p><code>push()</code> adds a new element to the end of an array. Imagine the library receives a new book.</p>
<p>Adding a new book to the catalog:</p>
<pre><code class="language-javascript">books.push("Design Patterns");
</code></pre>
<p>New array will now look like:</p>
<pre><code class="language-js">[
  "Clean Code",
  "JavaScript: The Good Parts",
  "Design Patterns"
]
</code></pre>
<h4>unshift()</h4>
<p><code>unshift()</code> adds a new element at the beginning of an array. Suppose the librarian wants to prioritize newly donated books at the start of the list.</p>
<p>Adding a new book in first position of books array:</p>
<pre><code class="language-javascript">books.unshift("Introduction to Algorithms")
</code></pre>
<p>New array will now look like:</p>
<pre><code class="language-js">[
  "Introduction to Algorithms",
  "Clean Code",
  "JavaScript: The Good Parts",
  "Design Patterns"
]
</code></pre>
<hr />
<h3>Deletion Methods (pop, shift)</h3>
<blockquote>
<p>NOTE: Both of the methods will modify the original array</p>
</blockquote>
<h4>pop</h4>
<p><code>pop()</code> removes the last element from an array.</p>
<p>For reference, considering an array of strings, containing name of books can look like following:</p>
<pre><code class="language-js">const books = [
  "Introduction to Algorithms",
  "Clean Code",
  "Design Patterns"
]
</code></pre>
<p>Removing last book from the books array:</p>
<pre><code class="language-js">books.pop()
</code></pre>
<p>Now, the books array will look like:</p>
<pre><code class="language-js">[
  "Introduction to Algorithms",
  "Clean Code"
]
</code></pre>
<h4>shfit</h4>
<p><code>shift()</code> removes the first element from an array.</p>
<p>Suppose the library removes an outdated book from the start of the catalog.</p>
<p>Removing first book from the books array:</p>
<pre><code class="language-javascript">books.shift()
</code></pre>
<p>The books array will now look like:</p>
<pre><code class="language-javascript">[
  "JavaScript: The Good Parts"
]
</code></pre>
<hr />
<h3>Transformation Methods</h3>
]]></content:encoded></item><item><title><![CDATA[Emmet for HTML: A Beginner’s Guide to Writing Faster Markup]]></title><description><![CDATA[content coming soon…]]></description><link>https://blogs.pank.cloud/emmet-for-html-a-beginners-guide-to-writing-faster-markup</link><guid isPermaLink="true">https://blogs.pank.cloud/emmet-for-html-a-beginners-guide-to-writing-faster-markup</guid><category><![CDATA[HTML5]]></category><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Tue, 27 Jan 2026 18:30:00 GMT</pubDate><content:encoded><![CDATA[<p>content coming soon…</p>
]]></content:encoded></item><item><title><![CDATA[Understanding HTML Tags and Elements]]></title><description><![CDATA[content coming soon…]]></description><link>https://blogs.pank.cloud/understanding-html-tags-and-elements</link><guid isPermaLink="true">https://blogs.pank.cloud/understanding-html-tags-and-elements</guid><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Sun, 25 Jan 2026 18:30:00 GMT</pubDate><content:encoded><![CDATA[<p>content coming soon…</p>
]]></content:encoded></item><item><title><![CDATA[CSS Selectors 101: Targeting Elements with Precision]]></title><description><![CDATA[content coming soon…]]></description><link>https://blogs.pank.cloud/css-selectors-101-targeting-elements-with-precision</link><guid isPermaLink="true">https://blogs.pank.cloud/css-selectors-101-targeting-elements-with-precision</guid><category><![CDATA[CSS]]></category><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Sun, 25 Jan 2026 18:30:00 GMT</pubDate><content:encoded><![CDATA[<p>content coming soon…</p>
]]></content:encoded></item><item><title><![CDATA[TCP Working: 3-Way Handshake & Reliable Communication]]></title><description><![CDATA[content being added..]]></description><link>https://blogs.pank.cloud/tcp-working-3-way-handshake-and-reliable-communication</link><guid isPermaLink="true">https://blogs.pank.cloud/tcp-working-3-way-handshake-and-reliable-communication</guid><category><![CDATA[networking]]></category><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Sat, 24 Jan 2026 18:30:00 GMT</pubDate><content:encoded><![CDATA[<p>content being added..</p>
]]></content:encoded></item><item><title><![CDATA[How a Browser Works: A Beginner-Friendly Guide to Browser Internals]]></title><description><![CDATA[content coming soon…]]></description><link>https://blogs.pank.cloud/how-a-browser-works-a-beginner-friendly-guide-to-browser-internals</link><guid isPermaLink="true">https://blogs.pank.cloud/how-a-browser-works-a-beginner-friendly-guide-to-browser-internals</guid><category><![CDATA[internt]]></category><category><![CDATA[Browsers]]></category><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Sat, 24 Jan 2026 18:30:00 GMT</pubDate><content:encoded><![CDATA[<p>content coming soon…</p>
]]></content:encoded></item><item><title><![CDATA[How DNS Resolution Works]]></title><description><![CDATA[What Is DNS And How It Works
DNS stands for Domain Name System. Without this, we can’t access anything in internet. Let’s understand what it really does and concepts related to this technology.
Often times, we don’t remember contact number of people....]]></description><link>https://blogs.pank.cloud/how-dns-resolution-works</link><guid isPermaLink="true">https://blogs.pank.cloud/how-dns-resolution-works</guid><category><![CDATA[dns]]></category><category><![CDATA[dns resolver]]></category><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Fri, 23 Jan 2026 18:30:00 GMT</pubDate><content:encoded><![CDATA[<h2 id="heading-what-is-dns-and-how-it-works">What Is DNS And How It Works</h2>
<p>DNS stands for Domain Name System. Without this, we can’t access anything in internet. Let’s understand what it really does and concepts related to this technology.</p>
<p>Often times, we don’t remember contact number of people. When we want to calls someone, we would search their name in our contact list then we will call them. Here, by utilizing contact list of multiple people with their name and number, we are solving the complexity of having to remember number of people which is hard for us as compared to remembering their name.</p>
<p>Just like a phone number belongs to only one person and the phone number becomes point of contact to the person, websites also have an unique IP address through which we can access them through the internet. IP address is the point of contact for us to access the websites. But you may wonder that you never see IP address when you enter a website name.</p>
<blockquote>
<p>Just like how a contact list in our phone has ability to get number of person by searching their name, DNS helps us find the IP address of the website using domain names.</p>
<p>Unlike a contact list sitting on our phone, DNS is a global service which is responsible for finding IP address of all the websites. This process look up process is called name resolution.</p>
</blockquote>
<p>Now that we know what is DNS is and what is does, let’s try to understand how we can practically inspect how it really works.</p>
<hr />
<h2 id="heading-dns-resolution-layers">DNS Resolution Layers</h2>
<p>While DNS in simpler terms may seem like a simple give and take like process for domain name and IP address lookup, it is actually more complex and layered process. Each process doing a specific task, a DNS call takes multiple trips before finishing up the look up process.</p>
<p>The flow always follow the following pattern: <code>Root → TLD → Authoritative Servers → Resolution</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770976901746/b1bf9cf1-c396-4ff7-ba07-ca957d052f08.png" alt /></p>
<p>Let’s understand the steps one by one</p>
<h3 id="heading-root-layer">Root layer</h3>
<p>This is the first layer of the DNS query. It doesn’t have any data related to the domain and it’s respective IP address. Instead, it will have data TLD (Top level domains: .com, .org, .cloud, .ai) managers.</p>
<p>There are only 13 logical root server clusters spanning from a to m logical addresses. The DNS providers fork the logical root server cluster and create their own root serer resolver. Once the root layer will figure out who is managing the TLD of the requested domain, the flow moves to TLD Layer.</p>
<h3 id="heading-tld-layer">TLD Layer</h3>
<p>The TLD layer also doesn’t hold any data about the domain and it’s IP address. Instead, it holds data about which authoritative servers manage each domain under the TLD. Once the authoritative server of the TLD is figured out, flow is then moved to authoritative servers.</p>
<h3 id="heading-authoritative-servers">Authoritative Servers</h3>
<p>Once TLD layer figures out the respective authoritative server for the domain of the TLD, flow moves to the authoritative server which holds the source of truth about record of the domain. The authoritative server will then find out the <code>A</code> record of the domain which holds the IPV4 of the domain.</p>
<p>The authoritative server is where the DNS lookup will be resolved. It will get the <code>A</code> record of the domain which is nothing but IPV4 address of the server which is being pointed by a domain.</p>
<hr />
<h2 id="heading-inspecting-dns-resolution-with-dig">Inspecting DNS resolution with dig</h2>
<p><code>dig</code> is a diagnostic tool to inspect DNS resolution. It is a command line utility tool which can be used to send raw DNS query to a DNS server and get the response back. It is often used to check and validate any updates related to DNS records. It is available out of the box on Linux systems.</p>
<h2 id="heading-understanding-usage-of-different-dig-commands">Understanding Usage Of Different <code>dig</code> Commands</h2>
<p>Now that we know why dig is used, let’s try to understand different ways we can utilize it and understand it’s use cases. It comes with various usages. Based on different type of usages, we can utilize it in various ways.</p>
<p>Let’s explore different commands utilizing the <code>dig</code> command considering the same flow of DNS resolution we discussed above. Which is, <code>Root → TLD → Authoritative servers → result</code></p>
<p>We will be referencing to <code>google.com</code> for the reference of domain name for all the examples.</p>
<h3 id="heading-understanding-root-of-dns-with-dig-ns">Understanding Root of DNS with <code>dig . NS</code></h3>
<p>command:</p>
<pre><code class="lang-plaintext">dig . NS google.com
</code></pre>
<p>This command queries for root name servers of the root of DNS which are entry point for all the DNS resolution/lookup processes also referenced as Root. Root only holds data about the server which manages the TLD (Top Level Domain). The <code>.</code> in the command represents the DNS root zone.</p>
<p>example: Querying for root name servers for <code>google.com</code></p>
<blockquote>
<p>Notice how there are exactly 13 name servers listed, those are the universal logical group of root name servers.</p>
</blockquote>
<pre><code class="lang-plaintext">➜  ~ dig . NS google.com 

; &lt;&lt;&gt;&gt; DiG 9.18.39-0ubuntu0.22.04.2-Ubuntu &lt;&lt;&gt;&gt; . NS google.com
;; global options: +cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 6445
;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;.                IN    NS

;; ANSWER SECTION:
.            7180    IN    NS    k.root-servers.net.
.            7180    IN    NS    c.root-servers.net.
.            7180    IN    NS    d.root-servers.net.
.            7180    IN    NS    e.root-servers.net.
.            7180    IN    NS    i.root-servers.net.
.            7180    IN    NS    m.root-servers.net.
.            7180    IN    NS    j.root-servers.net.
.            7180    IN    NS    a.root-servers.net.
.            7180    IN    NS    l.root-servers.net.
.            7180    IN    NS    f.root-servers.net.
.            7180    IN    NS    b.root-servers.net.
.            7180    IN    NS    h.root-servers.net.
.            7180    IN    NS    g.root-servers.net.

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Tue Jan 27 22:24:11 IST 2026
;; MSG SIZE  rcvd: 239

;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 63183
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;google.com.            IN    A

;; ANSWER SECTION:
google.com.        203    IN    A    142.250.205.110

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Tue Jan 27 22:24:11 IST 2026
;; MSG SIZE  rcvd: 55
</code></pre>
<hr />
<h3 id="heading-understanding-tld-name-servers-dig-com-ns"><strong>Understanding TLD name servers</strong> <code>dig com NS</code></h3>
<p>command:</p>
<pre><code class="lang-plaintext">dig com NS google.com
</code></pre>
<p>This command queries for name servers responsible to resolve for the TLD of the requested domain. Since we are querying for <code>google.com</code>, it will list out the authoritative name servers which are responsible for resolving <code>.com</code> TLD. These name servers don’t hold any data records related to the TLD. It only knows only which authoritative manages each <code>.com</code> domain.</p>
<p>example: Querying for NS (name servers) records for <code>google.com</code></p>
<blockquote>
<p>Notice how there name servers listed for <code>.com</code> unlike <code>.</code> which was received from the root DNS query</p>
</blockquote>
<pre><code class="lang-plaintext">➜  ~ dig com NS google.com 

; &lt;&lt;&gt;&gt; DiG 9.18.39-0ubuntu0.22.04.2-Ubuntu &lt;&lt;&gt;&gt; com NS google.com
;; global options: +cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 6740
;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;com.                IN    NS

;; ANSWER SECTION:
com.            21599    IN    NS    i.gtld-servers.net.
com.            21599    IN    NS    b.gtld-servers.net.
com.            21599    IN    NS    f.gtld-servers.net.
com.            21599    IN    NS    h.gtld-servers.net.
com.            21599    IN    NS    j.gtld-servers.net.
com.            21599    IN    NS    g.gtld-servers.net.
com.            21599    IN    NS    e.gtld-servers.net.
com.            21599    IN    NS    c.gtld-servers.net.
com.            21599    IN    NS    l.gtld-servers.net.
com.            21599    IN    NS    a.gtld-servers.net.
com.            21599    IN    NS    m.gtld-servers.net.
com.            21599    IN    NS    k.gtld-servers.net.
com.            21599    IN    NS    d.gtld-servers.net.

;; Query time: 52 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Tue Jan 27 22:40:47 IST 2026
;; MSG SIZE  rcvd: 256

;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 60663
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;google.com.            IN    A

;; ANSWER SECTION:
google.com.        210    IN    A    142.250.205.110

;; Query time: 9 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Tue Jan 27 22:40:47 IST 2026
;; MSG SIZE  rcvd: 55
</code></pre>
<hr />
<h3 id="heading-understanding-authoritative-name-servers-with-dig-ns"><strong>Understanding Authoritative Name Servers With</strong> <code>dig &lt;domain&gt; NS</code></h3>
<p>command:</p>
<pre><code class="lang-plaintext">dig google.com NS
</code></pre>
<p>This command queries for authoritative server which resolves NS records for <code>google.com</code>. These servers are operated by google. Theser severs are the source of truth for <code>google.com</code>. It identifies where different type of DNS records lives but it doesn’t return the IP address of the site.</p>
<p>example: Querying for authoritative name servers records for <code>google.com</code></p>
<blockquote>
<p>Notice how instead of top level domain, it now includes the domain address and respective name server which holds different records to resolve the domain</p>
</blockquote>
<pre><code class="lang-plaintext">; &lt;&lt;&gt;&gt; DiG 9.18.39-0ubuntu0.22.04.2-Ubuntu &lt;&lt;&gt;&gt; google.com NS
;; global options: +cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 201
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;google.com.            IN    NS

;; ANSWER SECTION:
google.com.        9394    IN    NS    ns1.google.com.
google.com.        9394    IN    NS    ns2.google.com.
google.com.        9394    IN    NS    ns3.google.com.
google.com.        9394    IN    NS    ns4.google.com.

;; Query time: 16 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Tue Jan 27 22:59:16 IST 2026
;; MSG SIZE  rcvd: 111
</code></pre>
<hr />
<h3 id="heading-understanding-full-dns-resolution-flow-with-dig">Understanding Full DNS Resolution Flow With <code>dig &lt;domain&gt;</code></h3>
<p>command:</p>
<pre><code class="lang-plaintext">dig google.com
</code></pre>
<p>This command will perform full DNS resolution and gets back <code>A</code> record (IPV4) of the domain. It will perform all the recursive resolution and returns back the <code>A</code> record of the domain from the respective authoritative servers. In our case, it query for IPV4 of google.com from google authoritative servers.</p>
<p>example: full DNS resolution flow of <code>google.com</code></p>
<blockquote>
<p>Notice how we got an A record (IPV4) of <code>google.com</code>, that’s the result part of the DNS resolve cycle.</p>
</blockquote>
<pre><code class="lang-plaintext">➜  ~ dig google.com 

; &lt;&lt;&gt;&gt; DiG 9.18.39-0ubuntu0.22.04.2-Ubuntu &lt;&lt;&gt;&gt; google.com
;; global options: +cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 42676
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;google.com.            IN    A

;; ANSWER SECTION:
google.com.        96    IN    A    142.251.223.14

;; Query time: 10 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Tue Jan 27 23:01:53 IST 2026
;; MSG SIZE  rcvd: 55
</code></pre>
<h3 id="heading-conclusion-order-of-dig-commands">Conclusion: Order Of <code>dig</code> commands:</h3>
<p>Each command reveals one layer:</p>
<ol>
<li><p><code>dig . NS</code> → Root server</p>
</li>
<li><p><code>dig com NS</code> → TLD NS</p>
</li>
<li><p><code>dig google.com NS</code> → Authoritative NS</p>
</li>
<li><p><code>dig google.com</code> → End result after all layers</p>
</li>
</ol>
<hr />
<h2 id="heading-ns-and-its-importance">NS And It’s Importance</h2>
<p>NS stands for Name Server. It is one of the critical part of DNS resolution. It holds information about the sever which is responsible for the domain. Which means, A NS record does not store IP addresses of websites. It stores names of DNS servers that are responsible to answer for a domain.</p>
<p>DNS is not a database. It is rather a reference system to find who has authority to store what information of the domain. It defines boundary and authority of:</p>
<ol>
<li><p>Who is allowed to make requests to domain</p>
</li>
<li><p>Who’s responsibility spans from where to where</p>
</li>
<li><p>Who holds the reference of next reference.</p>
</li>
</ol>
<p>Example: NS for google servers looks like following:</p>
<pre><code class="lang-plaintext">google.com  NS  ns1.google.com
google.com  NS  ns2.google.com
</code></pre>
<p>NS records drive this process:</p>
<ol>
<li><p>Root NS records: Say who manages TLD( .com, .org, etc).</p>
</li>
<li><p>TLD NS records: Say who manages domains (google.com, amazon.com, etc.)</p>
</li>
<li><p>Domain NS records: Say which servers are authoritative for that domain</p>
</li>
</ol>
]]></content:encoded></item><item><title><![CDATA[Getting Started with cURL]]></title><description><![CDATA[What Is cURL?
More content coming…]]></description><link>https://blogs.pank.cloud/getting-started-with-curl</link><guid isPermaLink="true">https://blogs.pank.cloud/getting-started-with-curl</guid><category><![CDATA[cURL for beginner]]></category><category><![CDATA[curl-command]]></category><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Thu, 22 Jan 2026 18:30:00 GMT</pubDate><content:encoded><![CDATA[<h2 id="heading-what-is-curl">What Is cURL?</h2>
<p>More content coming…</p>
]]></content:encoded></item><item><title><![CDATA[TCP vs UDP: When to Use What, and How TCP Relates to HTTP]]></title><description><![CDATA[While using tech in our regular life, we often don't even think about it. Or maybe we even underestimate the amount of engineering and hardship being involved to implement them. These can be as simple]]></description><link>https://blogs.pank.cloud/tcp-vs-udp-when-to-use-what-and-how-tcp-relates-to-http</link><guid isPermaLink="true">https://blogs.pank.cloud/tcp-vs-udp-when-to-use-what-and-how-tcp-relates-to-http</guid><category><![CDATA[networking]]></category><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Thu, 22 Jan 2026 18:30:00 GMT</pubDate><content:encoded><![CDATA[<p>While using tech in our regular life, we often don't even think about it. Or maybe we even underestimate the amount of engineering and hardship being involved to implement them. These can be as simple as having a call over internet, playing online games, watching live matches, browsing through web. For many of us, it could be a very simple act of visiting the website, clicking on the app and start to use feature. But we often don't even think about what goes behind and how the thing works.</p>
<p>Let's learn about TCP and UDP which as a programmer all of us has heard once in a while but may not have studied it beyond textbook.</p>
<h2>Internet Protocols</h2>
<p>Before we jump into TCP and UDP, we need to first understand what are Internet protocol and it's importance. Protocols are nothing but set of rules one has to follow. Internet protocols are the set of rules for accessing and working with Internet. Imagine millions of devices communicating at the same time without any context on how and when to send or receive data. Messages would overlap, disappear, or arrive half-broken.</p>
]]></content:encoded></item><item><title><![CDATA[Git for Beginners: Basics and Essential Commands]]></title><description><![CDATA[content is being updated..]]></description><link>https://blogs.pank.cloud/git-for-beginners-basics-and-essential-commands</link><guid isPermaLink="true">https://blogs.pank.cloud/git-for-beginners-basics-and-essential-commands</guid><category><![CDATA[Git]]></category><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Wed, 21 Jan 2026 18:30:00 GMT</pubDate><content:encoded><![CDATA[<p>content is being updated..</p>
]]></content:encoded></item><item><title><![CDATA[Inside Git: How It Works and the Role of the .git Folder]]></title><description><![CDATA[contnents being added]]></description><link>https://blogs.pank.cloud/inside-git-how-it-works-and-the-role-of-the-git-folder</link><guid isPermaLink="true">https://blogs.pank.cloud/inside-git-how-it-works-and-the-role-of-the-git-folder</guid><category><![CDATA[Git]]></category><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Tue, 20 Jan 2026 18:30:00 GMT</pubDate><content:encoded><![CDATA[<p>contnents being added</p>
]]></content:encoded></item><item><title><![CDATA[Understanding Network Devices]]></title><description><![CDATA[updating soon…]]></description><link>https://blogs.pank.cloud/understanding-network-devices</link><guid isPermaLink="true">https://blogs.pank.cloud/understanding-network-devices</guid><category><![CDATA[networking]]></category><category><![CDATA[networking for beginners]]></category><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Mon, 19 Jan 2026 18:30:00 GMT</pubDate><content:encoded><![CDATA[<p>updating soon…</p>
]]></content:encoded></item><item><title><![CDATA[DNS Record Types Explained]]></title><description><![CDATA[What Is DNS Record And Why Is It Needed
When you type a website name in a browser, the browser does not know where that site lives. Humans use domain names like google.com and computers use server IP addresses to locate the respective servers and all...]]></description><link>https://blogs.pank.cloud/dns-record-types-explained</link><guid isPermaLink="true">https://blogs.pank.cloud/dns-record-types-explained</guid><category><![CDATA[networking]]></category><category><![CDATA[dns]]></category><category><![CDATA[dns server]]></category><dc:creator><![CDATA[Pankaj Thapaliya]]></dc:creator><pubDate>Mon, 19 Jan 2026 07:42:19 GMT</pubDate><content:encoded><![CDATA[<h2 id="heading-what-is-dns-record-and-why-is-it-needed">What Is DNS Record And Why Is It Needed</h2>
<p>When you type a website name in a browser, the browser does not know where that site lives. Humans use domain names like google.com and computers use server IP addresses to locate the respective servers and all the operations like accessing the domain and serving back to us. The process of resolving domain name with IP address is done with DNS. DNS is the phonebook of the internet.</p>
<blockquote>
<p>DNS is responsible for figuring out IP address of the server where the domain is pointing to.</p>
</blockquote>
<p>DNS records store information about a domain. Each record has a specific job like pointing a website to a server or telling email where to move the traffic towards or where to go to find the IP address of that domain. It is one of the most important part of internet. Without DNS, we would have very hard time to navigate through websites this easily.</p>
<h2 id="heading-dns-in-real-life">DNS In Real Life?</h2>
<p>Let’s understand the separation of concerns about each layer by following real life example considering I’m sending a parcel to my friend from Bangalore to Delhi. (Each step in the process below is concerned and knows about the next stage and nothing beyond that and that is how DNS works too)</p>
<ol>
<li><p>I’ll go to local courier office nearby from my home with address delivery indicated in the package.</p>
</li>
<li><p>The courier office will send the package to the cargo hub of my city which will to send the package to cargo hub in Delhi. The cargo operator doesn’t know where my package will be delivered to precisely. He only knows that he has to deliver it to cargo hub in Delhi.</p>
</li>
<li><p>Once the package is received in cargo hub in Delhi, it will be then forwarded to the respective courier office of the specific region where it is supposed to be delivered to. The hub only concerns about in which region of the Delhi it has to be sent and in which branch my package should be sent to for delivery.</p>
</li>
<li><p>Once the package is received in the responsible courier office branch, a delivery agent will then check which part of the area (based on pin code mostly) is my package is supposed to be delivered to and contact my friend that he is coming to deliver it and ask for his actual precise location.</p>
</li>
<li><p>Once delivery agent gets precise location, he will then deliver the package to my friends place.</p>
</li>
</ol>
<p>If you want to know more about how dns works, check out <a target="_blank" href="https://blogs.pank.cloud/how-dns-resolution-works">my in-depth article on it here.</a></p>
<hr />
<h2 id="heading-what-are-ns-records">What Are NS Records ?</h2>
<p>NS stands for ‘nameserver’ and the nameserver record indicates which DNS server is authoritative for that domain (server containing the actual DNS records for that domain).</p>
<p>These authoritative servers have the final answers about that domain name resolution. The final answer includes different DNS records like A record, AAAA record, MX record and so on…</p>
<p>If you want to know more about DNS records, check <a target="_blank" href="https://www.cloudflare.com/en-in/learning/dns/dns-records/">this article from cloudflare</a></p>
<h3 id="heading-common-dns-records">Common DNS Records</h3>
<p>Following is the list of the most commonly used record types</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>DNS Record Type</td><td>Usage</td></tr>
</thead>
<tbody>
<tr>
<td>A</td><td>The record that holds the IP address of a domain</td></tr>
<tr>
<td>AAAA</td><td>The record that contains the IPv6 address for a domain</td></tr>
<tr>
<td>CNAME</td><td>Forwards one domain or subdomain to another domain, does NOT provide an IP address</td></tr>
<tr>
<td>MX</td><td>Directs mail to an email server</td></tr>
<tr>
<td>TXT</td><td>Lets an admin store text notes in the record. These records are often used for email security</td></tr>
<tr>
<td>NS</td><td>Stores the name server for a DNS entry</td></tr>
</tbody>
</table>
</div><hr />
<h2 id="heading-comparing-common-dns-records">Comparing Common DNS Records</h2>
<p>Let’s cover a bit more of some of the common DNS records which are slightly confusing and may appear as similar to someone who doesn’t have much hands on with the DNS.</p>
<h3 id="heading-a-record-vs-cname">A Record vs CNAME</h3>
<p>A record is always the final source of truth of DNS lookup. It holds the IPV4 of the server from where the domain is being served where as CNAME record is like a another name we have given to the actual domain name. It will always comes and resolve back as the actual domain name.</p>
<blockquote>
<p>CNAME record does not have to be in the same DNS zone as the domain it points to. It is a global pointer that can link an alias to any valid domain name on the internet.</p>
</blockquote>
<p>For example: If I’ve hosted a pet project on netlify, it will give me a hosted domain in format of <code>&lt;somename&gt;.netflity.app</code> I can instead add a CNAME record and use <code>somename.pank.cloud</code> to point it from my own subdomain.</p>
<h3 id="heading-ns-vs-mx">NS vs MX</h3>
<p>MX records tell email where to go. It tell email servers where to deliver emails for a domain. They point to mail servers, not website servers. example: writing a special delivery office on a letter instead of a house address. On the other side, NS records say who controls the domain.</p>
<p>MX records say where emails should be delivered while NS controls the domain. MX controls email and receives. NS answers questions about authoritative servers.</p>
]]></content:encoded></item></channel></rss>