<?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[Web Dev Cohort 2026]]></title><description><![CDATA[Web Dev Cohort 2026]]></description><link>https://sudhanshutalan.in</link><generator>RSS for Node</generator><lastBuildDate>Sun, 31 May 2026 03:55:16 GMT</lastBuildDate><atom:link href="https://sudhanshutalan.in/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[CSS Selectors 101: Targeting Elements with Precision]]></title><description><![CDATA[When we write CSS, our main goal is very simple: we want to apply styles to specific parts of our webpage. But how does CSS know which elements we are talking about? That is where CSS selectors come in.
Selectors are the foundation of CSS. Without se...]]></description><link>https://sudhanshutalan.in/css-selectors-101-targeting-elements-with-precision</link><guid isPermaLink="true">https://sudhanshutalan.in/css-selectors-101-targeting-elements-with-precision</guid><category><![CDATA[Web Development]]></category><category><![CDATA[webdev]]></category><category><![CDATA[WebDevCohort2026]]></category><category><![CDATA[HTML5]]></category><category><![CDATA[CSS]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[SUDHANSHU KR TALAN]]></dc:creator><pubDate>Tue, 27 Jan 2026 18:23:06 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769537952228/078bf0b2-4728-40cb-a8cc-b1014ad8bb6c.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When we write CSS, our main goal is very simple: we want to apply styles to specific parts of our webpage. But how does CSS know <em>which</em> elements we are talking about? That is where <strong>CSS selectors</strong> come in.</p>
<p>Selectors are the foundation of CSS. Without selectors, CSS would not know what to style, and every rule would be meaningless. Think of selectors as instructions that tell the browser <em>who should receive which styles</em>.</p>
<p>In this article, we will start from the basics and slowly build up our understanding, just like how we should learn CSS in real life.</p>
<h2 id="heading-why-are-css-selectors-needed">Why are CSS selectors needed?</h2>
<p>Imagine you are standing in a classroom and want to give instructions. If you say, “Everyone, sit down,” all students will respond. But if you say, “Only students in the first row sit down,” only a specific group will act. CSS selectors work in the same way.</p>
<p>CSS selectors are needed because a webpage usually contains many elements: headings, paragraphs, images, buttons, forms, links, and much more. If CSS had no way to target specific elements, every style would apply to everything, which would make design impossible.</p>
<p>Selectors allow you to be <strong>precise</strong>. You can choose:</p>
<ul>
<li><p>All paragraphs.</p>
</li>
<li><p>Only one specific button.</p>
</li>
<li><p>A group of cards.</p>
</li>
<li><p>Text inside a section.</p>
</li>
<li><p>Or a single unique element.</p>
</li>
</ul>
<p>This precision is what makes modern web design possible.</p>
<p>Another important reason selectors exist is maintainability. When our website grows, we do not want to rewrite styles again and again. With good selectors, we write styles once and reuse them everywhere. This keeps our code clean, organized, and easy to update.</p>
<p>From a real-world perspective, selectors are like addresses. The house address tells delivery services exactly where to go. In the same way, CSS selectors tell the browser exactly which element should receive the style.</p>
<p>Without selectors, CSS would be like sending letters without addresses. Nothing would reach the right place.</p>
<p>In short, selectors solve one core problem:<br /><strong>How do we choose the correct element to style on a webpage?</strong></p>
<h2 id="heading-types-of-css-selectors">Types of CSS selectors</h2>
<ol>
<li><h3 id="heading-element-selector">Element selector</h3>
</li>
</ol>
<p>The element selector is the simplest and most basic selector in CSS. It targets elements directly using their HTML tag names.</p>
<p>For example:</p>
<ul>
<li><p><code>p</code> targets all paragraphs.</p>
</li>
<li><p><code>h1</code> targets all main headings.</p>
</li>
<li><p><code>div</code> targets all div containers.</p>
</li>
<li><p><code>img</code> targets all images.</p>
</li>
</ul>
<p>When we use an element selector, we are saying:<br />“Apply this style to every element of this type.”</p>
<p>This is very useful for setting <strong>global styles</strong>. For example, you might want:</p>
<ul>
<li><p>All paragraphs are to have the same font size.</p>
</li>
<li><p>All headings are to have the same color.</p>
</li>
<li><p>All links are to be blue.</p>
</li>
</ul>
<p>Element selectors are often used at the start of a project to define the basic look and feel of a website.</p>
<p>Element selectors are best used when:</p>
<ul>
<li><p>We want uniform styling.</p>
</li>
<li><p>We want default styles.</p>
</li>
<li><p>We are defining base typography.</p>
</li>
</ul>
<p>They form the first layer of CSS styling and usually work together with class and ID selectors for more control.</p>
<ol start="2">
<li><h3 id="heading-class-selector">Class selector</h3>
</li>
</ol>
<p>The class selector is the most commonly used in real-world projects. It allows you to target elements that share a common label called a class.</p>
<p>Classes are added in HTML like this:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"highlight"</span>&gt;</span>This is important<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<p>And targeted in CSS like this:</p>
<pre><code class="lang-css"><span class="hljs-selector-class">.highlight</span> {
  <span class="hljs-attribute">color</span>: red;
}
</code></pre>
<p>This means:<br />“Apply this style to all elements that have the class <code>highlight</code>.”</p>
<p>The biggest advantage of class selectors is reusability. We can apply the same class to many elements, even if they are different types.</p>
<p>For example, you can use the same class for:</p>
<ul>
<li><p>A paragraph</p>
</li>
<li><p>A heading</p>
</li>
<li><p>A button</p>
</li>
</ul>
<p>This makes class selectors extremely powerful for building components like:</p>
<ul>
<li><p>Cards</p>
</li>
<li><p>Buttons</p>
</li>
<li><p>Alerts</p>
</li>
<li><p>Layout sections</p>
</li>
</ul>
<p>In professional CSS, most styling is done using class selectors because they:</p>
<ul>
<li><p>Keep HTML flexible.</p>
</li>
<li><p>Avoid conflicts.</p>
</li>
<li><p>Are easy to maintain.</p>
</li>
<li><p>Works well with modern frameworks.</p>
</li>
</ul>
<ol start="3">
<li><h3 id="heading-id-selector">ID selector</h3>
</li>
</ol>
<p>The <strong>ID selector</strong> targets a single unique element on the page.</p>
<p>IDs are defined like this:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"header"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<p>And used in CSS like this:</p>
<pre><code class="lang-css"><span class="hljs-selector-id">#header</span> {
  <span class="hljs-attribute">background-color</span>: black;
}
</code></pre>
<p>An ID must be <strong>unique</strong>. That means no two elements should share the same ID.</p>
<p>ID selectors are useful when:</p>
<ul>
<li><p>We have one special element.</p>
</li>
<li><p>We need very specific styling.</p>
</li>
<li><p>We are linking to sections.</p>
</li>
</ul>
<p>However, ID selectors should be used <strong>carefully</strong>. They are very strong and hard to override. If you use too many IDs, your CSS becomes rigid and difficult to maintain.</p>
<p>In modern development, IDs are often used more for:</p>
<ul>
<li><p>JavaScript hooks</p>
</li>
<li><p>Anchors</p>
</li>
<li><p>Unique layout sections</p>
</li>
</ul>
<p>While classes handle most styling.</p>
<p>Think of IDs as <strong>special cases</strong>, not everyday tools.</p>
<ol start="4">
<li><h3 id="heading-group-selectors">Group selectors</h3>
</li>
</ol>
<p>Group selectors allow you to apply the same style to multiple selectors at once.</p>
<p>Example:</p>
<pre><code class="lang-css"><span class="hljs-selector-tag">h1</span>, <span class="hljs-selector-tag">h2</span>, <span class="hljs-selector-tag">h3</span> {
  <span class="hljs-attribute">font-family</span>: Arial;
}
</code></pre>
<p>This means:<br />“Apply this style to h1, h2, and h3.”</p>
<p>Group selectors help reduce repetition. Instead of writing the same style three times, we only write it once.</p>
<p>Group selectors are useful when:</p>
<ul>
<li><p>Elements share common styling.</p>
</li>
<li><p>We want cleaner CSS.</p>
</li>
<li><p>We want to avoid duplication.</p>
</li>
</ul>
<p>Group selectors improve readability and performance by keeping your styles short and logical.</p>
<ol start="5">
<li><h3 id="heading-descendant-selectors">Descendant selectors</h3>
</li>
</ol>
<p>Descendant selectors target elements <strong>inside other elements</strong>.</p>
<p>Example:</p>
<pre><code class="lang-css"><span class="hljs-selector-tag">div</span> <span class="hljs-selector-tag">p</span> {
  <span class="hljs-attribute">color</span>: blue;
}
</code></pre>
<p>This means:<br />“Only paragraphs inside divs should be blue.”</p>
<p>This is very powerful because it allows context-based styling.</p>
<p>Descendant selectors help when:</p>
<ul>
<li><p>Styling navigation menus.</p>
</li>
<li><p>Formatting blog content.</p>
</li>
<li><p>Designing sections.</p>
</li>
</ul>
<p>They allow us to style the same element differently based on where it appears.</p>
<p>This is how CSS understands layout structure.</p>
<h2 id="heading-basic-selector-priority-very-high-level">Basic selector priority (very high level)</h2>
<p>Sometimes multiple selectors target the same element. When that happens, CSS uses priority rules.</p>
<p>At a high level:</p>
<ul>
<li><p>ID selectors are strongest</p>
</li>
<li><p>Class selectors come next</p>
</li>
<li><p>Element selectors are weakest</p>
</li>
</ul>
<p>So if an element matches:</p>
<ul>
<li><p>An element selector</p>
</li>
<li><p>A class selector</p>
</li>
<li><p>An ID selector</p>
</li>
</ul>
<p>The ID selector wins.</p>
<p>Understanding priority helps avoid confusion when styles do not behave as expected.</p>
<p>This is why using too many IDs is risky. They overpower everything else.</p>
<p>Good CSS relies more on:</p>
<ul>
<li><p>Classes</p>
</li>
<li><p>Logical structure</p>
</li>
<li><p>Clear hierarchy</p>
</li>
</ul>
<h2 id="heading-final-thought">Final thought</h2>
<p>CSS selectors are not just syntax. They are the <strong>language of styling logic</strong>.</p>
<p>Once we understand how selectors work, CSS becomes predictable instead of confusing.</p>
<p>Selectors teach us how to think in terms of:</p>
<ul>
<li><p>Structure</p>
</li>
<li><p>Relationships</p>
</li>
<li><p>Reusability</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Understanding HTML Tags and Elements]]></title><description><![CDATA[When someone visits a website, they usually see colors, buttons, images, and animations. But underneath all of that, the real structure of every webpage is built using HTML.
HTML is the starting point of web development.No matter how advanced a websi...]]></description><link>https://sudhanshutalan.in/understanding-html-tags-and-elements</link><guid isPermaLink="true">https://sudhanshutalan.in/understanding-html-tags-and-elements</guid><category><![CDATA[Web Development]]></category><category><![CDATA[webdev]]></category><category><![CDATA[WebDevCohort2026]]></category><category><![CDATA[ChaiCode]]></category><category><![CDATA[HTML5]]></category><category><![CDATA[CSS]]></category><dc:creator><![CDATA[SUDHANSHU KR TALAN]]></dc:creator><pubDate>Tue, 27 Jan 2026 17:50:11 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769536115284/1a84eeea-831f-4843-9db2-3fafc0fced2c.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When someone visits a website, they usually see colors, buttons, images, and animations. But underneath all of that, the real structure of every webpage is built using <strong>HTML</strong>.</p>
<p>HTML is the <strong>starting point of web development</strong>.<br />No matter how advanced a website becomes, it always begins with HTML.</p>
<p>HTML is the reason a browser can understand:</p>
<ul>
<li><p>What is a heading?</p>
</li>
<li><p>What is a paragraph?</p>
</li>
<li><p>What is a button?</p>
</li>
<li><p>What is an image?</p>
</li>
</ul>
<p>Without HTML, a webpage is just a meaningless text file.</p>
<p>Think of HTML as the <strong>skeleton of a webpage</strong>.<br />It doesn’t make the page beautiful.<br />It doesn’t make the page interactive.<br />It only gives the page its <strong>basic structure</strong>.</p>
<p>And that structure is built using <strong>tags and elements</strong>.</p>
<h2 id="heading-1-what-html-is-and-why-we-use-it">1. What HTML is and why we use it</h2>
<p>HTML stands for <strong>HyperText Markup Language</strong>.</p>
<p>Let’s break this into simple words:</p>
<ul>
<li><p><strong>HyperText</strong> → Text that can contain links to other text.</p>
</li>
<li><p><strong>Markup</strong> → Adding special labels to content.</p>
</li>
<li><p><strong>Language</strong> → A set of rules the browser understands.</p>
</li>
</ul>
<p>Browsers like Chrome or Firefox do not think like humans.<br />They don’t automatically know:</p>
<ul>
<li><p>Which line is important?</p>
</li>
<li><p>Which line is a heading?</p>
</li>
<li><p>Which line is just normal text?</p>
</li>
</ul>
<p>HTML gives meaning to content.</p>
<p>For example, without HTML, this is just text:</p>
<pre><code class="lang-plaintext">Welcome to my website
</code></pre>
<p>But with HTML:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Welcome to my website<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
</code></pre>
<p>Now the browser understands:</p>
<blockquote>
<p>This is the main heading of the page.</p>
</blockquote>
<p>So we use HTML because:</p>
<ul>
<li><p>It tells the browser <strong>what things are</strong>.</p>
</li>
<li><p>It helps search engines understand content.</p>
</li>
<li><p>It gives structure before design and logic.</p>
</li>
</ul>
<p>CSS and JavaScript come later.<br />HTML always comes first.</p>
<h2 id="heading-2-what-an-html-tag-is">2. What an HTML tag is</h2>
<p>An HTML tag is a <strong>keyword written inside angle brackets</strong>.</p>
<p>Example:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<p>Each tag has a <strong>meaning</strong>:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Tag</td><td>Meaning</td></tr>
</thead>
<tbody>
<tr>
<td><code>&lt;p&gt;</code></td><td>Paragraph</td></tr>
<tr>
<td><code>&lt;h1&gt;</code></td><td>Main heading</td></tr>
<tr>
<td><code>&lt;a&gt;</code></td><td>Link</td></tr>
<tr>
<td><code>&lt;img&gt;</code></td><td>Image</td></tr>
</tbody>
</table>
</div><p>Tags are like <strong>instructions for the browser</strong>. It tells the browser:</p>
<ul>
<li><p>“This is a paragraph.”</p>
</li>
<li><p>“This is a heading.”</p>
</li>
<li><p>“This is a container.”</p>
</li>
</ul>
<p>You can think of a tag like a <strong>name on a box</strong>.</p>
<p>If a box has a label saying <em>“Books”</em>, you know what’s inside.<br />If a piece of text has a tag saying <code>&lt;p&gt;</code>, the browser knows it is a paragraph.</p>
<p>Tags themselves don’t display anything.<br />They just describe the content.</p>
<h2 id="heading-3-opening-tag-closing-tag-and-content">3. Opening tag, closing tag, and content</h2>
<p>Most HTML tags come in pairs.</p>
<p>Example:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Hello World<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<p>This has three parts:</p>
<ul>
<li><p><code>&lt;p&gt;</code> → opening tag</p>
</li>
<li><p><code>Hello World</code> → content</p>
</li>
<li><p><code>&lt;/p&gt;</code> → closing tag</p>
</li>
</ul>
<p>The closing tag always has a <code>/</code>.</p>
<p>The browser reads this like:</p>
<blockquote>
<p>Start paragraph<br />Show text<br />End paragraph</p>
</blockquote>
<p>This is how HTML knows <strong>where something begins and where it ends</strong>.</p>
<p>Without closing tags, the browser would not know:</p>
<ul>
<li><p>where one paragraph ends.</p>
</li>
<li><p>where the next one starts.</p>
</li>
</ul>
<h2 id="heading-4-what-an-html-element-means">4. What an HTML element means</h2>
<p>A tag is just one part.<br />An element is the complete structure.</p>
<p>This is a tag:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<p>This is an element:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>This is a paragraph<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<p>So an element =<br /><strong>opening tag + content + closing tag</strong></p>
<p>Think like this:</p>
<ul>
<li><p>A tag is a <strong>tool</strong></p>
</li>
<li><p>An element is the <strong>finished product</strong></p>
</li>
</ul>
<p>When developers speak properly, they say:</p>
<blockquote>
<p>“This is a paragraph element.”<br />not<br />“This is a p tag.”</p>
</blockquote>
<p>Because technically, the real thing is the <strong>element</strong>, not just the tag.</p>
<h3 id="heading-think-like-this">Think like this:</h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Word</td><td>Means</td></tr>
</thead>
<tbody>
<tr>
<td>Tag</td><td>A part</td></tr>
<tr>
<td>Element</td><td>The full thing</td></tr>
</tbody>
</table>
</div><p>Just like:</p>
<ul>
<li><p>Brick = tag</p>
</li>
<li><p>Wall = element</p>
</li>
</ul>
<h2 id="heading-5-self-closing-void-elements">5. Self-closing (void) elements</h2>
<p>Some elements do not wrap content.</p>
<p>They exist alone.</p>
<p>Examples:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">img</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">br</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">input</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">hr</span>&gt;</span>
</code></pre>
<p>These are called <strong>self-closing or void elements</strong>.</p>
<p>Why no closing tag?</p>
<p>Because there is nothing inside them.</p>
<p>An image does not contain text.<br />A line break does not contain content.</p>
<p>They just perform one action and finish.</p>
<p>So you write:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"photo.jpg"</span>&gt;</span>
</code></pre>
<p>Not:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">img</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">img</span>&gt;</span>
</code></pre>
<p>Void elements are simple:<br />They exist, they do their job, and they end.</p>
<h2 id="heading-6-block-level-vs-inline-elements">6. Block-level vs inline elements</h2>
<p>This decides <strong>how elements appear on the page</strong>.</p>
<p>This is not about meaning.<br />This is about <strong>layout behavior</strong>.</p>
<h3 id="heading-block-level-elements">Block-level elements</h3>
<p>Block elements:</p>
<ul>
<li><p>Start on a new line</p>
</li>
<li><p>Take full width</p>
</li>
</ul>
<p>Examples:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>
</code></pre>
<p>Even if the content is small:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Hi<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769534506040/4e057010-9a73-4157-84f5-e2a1e99e9cc9.png" alt class="image--center mx-auto" /></p>
<p>It still occupies the full width.</p>
<p>Block elements behave like <strong>big boxes stacked vertically</strong>.</p>
<h3 id="heading-inline-elements">Inline elements</h3>
<p>Inline elements:</p>
<ul>
<li><p>stay in the same line</p>
</li>
<li><p>take only required space</p>
</li>
</ul>
<p>Examples:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">span</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">a</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span>
</code></pre>
<p>Example:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>I love <span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span>HTML<span class="hljs-tag">&lt;/<span class="hljs-name">strong</span>&gt;</span> very much<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769534681541/7bea4af0-b262-4056-a0fb-b12aefc91901.png" alt class="image--center mx-auto" /></p>
<p><code>strong</code> does not break the line.<br />It stays inside the sentence.</p>
<p>Block = new line<br />Inline = same line</p>
<p>That’s the simplest rule.</p>
<h3 id="heading-block-vs-inline-elements-quick-comparison">Block vs Inline Elements (Quick Comparison)</h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Feature</td><td>Block Elements</td><td>Inline Elements</td></tr>
</thead>
<tbody>
<tr>
<td>New line</td><td>Always start on a new line</td><td>Stay in the same line</td></tr>
<tr>
<td>Width</td><td>Take the full available width</td><td>Take only the required width</td></tr>
<tr>
<td>Layout behavior</td><td>Stack vertically</td><td>Flow inside text</td></tr>
<tr>
<td>Can contain</td><td>Other block or inline elements</td><td>Usually, only text or inline elements</td></tr>
<tr>
<td>Common examples</td><td><code>&lt;div&gt;</code>, <code>&lt;p&gt;</code>, <code>&lt;h1&gt;</code></td><td><code>&lt;span&gt;</code>, <code>&lt;a&gt;</code>, <code>&lt;strong&gt;</code></td></tr>
</tbody>
</table>
</div><h2 id="heading-7-commonly-used-html-tags">7. Commonly used HTML tags</h2>
<p>We don’t need to learn all HTML tags at once.<br />Even experienced developers use only a small set of tags in daily work.</p>
<p>Once you understand these basic tags, you can already build most simple websites.</p>
<h3 id="heading-for-headings-titles-and-subtitles">For headings (titles and subtitles)</h3>
<p>Headings are used to define important titles on a webpage.</p>
<p>The most commonly used heading tags are <code>&lt;h1&gt; to &lt;h6&gt;</code></p>
<p><code>&lt;h1&gt;</code> is the main heading of the page,<br />and <code>&lt;h6&gt;</code> is the smallest heading.</p>
<p>They help both users and search engines understand the structure of your content.</p>
<h3 id="heading-for-text-or-content">For text or content</h3>
<p>These tags are used to write normal content.</p>
<p>The most commonly used ones are <code>&lt;p&gt;,&lt;span&gt;</code></p>
<p><code>&lt;p&gt;</code> is used for paragraphs.<br /><code>&lt;span&gt;</code> is used for small inline text inside a sentence.</p>
<p>Most written content on the web lives inside these two tags.</p>
<h3 id="heading-for-layout-and-grouping">For layout and grouping</h3>
<p>These tags are used to group content together.</p>
<p>The most commonly used layout tags are <code>&lt;div&gt; and &lt;section&gt;</code></p>
<p>They don’t add meaning on their own, but they help organize the page's structure. Think of them as containers for other elements.</p>
<h3 id="heading-for-links-and-images">For links and images</h3>
<p>These tags are used for interaction and media.</p>
<p>The most commonly used ones are <code>&lt;a&gt; and &lt;img&gt;</code></p>
<p><code>&lt;a&gt;</code> is used to create links.<br /><code>&lt;img&gt;</code> is used to show images.</p>
<p>Almost every website uses these two tags.</p>
<h3 id="heading-why-are-these-tags-enough">Why are these tags enough?</h3>
<p>Using just these basic tags, we can already build:</p>
<ul>
<li><p>simple websites</p>
</li>
<li><p>blogs</p>
</li>
<li><p>landing pages</p>
</li>
</ul>
<p>Everything else in HTML is mostly just variations or extensions of these core ideas.</p>
]]></content:encoded></item><item><title><![CDATA[DNS Record Types Explained]]></title><description><![CDATA[When you type a website like www.google.com into your browser, have you ever wondered how your computer knows where that website actually exists? After all, the internet does not understand human-friendly names. It only understands numbers called IP ...]]></description><link>https://sudhanshutalan.in/dns-record-types-explained</link><guid isPermaLink="true">https://sudhanshutalan.in/dns-record-types-explained</guid><category><![CDATA[dns-records]]></category><category><![CDATA[DNS Record Types]]></category><category><![CDATA[ChaiCode]]></category><category><![CDATA[WebDevCohort2026]]></category><category><![CDATA[networking]]></category><dc:creator><![CDATA[SUDHANSHU KR TALAN]]></dc:creator><pubDate>Fri, 23 Jan 2026 15:58:12 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769183412708/8ca07d68-386c-40e5-b305-9941eabfb6cc.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When you type a website like <a target="_blank" href="http://www.google.com"><code>www.google.com</code></a> into your browser, have you ever wondered how your computer knows where that website actually exists? After all, the internet does not understand human-friendly names. It only understands numbers called IP addresses.</p>
<p>This is where <strong>DNS (Domain Name System)</strong> comes in. DNS acts as the <strong>phonebook of the internet</strong>. Just like a phonebook helps you find someone’s phone number using their name, DNS helps your computer find the correct IP address using a domain name.</p>
<p>Without DNS, you would need to remember long numeric addresses like <code>142.250.190.78</code> instead of simple names like <a target="_blank" href="http://google.com"><code>google.com</code></a>. DNS exists purely to make the internet usable for humans.</p>
<h2 id="heading-why-dns-records-are-needed">Why DNS Records Are Needed</h2>
<p>DNS is not a single database. Instead, it works as a global, distributed system made up of millions of servers across the world. Each of these servers stores small pieces of information known as <strong>DNS records</strong>.</p>
<p>These records exist to answer very specific questions, such as:</p>
<ul>
<li><p>Where is this website actually hosted?</p>
</li>
<li><p>Which server is responsible for handling emails for this domain?</p>
</li>
<li><p>Is this domain really owned by the organisation it claims to represent?</p>
</li>
<li><p>Has this domain been verified for services like Google or Microsoft?</p>
</li>
</ul>
<p>You can think of DNS records as instruction tags attached to your domain name. Each tag tells the internet something important about how your domain should be located, verified, or used. Together, they ensure that websites load correctly, emails reach the right inbox, and online services can trust your domain.</p>
<h2 id="heading-what-is-an-ns-record-who-is-responsible-for-a-domain">What Is an NS Record? (Who Is Responsible for a Domain)</h2>
<p>The <strong>NS (Name Server) record</strong> answers one of the most important questions in DNS:<br /><strong>“Who is responsible for this domain?”</strong></p>
<p>Whenever someone tries to access your domain, the DNS system first looks at the NS record. This record tells the internet which DNS servers are authorised to provide information about your domain. In simple terms, it defines where all other DNS queries for your domain should be directed.</p>
<p>Without a correct NS record, your domain is essentially invisible, because the DNS system does not know which servers it should trust for answers.</p>
<h4 id="heading-real-life-analogy">Real-life analogy</h4>
<p>Think of registering a house with the city administration. The NS record is like telling the government:</p>
<blockquote>
<p>“For anything related to this property, contact this specific municipal office.”</p>
</blockquote>
<p>From that point onward, every official enquiry about your house goes to that office only.</p>
<p>In the same way, if your NS records point to providers like <strong>Cloudflare, GoDaddy, Google, or AWS</strong>, it means those companies are officially responsible for managing your domain’s DNS settings.</p>
<p>All other records, such as A records, MX records, or TXT records, are stored and managed under these name servers. So even though NS records are rarely changed, they form the foundation of your entire domain’s presence on the internet. Without them, nothing else works.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769183783320/1f7b1e67-16b5-4056-bc47-762c605b5391.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-what-is-an-a-record-domain-ipv4-address">What Is an A Record? (Domain → IPv4 Address)</h2>
<p>The <strong>A record</strong> is the most common and fundamental type of DNS record. Its main purpose is to connect a domain name to an <strong>IPv4 address</strong>, which is the actual numerical location of a server on the internet.</p>
<p><strong>Example:</strong><br />example.com → 93.184.216.34</p>
<p>This record answers the most basic and essential question:<br /><strong>“Where is this website located?”</strong></p>
<p>When someone types your domain into a browser, the DNS system uses the A record to find the exact server that hosts your website.</p>
<h3 id="heading-real-life-analogy-1">Real-life analogy</h3>
<p>Think of the A record as your home’s street address. If someone wants to visit you, this is the precise location they need. Without it, no one would know where to go.</p>
<p>Without an A record, your domain may exist, but your website cannot be reached.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769183573627/7e9b092b-355d-446b-8261-9d57a5ae20c5.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-what-is-an-aaaa-record-domain-ipv6-address">What Is an AAAA Record? (Domain → IPv6 Address)</h2>
<p>The <strong>AAAA record</strong> performs the same role as the A record, but for <strong>IPv6 addresses</strong> instead of IPv4.</p>
<p><strong>Example:</strong><br />example.com → 2606:2800:220:1:248:1893:25c8:1946</p>
<p>IPv6 was introduced because the world is gradually running out of IPv4 addresses. With billions of devices now connected to the internet, a newer and much larger addressing system was needed.</p>
<h3 id="heading-real-life-analogy-2">Real-life analogy</h3>
<p>If IPv4 is the old postal system designed for a small town, IPv6 is a modern global system built to handle entire megacities.</p>
<p>Today, many websites use both A and AAAA records so that users can connect using either system, depending on what their network supports.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769183608047/6d5d4daa-ba2f-46e3-944c-accedb51e6f7.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-what-is-a-cname-record-one-name-pointing-to-another">What Is a CNAME Record? (One Name Pointing to Another)</h2>
<p>A <strong>CNAME (Canonical Name)</strong> record does not point directly to an IP address. Instead, it points to another domain name.</p>
<p><strong>Example:</strong><br /><a target="_blank" href="http://www.example.com">www.example.com</a> → example.com</p>
<p>This simply means:<br />“Use the same destination as example.com.”</p>
<p>Whenever the main domain’s IP address changes, the CNAME automatically follows it, without requiring separate updates.</p>
<h3 id="heading-real-life-analogy-3">Real-life analogy</h3>
<p>A CNAME is like giving someone a nickname instead of a full address. Rather than repeating directions, you say:</p>
<blockquote>
<p>“Go to the main house.”</p>
</blockquote>
<p>This makes management easier, especially for subdomains and external services.</p>
<h3 id="heading-common-beginner-confusion-a-vs-cname">Common beginner confusion: A vs CNAME</h3>
<ul>
<li><p><strong>A record:</strong> Points directly to an IP address.</p>
</li>
<li><p><strong>CNAME:</strong> Points to another domain name.</p>
</li>
</ul>
<p>CNAME records are useful when you want flexibility and simplified maintenance.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769183640884/57de645b-5b9d-4074-9368-f4301b51ff59.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-what-is-an-mx-record-how-emails-find-your-mail-server">What Is an MX Record? (How Emails Find Your Mail Server)</h2>
<p>The <strong>MX (Mail Exchange)</strong> record tells the internet where emails for your domain should be delivered.</p>
<p><strong>Example:</strong><br />example.com → mail.google.com</p>
<p>This means any email sent to <em>@example.com</em> will be routed to Google’s mail servers.</p>
<h3 id="heading-real-life-analogy-4">Real-life analogy</h3>
<p>MX records work like your company’s mail department. Even if your office is located in one building, your mail might go through a different central facility before reaching you.</p>
<h3 id="heading-common-beginner-confusion-ns-vs-mx">Common beginner confusion: NS vs MX</h3>
<ul>
<li><p><strong>NS:</strong> Who manages the domain’s DNS</p>
</li>
<li><p><strong>MX:</strong> Who handles the domain’s email</p>
</li>
</ul>
<p>They solve completely different problems and serve different purposes.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769183664920/e6f2bf99-09c9-492b-b176-01f06817401a.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-what-is-a-txt-record-extra-information-and-verification">What Is a TXT Record? (Extra Information and Verification)</h2>
<p>A <strong>TXT record</strong> stores plain text information. It is commonly used for:</p>
<ul>
<li><p>Domain ownership verification</p>
</li>
<li><p>Email security (SPF, DKIM, DMARC)</p>
</li>
<li><p>Service integrations (Google, Microsoft, Stripe, etc.)</p>
</li>
</ul>
<p><strong>Example:</strong><br />"google-site-verification=abc123"</p>
<h3 id="heading-real-life-analogy-5">Real-life analogy</h3>
<p>TXT records are like official notices pinned on your office door, saying:</p>
<blockquote>
<p>“Yes, this business is genuine.”<br />“Yes, this service is authorised.”</p>
</blockquote>
<p>They do not route traffic directly, but they play a crucial role in trust, security, and authentication.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769183693397/7acc772d-4c25-41e5-a5c2-7e10363de6fe.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-how-all-dns-records-work-together-for-one-website">How All DNS Records Work Together for One Website</h2>
<p>Let’s take a practical example: <strong>example.com</strong></p>
<p>When someone visits your website or sends you an email, this is what happens behind the scenes:</p>
<p><strong>NS Record</strong><br />Identifies which DNS provider is responsible for the domain.</p>
<p><strong>A / AAAA Record</strong><br />Locates the actual server where the website is hosted.</p>
<p><strong>CNAME Record</strong><br />Handles aliases like <em>www</em> or other subdomains.</p>
<p><strong>MX Record</strong><br />Ensures all emails are delivered to the correct mail server.</p>
<p><strong>TXT Record</strong><br />Verifies domain ownership and strengthens security.</p>
<p>Together, these records form the complete identity of your domain. They make sure your website loads correctly, your emails reach the right inbox, and external services can trust and verify your domain. In simple terms, DNS records work as a coordinated system that allows your domain to function smoothly across the entire internet.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769183716589/6aaad5db-0eed-4207-9f28-14d5eaaf14fb.png" alt class="image--center mx-auto" /></p>
]]></content:encoded></item><item><title><![CDATA[Understanding Network Devices]]></title><description><![CDATA[When we use the internet, it often feels almost magical that everything we need is available within a few clicks. However, behind this apparent simplicity lies a highly complex system and an entire machinery working silently in the background. Even t...]]></description><link>https://sudhanshutalan.in/understanding-network-devices</link><guid isPermaLink="true">https://sudhanshutalan.in/understanding-network-devices</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[networking]]></category><category><![CDATA[Programming Blogs]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[SUDHANSHU KR TALAN]]></dc:creator><pubDate>Thu, 22 Jan 2026 15:50:01 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769096816807/6c25eba1-a3a2-4e39-a4e0-da04737a1ca1.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When we use the internet, it often feels almost magical that everything we need is available within a few clicks. However, behind this apparent simplicity lies a highly complex system and an entire machinery working silently in the background. Even the most basic online action depends on a carefully coordinated interaction among multiple technologies that work together to deliver seamless connectivity.</p>
<p>At the foundation of the internet is a massive physical infrastructure responsible for moving data across the globe. This infrastructure, commonly referred to as the <em>backbone of the internet</em>, is made up of high-capacity fiber-optic cables and a wide range of networking devices such as routers, modems, switches, and hubs. In this article, we will explore these core internet components in detail and understand how they collectively power the digital experiences we rely on every day.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769096129471/a468e23d-68a5-4904-8d46-8e43da7eacdb.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-1-what-is-a-modem-and-how-does-it-connect-your-network-to-the-internet">1. What is a Modem and How Does It Connect Your Network to the Internet?</h2>
<p>The term <em>modem</em> stands for Modulator–Demodulator. It is a fundamental networking device that connects your home or office network to your Internet Service Provider (ISP). In simple terms, the modem acts as the gateway between your private network and the public internet. Without a modem, your devices would have no way to communicate beyond the boundaries of your local network.</p>
<p>At a technical level, the modem’s primary responsibility is signal conversion. Your computer and router generate digital data, but this data cannot travel directly over the physical medium used by your ISP, such as fiber cables, coaxial lines, or telephone wires. The modem solves this problem by converting (modulating) your digital data into signals that can travel across the ISP’s infrastructure, and then converting (demodulating) incoming signals back into digital data that your devices can understand.</p>
<p>A helpful way to think about a modem is as a translator between two different languages. Your internal network speaks in pure digital terms, while your ISP’s network uses a different transmission format depending on the technology involved. The modem ensures that both sides can communicate smoothly, even though they operate using different signaling methods. In this sense, the modem truly represents the entry point of the internet into your network, silently enabling every website you load, message you send, and video you stream.</p>
<h2 id="heading-2-what-is-a-router-and-how-does-it-direct-traffic">2. What is a Router and How Does It Direct Traffic?</h2>
<p>A router is a core networking device responsible for forwarding data packets between different networks. Its primary role is to determine the most appropriate path for data to travel so that it reaches the correct destination. In practical terms, the router allows multiple devices, such as laptops, smartphones, and smart TVs, to share a single internet connection efficiently and reliably.</p>
<p>At a structural level, a router connects two distinct network domains. On one side is your Local Area Network (LAN), which includes all the devices within your home or office. On the other side is the Wide Area Network (WAN), which represents the broader internet. The router sits between these two environments and manages the flow of traffic using a process known as routing, where each packet is inspected and forwarded based on its destination IP address.</p>
<p>If the modem can be thought of as a translator that brings internet signals into your network, then the router functions as a traffic controller for your digital environment. While the modem establishes the connection, the router decides which device should receive which data. Every video stream, file download, and online meeting depends on the router’s ability to intelligently distribute traffic across your network without collisions or confusion.</p>
<h2 id="heading-3-switch-vs-hub-how-local-networks-actually-work">3. Switch vs Hub: How Local Networks Actually Work</h2>
<p>Once the router determines that a data packet belongs to your Local Area Network (LAN), the task of delivering that packet shifts to the devices responsible for building the internal network, namely the hub and the switch. At first glance, these devices look almost identical: small boxes with multiple Ethernet ports. However, despite their similar appearance, they operate using very different principles and offer drastically different levels of efficiency and intelligence.</p>
<h3 id="heading-the-hub-the-legacy-broadcaster-osi-layer-1">The Hub: The Legacy Broadcaster (OSI Layer 1)</h3>
<p>A hub is a passive networking device that operates at the Physical Layer (Layer 1) of the OSI model. It has no awareness of the devices connected to it and does not store or analyze any addressing information. Essentially, a hub functions as a multi-port repeater. When it receives a data signal on one port, it simply broadcasts that signal to all other ports, regardless of the intended destination.</p>
<p>Because of this behavior, hubs create a single shared communication space. Every connected device sees all traffic, and only one device can successfully transmit data at a time. This leads to frequent collisions and significant performance limitations, which is why hubs are now considered obsolete in modern networks.</p>
<h3 id="heading-the-switch-the-intelligent-director-osi-layer-2">The Switch: The Intelligent Director (OSI Layer 2)</h3>
<p>A switch is an active device that operates at the Data Link Layer (Layer 2) and introduces intelligence into the network. Unlike a hub, a switch understands which device is connected to which port. It does this by examining the MAC address, the unique physical identifier of each network interface.</p>
<p>Over time, the switch builds a dynamic internal database known as a MAC Address Table, which maps each MAC address to a specific port. When a data frame arrives, the switch consults this table and forwards the frame only to the port associated with the destination device.</p>
<p>This results in precision delivery. If Computer B is connected to Port 2, the switch sends the data directly to Port 2 and nowhere else. Other devices on the network never see this traffic. Each connection becomes isolated, allowing multiple conversations to occur simultaneously without interference.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769096155142/1debe2af-41ce-4856-9af5-4ce0caae3a75.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-why-switches-are-superior">Why Switches Are Superior</h3>
<p>This isolation technique is known as micro-segmentation. Each switch port becomes its own collision domain, enabling full-duplex communication, where devices can send and receive data at the same time. The result is higher performance, better security, and far more efficient use of network bandwidth.</p>
<h3 id="heading-the-real-world-analogy">The Real-World Analogy</h3>
<p>A hub is like someone using a megaphone in a crowded room. If they want to tell Bob something, they shout his name, and everyone hears the message. While this happens, no one else can speak without causing chaos.</p>
<p>A switch, on the other hand, is like a private telephone system. If you want to talk to Bob, the system connects you directly to his line. Your conversation remains private, and at the same time, others can hold their own conversations without interruption.</p>
<h3 id="heading-why-this-matters-for-software-engineers">Why This Matters for Software Engineers</h3>
<p>Although hubs are rarely used today, understanding their behavior highlights an important concept in networking. On a hub-based network, packet sniffing is trivial, so that any device can see all traffic just by listening. On a switched network, however, devices only receive packets specifically addressed to them. This makes traffic analysis, debugging, and security auditing more controlled and significantly more complex.</p>
<p>For engineers, this distinction explains why modern network monitoring tools must rely on techniques such as port mirroring, network taps, or logging at higher layers rather than simple passive listening.</p>
<h2 id="heading-4-the-firewall-the-perimeter-security-enforcer">4. The Firewall: The Perimeter Security Enforcer</h2>
<p>If the router is the traffic director, the Firewall is the border control agency. In a network architecture, "security lives here" because the firewall represents the decisive boundary between the <strong>Trusted Zone</strong> (your internal network) and the Untrusted Zone (the public internet).</p>
<p>It is a security system (which can be hardware, software, or both) that monitors and controls incoming and outgoing network traffic based on predetermined security rules.</p>
<h3 id="heading-the-core-mechanism-access-control-lists-acls">The Core Mechanism: Access Control Lists (ACLs)</h3>
<p>At its simplest level, a firewall operates by strictly enforcing an Access Control List (ACL). It inspects the "header" of every data packet, specifically the 5-Tuple information, to determine whether to allow or drop the traffic.</p>
<p>The 5-Tuple consists of:</p>
<ol>
<li><p><strong>Source IP:</strong> Where is it coming from?</p>
</li>
<li><p><strong>Destination IP:</strong> Where is it going?</p>
</li>
<li><p><strong>Source Port:</strong> Which application sent it?</p>
</li>
<li><p><strong>Destination Port:</strong> Which service is it trying to reach?</p>
</li>
<li><p><strong>Protocol:</strong> Is it TCP, UDP, or ICMP?</p>
</li>
</ol>
<h3 id="heading-why-security-lives-here-the-principle-of-least-privilege">Why Security Lives Here: The Principle of Least Privilege</h3>
<p>The firewall enforces the security model known as <strong>"Default Deny."</strong> In a secure environment, the firewall is configured to block <em>everything</em> by default, and administrators manually "punch holes" (allow rules) only for necessary traffic.</p>
<ul>
<li><p><strong>Ingress Filtering (Incoming):</strong> Prevents external threat actors from initiating connections to your internal devices. For example, it may allow traffic on Port 443 (HTTPS) to enable secure web access for users, while blocking Port 3389 (RDP) to prevent unauthorized remote desktop access.</p>
</li>
<li><p><strong>Egress Filtering (Outgoing):</strong> Often overlooked but critically important. If a server in your network becomes infected with malware, the firewall can stop it from “phoning home” to a Command and Control (C2) server by blocking unauthorized outbound connections.</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769096203258/a49f5f50-3b36-4a93-9732-fb5a78efc720.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-the-real-world-analogy-1">The Real-World Analogy</h3>
<p>A firewall can be best understood by thinking of it as a security checkpoint at an airport. Just as passengers are not allowed to proceed without a valid boarding pass and a confirmed gate, network traffic is only permitted if it is coming from an authorized source and is targeting an approved port. Even then, access is not guaranteed. Much like airport security inspects luggage, modern firewalls, especially Next-Generation Firewalls (NGFW), go a step further by performing Deep Packet Inspection (DPI). This means they do not merely check where the traffic is coming from, but also examine the actual data being transmitted to detect potential threats such as malware or malicious payloads.</p>
<h1 id="heading-5-the-load-balancer-the-architect-of-scale">5. The Load Balancer: The Architect of Scale</h1>
<p>In the initial phase of an application’s lifecycle, a single server is usually enough to manage incoming requests. However, as the number of users increases, that same server gradually turns into a performance bottleneck and a potential single point of failure. This is where the Load Balancer becomes an essential component of system architecture.</p>
<p>A Load Balancer is a piece of hardware or software that operates as a reverse proxy, intelligently distributing incoming traffic across multiple backend servers. Its primary purpose is to improve both the capacity of the system by supporting more concurrent users and its reliability, by ensuring the application remains available even if individual servers fail.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769096216523/d9aaeb0f-1411-4ae2-b24a-bf41229196df.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-why-scalable-systems-need-it">Why Scalable Systems Need It</h3>
<p>Scalability generally occurs through one of two approaches. The first is vertical scaling, where additional CPU, memory, or storage is added to a single machine. While this may work initially, it has clear physical limits and quickly becomes costly. The second approach is horizontal scaling, which involves adding more servers to handle the load. This method is far more flexible and practically unlimited, but it introduces an important question: how does the system decide which server should handle each incoming request?</p>
<p>The Load Balancer addresses this challenge directly. Positioned between users and the pool of servers, it ensures that traffic is evenly distributed so that no single server becomes overloaded, thereby maintaining consistent performance across the system.</p>
<h3 id="heading-the-real-world-analogy-2">The Real-World Analogy</h3>
<p>A useful way to understand a Load Balancer is to compare it to a host at a busy restaurant. Without a host, customers might seat themselves randomly, leaving some waiters overwhelmed while others remain underutilized. The host solves this by managing the flow of guests, directing each person to a waiter who has available capacity. Similarly, a Load Balancer keeps track of which servers are free and which are busy, and routes requests accordingly. If one server goes offline, the Load Balancer simply stops sending traffic to it, ensuring that users experience little to no disruption.</p>
<h2 id="heading-6-putting-it-all-together-the-lifecycle-of-a-web-request">6. Putting It All Together: The Lifecycle of a Web Request</h2>
<p>To truly understand how networking components work together, it helps to follow a real-world scenario from start to finish. Consider a simple action: a user at home clicks the “Checkout” button on a popular e-commerce website. Behind this single click is a carefully coordinated journey that spans multiple layers of infrastructure, from the user’s local network to the company’s data center and back again. This journey connects the User’s Edge, the home network, with the Application’s Edge, the server infrastructure powering the website.</p>
<h3 id="heading-phase-1-the-users-edge-exit-point">Phase 1: The User’s Edge (Exit Point)</h3>
<p>The process begins the moment the user clicks “Checkout.” The laptop sends the request to the home router, which identifies that the destination lies outside the local network. The router then applies Network Address Translation (NAT), replacing the private IP address with the home’s public IP, and forwards the packet toward the internet. The modem receives this digital signal and converts it into a format compatible with the internet service provider’s physical medium, such as fiber or coaxial cable, before sending it into the broader internet.</p>
<h3 id="heading-phase-2-the-data-center-entry-security-layer">Phase 2: The Data Center Entry (Security Layer)</h3>
<p>After traveling across multiple networks, the request reaches the company’s data center. The first components it encounters are the gateway and firewall, which act as the system’s security checkpoint. The firewall inspects the incoming traffic, verifying that it is using an allowed port (such as HTTPS on Port 443) and that the source is not flagged as malicious. Only after passing these checks is the request permitted to enter the internal network.</p>
<h3 id="heading-phase-3-the-distribution-layer-scalability">Phase 3: The Distribution Layer (Scalability)</h3>
<p>Since the website serves thousands or even millions of users, a single server cannot handle all the traffic. Instead, the request is routed to a load balancer. The load balancer evaluates the current state of all available backend servers and selects the one with the lowest load or best performance at that moment. It then forwards the request to that specific server, ensuring traffic is distributed efficiently and fairly.</p>
<h3 id="heading-phase-4-the-internal-transport-precision-routing">Phase 4: The Internal Transport (Precision Routing)</h3>
<p>Inside the data center, the request reaches a network switch. The switch reads the packet’s hardware address and forwards it only to the correct physical server, rather than broadcasting it across the entire network. This targeted delivery ensures high-speed communication without unnecessary network congestion.</p>
<h3 id="heading-phase-5-the-application-and-return-path">Phase 5: The Application and Return Path</h3>
<p>The selected server processes the request by executing backend logic, interacting with databases, and generating a response. Once the task is complete, the response travels back through the same chain in reverse—through the switch, load balancer, firewall, internet, modem, router, and finally back to the user’s device, where the confirmation appears on the screen.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769096230681/abaeff85-3ccf-4e66-b5da-866cd001d179.png" alt class="image--center mx-auto" /></p>
]]></content:encoded></item></channel></rss>