<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tanvi Gunjal on Medium]]></title>
        <description><![CDATA[Stories by Tanvi Gunjal on Medium]]></description>
        <link>https://medium.com/@tanvi.gunjal22?source=rss-695fd04ae7ae------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*fK7CD9GN3NavT-SxusMyBw.jpeg</url>
            <title>Stories by Tanvi Gunjal on Medium</title>
            <link>https://medium.com/@tanvi.gunjal22?source=rss-695fd04ae7ae------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 20:29:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tanvi.gunjal22/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A Question That Stayed With Me]]></title>
            <link>https://medium.com/@tanvi.gunjal22/a-question-that-stayed-with-me-4185e718dcf8?source=rss-695fd04ae7ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/4185e718dcf8</guid>
            <category><![CDATA[children]]></category>
            <category><![CDATA[adulthood]]></category>
            <category><![CDATA[society]]></category>
            <category><![CDATA[motherhood]]></category>
            <category><![CDATA[mental-health]]></category>
            <dc:creator><![CDATA[Tanvi Gunjal]]></dc:creator>
            <pubDate>Wed, 15 Jul 2026 11:15:13 GMT</pubDate>
            <atom:updated>2026-07-15T11:15:13.804Z</atom:updated>
            <content:encoded><![CDATA[<h4>Sometimes the hardest questions aren’t the ones in the exam.</h4><p>I was preparing for my IELTS writing test when I came across a question about;</p><blockquote>Why more couples in Western countries are choosing not to have children?</blockquote><p>At first, I thought, “Easy enough.” Then I started thinking about it after I closed the book. And honestly, the more I thought about it, the less it felt like an IELTS question. It felt like one of those conversations people keep having without ever talking about the actual issue.</p><p>Everyone has an opinion on whether people should have children. Parents, relatives, neighbors, politicians, strangers on the internet—everyone. But when I really think about it, I don’t understand why society feels so entitled to have an opinion about someone else’s decision to become a parent.</p><p>A couple choosing not to have children isn’t a tragedy. It isn’t selfish. It isn’t the end of society. It’s just…a choice.</p><p>People love saying that children make a home complete. That they strengthen relationships. That they give life purpose. And maybe they do. I’m not denying that.</p><p>But why does the conversation almost always stop there?</p><p>Why don’t we talk with the same enthusiasm about childcare expenses, education, healthcare, sleepless nights, postpartum depression, unequal parenting, career breaks, or the fact that some families still expect one person to quietly sacrifice more than the other?</p><p>For some reason, the beautiful parts of parenthood are everyone’s favourite topic. The difficult parts are treated like fine print.</p><p>The more I think about it, the more I realise that becoming a parent isn’t just a relationship decision. Pregnancy, for the person carrying the child, is a complete transformation of the body and, in many cases, of life itself.</p><p>People casually ask, “So when are you having kids?” as if they’re asking what you’re having for dinner.</p><p>They’re not.</p><p>They’re asking someone if they’re willing to put their body through pregnancy, childbirth, recovery, hormonal changes, possible complications, years of caregiving, and a life that may never look the same again.</p><p>That isn’t a casual question.</p><p>Which is why I’ve never understood why so many people think they deserve an opinion on it.</p><p>If a pregnancy is going to happen inside one person’s body, then that person’s voice has to matter the most. A loving relationship should absolutely involve honest conversations, shared dreams, and mutual respect. Parenthood itself is a shared responsibility. But pregnancy isn’t equally experienced. One partner doesn’t risk their body in the same way the other does. That’s simply reality.</p><p>And somehow, we still expect the person carrying all of that to justify whatever decision they make.</p><p>If they want children, people ask whether they’ve thought about their career.</p><p>If they don’t want children, people ask who’s going to continue the family name, who’s going to take care of them when they’re old, or whether they’ll “change their mind.”</p><p>It’s interesting how rarely anyone asks a much simpler question:</p><p><em>“What do you actually want?”</em></p><p>I also think my generation approaches parenthood differently because we’ve grown up with access to more information than ever before. We read about fertility disorders, reproductive healthcare, mental health, financial stress, relationship dynamics, climate anxiety, and changing workplaces. We see both happy families and exhausted parents. We hear stories that previous generations often kept private.</p><p>No, we don’t know everything. No generation does.</p><p>But we do know enough to understand that bringing another human being into the world isn’t something you do because everyone else expects you to.</p><p>I’ve heard people say that children are an investment. Honestly, I don’t think that’s fair to either parents or children. Children aren’t investments. They’re people. They don’t owe their parents grandchildren, financial support, or repayment for being born.</p><p>And women don’t owe society motherhood simply because they’re capable of pregnancy.</p><p>Maybe that’s the part I struggle with the most.</p><p>For centuries, motherhood has been treated less like a choice and more like a role women naturally grow into. But being able to become pregnant doesn’t mean someone must become a parent. Biology explains what a body <em>can</em> do. It doesn’t decide what a person <em>should</em> do.</p><p>Whether someone dreams of raising children or never wants them at all, both decisions deserve the same amount of respect.</p><p>Because parenthood should begin with a genuine “yes,” not with pressure, guilt, expectations, or fear of disappointing everyone else.</p><p>And if that “yes” never comes, that’s okay too.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4185e718dcf8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Inside WAFL: How ONTAP Actually Lays Out and Writes Data.]]></title>
            <link>https://medium.com/@tanvi.gunjal22/inside-wafl-how-ontap-actually-lays-out-and-writes-data-9b937f148370?source=rss-695fd04ae7ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b937f148370</guid>
            <category><![CDATA[backup]]></category>
            <category><![CDATA[cloud-storage]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[ontap]]></category>
            <dc:creator><![CDATA[Tanvi Gunjal]]></dc:creator>
            <pubDate>Fri, 10 Jul 2026 16:20:30 GMT</pubDate>
            <atom:updated>2026-07-10T16:20:30.199Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Part 2 of Inside NetApp ONTAP Storage</em></p><p>~ <a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a> and <a href="https://medium.com/u/159f75f3e603">Kanishka Vishwasrao</a></p><p>In Part 1, we stopped at a simple question:</p><p><strong>A host writes data to a LUN. Where does that data actually go?</strong></p><p>So, instead of looking at WAFL as another collection of storage concepts, let us follow one write.</p><p>Imagine an application changes a block of data.</p><p>From the host’s perspective, nothing unusual happens. It sees a disk, sends a block write over iSCSI or Fibre Channel, and waits for ONTAP to confirm that the write is safe.</p><p>The host’s version of the story is remarkably short.</p><p>Host ──&gt; WRITE (Block X) ──&gt; ONTAP</p><p>Inside ONTAP, the story has only just started.</p><h3>The Write Arrives</h3><p>When ONTAP receives the write, it does not immediately wait for the physical drives to place the data in its final location.</p><p>The write is first protected in non-volatile memory. In an HA pair, the write is also protected across the controllers before ONTAP acknowledges it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/231/1*Ocka_aSGFVI7zCYdCDhARA.png" /></figure><p>For the host, the write is complete.</p><p>For WAFL, there is now a new piece of data that needs a home.</p><p>This is where <strong>Write Anywhere File Layout</strong> earns its name.</p><h3>WAFL Finds a New Home for the Data</h3><p>Suppose the previous version of the data lives in Block 101.</p><pre>Metadata ─────&gt; Block 101<br>                [ VERSION A ]</pre><p>The application has now created Version B. A traditional mental model might suggest overwriting Block 101 with the new data. WAFL does not have to do that. Instead, it can write the changed data to another available block.</p><pre>Block 101              Block 305<br>[ VERSION A ]          [ VERSION B ]</pre><p>The data has moved, but there is one small problem. The metadata still points to Block 101. So WAFL updates the reference.</p><p>Before:</p><p>Metadata ─────&gt; Block 101</p><p>After:</p><p>Metadata&#39; ────&gt; Block 305</p><p>That is the important idea behind WAFL.</p><p><strong>The new version of the data can be written elsewhere, and the metadata path changes to find it.</strong></p><p>Of course, metadata rarely exists as one convenient pointer.</p><p>WAFL organizes data through a tree of metadata blocks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*lrqZMKumcuVqyCqB0FZa_A.png" /></figure><p>If Data B changes, the metadata pointing to Data B changes too. If that metadata block has a parent, the change can continue upwards through the tree. One changed block can therefore leave a small trail of updated metadata behind it. WAFL now has the new data and the metadata required to reach it. The next task is to make this a consistent on-disk state.</p><h3>The Consistency Point</h3><p>WAFL does not treat every incoming write as a separate disk transaction.</p><p>Instead, changed data and metadata are collected and written as part of a <strong>consistency point</strong>, or CP. Think of the write we have been following.</p><p>WAFL has:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/210/1*0RhxSvl52wOe0PmHTDkIcA.png" /></figure><p>During a consistency point, the changed blocks are written first. WAFL then commits the updated root, representing the new file-system state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/215/1*3AdXilv86ypJLtbyhBOSQA.png" /></figure><p>The order matters.</p><p>When the new root is committed, it points to a complete set of data and metadata representing a consistent state. Our single block write has now found its physical storage, updated its metadata path, and become part of a new WAFL consistency point. But the old Block 101 is still sitting there.</p><p>And that is where snapshots become interesting.</p><h3>The Old Block Has Not Disappeared Yet</h3><p>Imagine a snapshot was created before our application changed the data.</p><p>At that moment, both the active file system and the snapshot referenced Block 101.</p><pre>Active ────────┐<br>               ├────&gt; Block 101 [ VERSION A ]<br>Snapshot ──────┘</pre><p>Then our write arrived. WAFL placed Version B in Block 305 and updated the active metadata.</p><p>Active ───&gt; Block 305 [ VERSION B ]</p><p>Snapshot ───&gt; Block 101 [ VERSION A ]</p><p>The snapshot does not need a complete copy of the volume.</p><p>It simply continues to reference the blocks that represented the earlier consistent state. Unchanged blocks can still be shared between the active file system and the snapshot. Only as data changes do their references begin to diverge. This is why ONTAP snapshots are closely tied to WAFL’s data layout. The snapshot is not asking WAFL to duplicate everything.</p><p>It is effectively saying:</p><p><strong>“Keep the path to the version I saw.”</strong></p><h3>One Write, Two Perspectives</h3><p>Our write has finally completed its journey.</p><p>The host saw this:</p><p>WRITE Block X ───&gt; ACK</p><p>WAFL saw this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/177/1*a_kwPoyix4Owy1ugplULmQ.png" /></figure><p>The host thinks it changed a block on a disk.</p><p>WAFL created a new data block, adjusted a metadata tree, committed a new consistent file-system state, and potentially preserved the old version for a snapshot.</p><p>Both views are correct. One is simply having a much quieter day.</p><p>And that, in many ways, is the purpose of ONTAP’s storage architecture: <strong>keep the complexity inside the storage system while presenting something predictable to the host.</strong></p><p>Aggregates and volumes organize the storage. LUNs present it.</p><p>WAFL handles the complicated part when the data actually starts moving.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b937f148370" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How NetApp ONTAP Organizes Storage: Aggregates, Volumes, and LUNs]]></title>
            <link>https://medium.com/@tanvi.gunjal22/how-netapp-ontap-organizes-storage-aggregates-volumes-and-luns-b509f8b6b3bb?source=rss-695fd04ae7ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/b509f8b6b3bb</guid>
            <category><![CDATA[netapp]]></category>
            <category><![CDATA[backup]]></category>
            <category><![CDATA[cloud-storage]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Tanvi Gunjal]]></dc:creator>
            <pubDate>Thu, 09 Jul 2026 12:29:38 GMT</pubDate>
            <atom:updated>2026-07-09T12:29:38.306Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Part 1 of Inside NetApp ONTAP Storage</em></h4><p>~ <a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a> and <a href="https://medium.com/u/159f75f3e603">Kanishka Vishwasrao</a></p><p>When working with NetApp ONTAP, three terms appear almost immediately: <strong>aggregates, volumes, and LUNs</strong>.</p><p>The standard explanation is straightforward:</p><p><strong>Disks form aggregates. Aggregates host volumes. Volumes contain LUNs.</strong></p><p>Technically, that is correct.</p><p>However, it does not explain why ONTAP separates storage into these layers or what responsibility each layer carries.</p><p>For an engineer working with storage, the more useful question is not simply <em>“What is an aggregate?”</em></p><p>It is:</p><p><strong>What role does each storage layer play between physical capacity and the host consuming it?</strong></p><p>Understanding that separation is the first step towards understanding how ONTAP manages data.</p><h3>The ONTAP Storage Hierarchy</h3><p>At a high level, block storage in ONTAP can be represented as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/187/1*RKvTHDn_Hfc0Cm-Y1_F_rg.png" /></figure><p>Each layer has a specific responsibility.</p><p>The <strong>physical drives</strong> provide raw capacity.</p><p>The <strong>aggregate</strong>, also referred to as a local tier in current ONTAP terminology, combines physical storage into a protected storage pool.</p><p>A <strong>FlexVol volume</strong> creates a logical storage container using capacity from that pool.</p><p>A <strong>LUN</strong> presents block storage to a host.</p><p>The hierarchy separates physical storage management from the storage consumed by applications. The rest of this article focuses on what each of these layers contributes to that design.</p><h3>Aggregates: Building the Physical Storage Pool</h3><p>An <strong>aggregate</strong> is a collection of physical storage managed by an ONTAP node. The underlying drives are organised into RAID groups to provide data protection.</p><p>A simplified aggregate might look like this:</p><pre>Aggregate: aggr1<br>        ┌─────────────────────────────────┐<br>        │                                 │<br>        │   RAID Group 1                  │<br>        │   [SSD] [SSD] [SSD] [SSD]       │<br>        │                                 │<br>        │   RAID Group 2                  │<br>        │   [SSD] [SSD] [SSD] [SSD]       │<br>        │                                 │<br>        └─────────────────────────────────┘</pre><p>The aggregate converts a set of physical drives into a usable storage pool.</p><p>Applications do not normally consume storage directly from this pool. Instead, its capacity is made available to logical storage objects.</p><p>This distinction becomes important when multiple workloads share the same storage system.</p><p>A database, a virtualisation environment, and an application logging platform may have completely different capacity and operational requirements. Assigning dedicated physical drives to every workload would make capacity planning rigid and difficult to scale.</p><p>Aggregates provide a shared physical foundation while allowing ONTAP to manage logical storage independently.</p><p>In practical terms, the aggregate answers one infrastructure question:</p><p><strong>Where does the physical capacity come from?</strong></p><h3>FlexVol Volumes: Creating Logical Storage Boundaries</h3><p>A <strong>FlexVol volume</strong> is a logical storage container created using capacity from an aggregate.</p><p>Suppose an aggregate provides 20 TB of usable capacity. ONTAP can create multiple volumes for different workloads:</p><pre>vol_database     5 TB<br>vol_vmware       8 TB<br>vol_logs         2 TB<br>vol_backup       3 TB</pre><p>At first glance, this may look similar to partitioning a disk.</p><p>The underlying model is different.</p><p>A FlexVol volume is not permanently associated with a fixed physical region of a particular drive. The logical storage represented by the volume is separated from the physical placement of its data.</p><p>This allows multiple workloads to share physical capacity while retaining their own logical boundaries.</p><p>For example, a database volume may require frequent snapshots and strict performance controls. A log volume may experience rapid capacity growth and use a shorter retention policy. A backup volume may prioritize storage efficiency and longer retention.</p><p>These workloads can be managed as separate volumes without requiring an independent physical storage pool for each one.</p><p>This is where the <strong>Flex</strong> in FlexVol becomes relevant. The volume acts as a logical abstraction rather than a fixed physical partition.</p><h3>Thin Provisioning and Logical Capacity</h3><p>The separation between logical and physical storage also enables <strong>thin provisioning</strong>.</p><p>Consider a storage pool with 10 TB of physical capacity.</p><p>An administrator might configure:</p><pre>vol_app1      4 TB<br>vol_app2      4 TB<br>vol_app3      4 TB<br><br>Total Logical Capacity: 12 TB<br>Physical Capacity:      10 TB</pre><p>The configured logical capacity is larger than the physical capacity available.</p><p>ONTAP has not discovered an additional 2 TB hidden somewhere in the chassis.</p><p>With thin provisioning, physical capacity is consumed as data is actually written.</p><p>For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*BHYsqE35VFpaST5rChztaw.png" /></figure><p>From the workload’s perspective, the configured capacity is available.</p><p>From the storage system’s perspective, only consumed storage requires physical capacity.</p><p>This improves storage utilisation, particularly when workloads reserve more capacity than they immediately use.</p><p>However, thin provisioning introduces an operational responsibility.</p><p>Logical capacity can be optimistic.</p><p>Physical capacity is considerably less interested in optimism.</p><p>Aggregate utilisation must therefore be monitored to ensure actual consumption does not exceed the available storage.</p><h3>LUNs: Presenting Block Storage to the Host</h3><p>A <strong>LUN</strong>, or Logical Unit Number, is used to present block storage to a host through SAN protocols such as iSCSI or Fibre Channel.</p><p>From the host’s perspective, the LUN appears as a block device.</p><p>A Linux server, for example, might see:</p><pre>/dev/sda      Operating System Disk<br>/dev/sdb      500 GB Application Disk</pre><p>The host can format /dev/sdb with a file system and use it like any other disk.</p><p>It does not need to understand the physical storage architecture behind the device.</p><p>It does not need information about RAID groups or individual drives.</p><p>The host simply issues block-level read and write requests.</p><p>This abstraction is important because it creates a clean boundary between the storage system and the operating system consuming the storage.</p><p>The host manages its file system.</p><p>ONTAP manages the storage behind the block device.</p><p>The LUN answers a straightforward question:</p><p><strong>What block storage does the host see?</strong></p><h3>A LUN Does Not Belong to a Single Disk</h3><p>One common misconception is that a LUN can be traced directly to a particular physical drive.</p><p>For example:</p><pre>LUN 1  ─────────&gt;  Disk 1<br>LUN 2  ─────────&gt;  Disk 2</pre><p>This is not an accurate model of ONTAP storage.</p><p>The logical storage object presented to the host is intentionally separated from the physical location of its data.</p><p>A 500 GB LUN should therefore not be imagined as a 500 GB region carved from one drive.</p><p>The blocks associated with the data are managed by ONTAP across the available protected storage.</p><p>This abstraction gives the storage system flexibility in how physical capacity is used while keeping the host-facing block device consistent.</p><p>For administrators, it also changes the way storage questions should be framed.</p><p>The question is rarely:</p><p><strong>“Which disk contains this LUN?”</strong></p><p>A more useful question is:</p><p><strong>“Which logical storage object owns the data, and which physical storage pool provides its capacity?”</strong></p><p>The difference may sound subtle, but it reflects the way ONTAP separates logical storage from physical data placement.</p><h3>Thinking in Responsibilities, Not Just Layers</h3><p>When troubleshooting ONTAP, it is useful to associate each storage object with the responsibility it owns.</p><p>An aggregate is primarily a <strong>capacity and physical storage concern</strong>.</p><p>A volume is a <strong>logical storage and data management concern</strong>.</p><p>A LUN is a <strong>host-facing block storage concern</strong>.</p><p>This distinction helps narrow down problems.</p><p>If a host cannot access a block device, the investigation may involve LUN mapping, SAN connectivity, initiators, or host paths.</p><p>If a workload is approaching its allocated capacity, the volume becomes relevant.</p><p>If multiple workloads are competing for available physical space, aggregate capacity becomes important.</p><p>Different storage objects answer different operational questions.</p><p>Calling everything a <em>storage issue</em> may be technically correct.</p><p>It is also a very efficient way to invite three different infrastructure teams to the same troubleshooting call.</p><h3>What Happens When the Host Writes Data?</h3><p>We now understand the responsibilities of aggregates, FlexVol volumes, and LUNs.</p><p>But one important question remains.</p><p>A host sends a block write to a LUN.</p><p>ONTAP receives the request.</p><p><strong>Where is the data actually written?</strong></p><p>More importantly, when existing data changes, does ONTAP simply overwrite the block that previously stored it?</p><p>The answer lies in <strong>WAFL — Write Anywhere File Layout</strong>.</p><p>WAFL is where logical storage objects meet the mechanics of block allocation, metadata updates, consistency points, and snapshots.</p><p>That is the focus of Part 2:</p><p><strong>Inside WAFL: How ONTAP Actually Lays Out and Writes Data.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b509f8b6b3bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When Hard Drives Fail: The Mechanics of RAID-DP and RAID-TEC Rebuilds]]></title>
            <link>https://medium.com/@tanvi.gunjal22/when-hard-drives-fail-the-mechanics-of-raid-dp-and-raid-tec-rebuilds-8ba4b9220f4a?source=rss-695fd04ae7ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ba4b9220f4a</guid>
            <category><![CDATA[data-redundancy]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[storage]]></category>
            <category><![CDATA[hard-drive]]></category>
            <dc:creator><![CDATA[Tanvi Gunjal]]></dc:creator>
            <pubDate>Sun, 05 Jul 2026 08:35:02 GMT</pubDate>
            <atom:updated>2026-07-05T08:35:02.815Z</atom:updated>
            <content:encoded><![CDATA[<p>~ <a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a> and <a href="https://medium.com/u/159f75f3e603">Kanishka Vishwasrao</a></p><p>When a hard drive fails, the interesting part isn’t the failure — it’s how the storage system continues serving data while rebuilding itself.</p><p>Every storage device will eventually fail. Hard disk drives wear out because of moving mechanical components, while SSDs degrade as NAND flash cells reach their write endurance limits. Enterprise storage systems are therefore designed with a simple assumption: <strong>hardware failures are inevitable</strong>.</p><p>The challenge is not preventing failures but ensuring applications continue to operate when they occur.</p><p>This article explores how modern RAID (Redundant Array of Independent Disks) architectures evolved from traditional parity RAID to enterprise-grade protection schemes such as <strong>RAID-DP (Double Parity)</strong> and <strong>RAID-TEC (Triple Erasure Coding)</strong>, why rebuilds are one of the riskiest phases in a storage system’s lifecycle, and how modern arrays reduce rebuild stress.</p><h3>Why Drives Fail</h3><p>Hard drives contain spinning platters, actuator arms, read/write heads, motors, and bearings. Mechanical wear, vibration, heat, manufacturing defects, and power events eventually cause failures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*Fb2p7SRMTJ1qRR1E3D69RQ.png" /><figcaption>Inside of hard drive</figcaption></figure><p>SSDs remove moving parts but introduce different failure modes:</p><p>- NAND wear<br>- Controller failures<br>- Firmware bugs<br>- Power-loss corruption</p><p>For storage engineers, failure is not an exception — it is an expected operating condition.</p><h3>RAID Is Not Backup</h3><p>RAID improves <strong>availability</strong>, not backup.</p><p>Without RAID:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*zwR0eiLE2HxBzPTZ9WbFKw.png" /></figure><p>With RAID:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*siw2UhIJtF0wUMwgTKwDow.png" /></figure><p>RAID distributes data across multiple disks using striping, mirroring, and parity so the loss of one or more disks does not immediately result in data loss.</p><h3>RAID Levels at a Glance</h3><p>RAID (Redundant Array of Independent Disks) combines multiple physical drives into a single logical storage unit to improve performance, availability, or fault tolerance. Different RAID levels achieve these goals using striping, mirroring, and parity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3QrZmLLWThrEoxPs_ia5ZQ.png" /></figure><h3><strong>Why RAID 5 Is No Longer Enough</strong></h3><p>RAID 5 protects against a <strong>single disk failure</strong> using one parity block.</p><p>Years ago, rebuilding a 500 GB disk took minutes to hours.</p><p>Today, rebuilding a 20 TB drive may take many hours — or even days — depending on workload and array utilization.</p><p>During that period every surviving drive is heavily read.</p><p>This increases the probability of:</p><p>- A second disk failure<br>- Unrecoverable Read Errors (UREs)<br>- Performance degradation</p><p>This reality motivated newer protection schemes.</p><h3><strong>Understanding RAID-DP</strong></h3><p>RAID-DP extends parity protection by maintaining <strong>two independent parity calculations</strong>.</p><p>Diagram:</p><pre>Stripe 1<br>+ — — — + — — — + — — — + — — — +<br>|   D1  |   D2  |   P   |   Q   |<br>+ — — — + — — — + — — — + — — — +<br>P = First parity<br>Q = Independent second parity</pre><p>If one drive fails, parity reconstructs the missing blocks.</p><p>If a second drive fails during rebuild, the second parity still allows reconstruction.</p><p>Compared with RAID 5, RAID-DP significantly reduces the probability of catastrophic data loss during rebuild operations.</p><h3>RAID-TEC</h3><p>As capacities continued increasing, even dual parity became insufficient for very large arrays.</p><p>RAID-TEC introduces <strong>triple parity</strong>.</p><pre>+ — — — + — — — + — — — + — — — + — — — +<br>|  D1   |   D2  |   P   |   Q   |   R   |<br>+ — — — + — — — + — — — + — — — + — — — +<br>P = First parity<br>Q = Independent second parity</pre><p>The array can survive <strong>three simultaneous drive failures</strong>.</p><p>This protection targets enterprise environments containing very large disks where rebuild windows are long and the probability of cascading failures is higher.</p><h3><strong>Why Rebuilds Are Dangerous</strong></h3><p>A rebuild is one of the most I/O-intensive operations in a storage system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/229/1*di9MjR8F3y81WXrc2Yl9eg.png" /></figure><p>During rebuild:</p><p>- Every surviving drive performs continuous reads.<br>- Controllers perform parity computations.<br>- Replacement drives receive sustained writes.<br>- Application workloads compete with rebuild traffic.</p><p>Ironically, healthy disks experience their highest stress immediately after another disk has already failed.</p><h3>How Enterprise Arrays Reduce Rebuild Stress</h3><p>Modern storage arrays employ several techniques:</p><p><strong>Priority Scheduling</strong><br>Foreground application I/O is prioritized while rebuild bandwidth adapts dynamically.</p><p><strong>Distributed Spare Capacity</strong><br>Instead of waiting for a dedicated hot spare, free capacity across multiple disks can participate in parallel rebuilds.</p><p><strong>Background Scrubbing</strong><br>Arrays periodically verify stored blocks and parity to detect latent sector errors before failures occur.</p><p><strong>End-to-End Checksums</strong><br>Checksums detect silent corruption (bit rot) that parity alone cannot identify.</p><p><strong>Predictive Monitoring</strong><br>SMART telemetry, temperature trends, bad-sector counts, and SSD wear indicators enable proactive replacement before catastrophic failure.</p><h3>Putting It Together</h3><pre>Application Write<br>      │<br>      ▼<br>RAID Controller<br>      │<br>      ▼<br>Data + Parity Written<br>      │<br>      ▼<br>Drive Failure<br>      │<br>      ▼<br>Parity Reconstruction<br>      │<br>      ▼<br>Replacement Drive Added<br>      │<br>      ▼<br>Background Rebuild<br>      │<br>      ▼<br>Full Redundancy Restored</pre><h3>Final Thoughts</h3><p>Modern enterprise storage is not built around preventing hardware failures.</p><p>It is built around <strong>surviving failures without interrupting applications</strong>.</p><p>RAID-DP and RAID-TEC are examples of a broader systems engineering principle: expect components to fail, isolate those failures, and restore redundancy before the next failure occurs.</p><p>That philosophy extends beyond storage systems into distributed databases, cloud infrastructure, and resilient software architectures.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ba4b9220f4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Following a SQL Query Across the Enterprise Network]]></title>
            <link>https://medium.com/@tanvi.gunjal22/following-a-sql-query-across-the-enterprise-network-ce5fa901c230?source=rss-695fd04ae7ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce5fa901c230</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[enterprise-technology]]></category>
            <dc:creator><![CDATA[Tanvi Gunjal]]></dc:creator>
            <pubDate>Wed, 01 Jul 2026 17:32:27 GMT</pubDate>
            <atom:updated>2026-07-01T17:33:11.432Z</atom:updated>
            <content:encoded><![CDATA[<p>~ <a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a> and <a href="https://medium.com/u/159f75f3e603">Kanishka Vishwasrao</a></p><h3>The Journey from a Client Application to the Database Engine</h3><p>Imagine you’re sitting in your office on a Monday morning.</p><p>You open your SQL client, connect to the production database, and type one simple statement.</p><pre>SELECT employee_name<br>FROM employees<br>WHERE employee_id = 101;</pre><p>You press <strong>Execute</strong>.</p><p>Within milliseconds, your screen displays the result.</p><p>To most users, it feels almost instantaneous.</p><p>But behind that single click lies an extraordinary journey — one that spans operating systems, network switches, enterprise routers, firewalls, cloud networks, database listeners, memory structures, query optimizers, and storage engines.</p><p>Over the past two weeks, we’ve explored each of these components individually.</p><p>Now, let’s follow one SQL query as it travels through the enterprise.</p><h3>Step 1 — The Query Begins Its Journey</h3><p>The SQL statement doesn’t magically appear inside Oracle or PostgreSQL.</p><p>First, your SQL client must establish a connection.</p><p>If you’ve connected using:</p><pre>prod-db.company.internal</pre><p>your computer has one important question:</p><blockquote><strong><em>“Where is that server?”</em></strong></blockquote><p>It sends a DNS request.</p><pre>SQL Client<br>      │<br>      ▼<br>DNS Server<br>      │<br>Returns:<br>10.40.12.15</pre><p>Only after resolving the hostname into an IP address does communication begin.</p><p>This is why a DNS outage can make an entire database environment appear “down” even when the database itself is perfectly healthy.</p><h3>Step 2 — Building the Packet</h3><p>The operating system now prepares the request for transmission.</p><p>The SQL statement becomes application data.</p><p>TCP wraps it into a segment.</p><p>IP adds addressing information.</p><p>Ethernet encapsulates everything into a frame.</p><pre>SQL Query<br>     │<br>Application Layer<br>     │<br>TCP Segment<br>     │<br>IP Packet<br>     │<br>Ethernet Frame</pre><p>Each layer contributes information that the next device in the network understands.</p><p>This layered communication model is exactly what we explored when discussing the OSI and TCP/IP architectures.</p><h3>Step 3 — Leaving the Local Network</h3><p>Your network interface card places the Ethernet frame onto the local switch.</p><p>The switch doesn’t inspect SQL.</p><p>It doesn’t understand Oracle.</p><p>It simply examines the destination MAC address.</p><p>Using its CAM table, it decides where the frame should go.</p><p>If the database resides within another VLAN — as is almost always the case in enterprise environments — the frame is forwarded toward the default gateway.</p><p>Here, Layer 2 has completed its job.</p><p>Now Layer 3 takes over.</p><h3>Step 4 — The Router Makes a Decision</h3><p>The router removes the Ethernet header and examines the destination IP address.</p><p>Its routing table contains multiple possible paths.</p><p>Depending on the organization, those routes may come from:</p><ul><li>Static routes</li><li>OSPF</li><li>BGP advertisements</li><li>MPLS WAN circuits</li><li>Cloud route tables</li></ul><p>The router isn’t simply forwarding packets.</p><p>It’s making routing decisions based on administrative distance, routing policies, and available paths.</p><p>If the database is hosted in a cloud VPC, BGP may dynamically advertise those networks through an MPLS backbone or dedicated cloud connection.</p><p>Within microseconds, the packet is already traversing the enterprise WAN.</p><h3>Step 5 — Security Before Connectivity</h3><p>Before any database packet reaches its destination, security devices step in.</p><pre>Client<br>   │<br>Router<br>   │<br>Firewall<br>   │<br>Database Network</pre><p>The firewall evaluates every packet.</p><ul><li>Is the source trusted?</li><li>Is TCP port 1521 (Oracle) or 5432 (PostgreSQL) allowed?</li><li>Is this part of an established session?</li><li>Does the packet violate any security policy?</li></ul><p>Only after passing these checks is the connection permitted.</p><p>In cloud environments, the same principle exists through Network Security Groups (NSGs) or Security Groups, providing granular access control around every workload.</p><p>Security isn’t an afterthought — it’s embedded into every hop.</p><h3>Step 6 — Optional Stops Along the Way</h3><p>Large enterprise environments rarely expose database servers directly.</p><p>The request may encounter:</p><ul><li>VPN gateways</li><li>Reverse proxies</li><li>Connection poolers</li><li>Database proxies</li><li>Oracle RAC SCAN listeners</li><li>Load balancers</li></ul><p>These components improve scalability, resiliency, and availability without requiring clients to know where individual database nodes reside.</p><p>To the application, there’s still just one database.</p><p>Behind the scenes, an entire cluster may be working together.</p><h3>Step 7 — The Database Listener Opens the Door</h3><p>Eventually, the packet reaches the database server.</p><p>The operating system notices an application listening on the destination port.</p><p>For Oracle, that’s the Oracle Listener.</p><p>For PostgreSQL, it’s the Postmaster process.</p><pre>Client       <br>    │<br>Oracle Listener<br>    │<br>Dedicated Server Process<br>    │<br>Oracle Instance</pre><p>or</p><pre>Client<br>   │<br>Postmaster<br>   │<br>Backend Process</pre><p>The listener doesn’t execute SQL.</p><p>Its responsibility is to authenticate the connection and hand it to the appropriate database process.</p><p>Only now has the query officially entered the database engine.</p><h3>Step 8 — Oracle and PostgreSQL Take Different Paths</h3><p>Although Oracle and PostgreSQL have different internal architectures, they now begin solving the same problem.</p><blockquote><em>“How do I execute this SQL statement as efficiently as possible?”</em></blockquote><p>For Oracle, the dedicated server process first checks the Shared Pool inside the System Global Area (SGA).</p><p>Has this statement been executed before?</p><p>If yes, Oracle performs a <strong>soft parse</strong>, reusing the existing execution plan.</p><p>If not, Oracle performs a <strong>hard parse</strong>, invoking the optimizer to generate a new execution strategy before caching it for future use.</p><p>For PostgreSQL, a backend process receives the statement and guides it through its familiar five-stage pipeline:</p><ul><li>Parser</li><li>Rewriter</li><li>Planner</li><li>Executor</li><li>Result</li></ul><p>Different architectures.</p><p>The same objective: execute SQL efficiently.</p><h3>Step 9 — Reading the Data</h3><p>Suppose the requested employee record isn’t already cached.</p><p>Oracle checks the Buffer Cache.</p><p>If the block isn’t present, a physical read retrieves it from the database files.</p><p>If it is already cached, the database avoids disk I/O entirely, returning the data directly from memory.</p><p>This simple optimization explains why well-tuned databases prioritize memory usage — it is dramatically faster than reading from storage.</p><p>The same principle exists within PostgreSQL’s shared buffers, where frequently accessed pages remain in memory to reduce disk access.</p><h3>Step 10 — Returning the Answer</h3><p>Once execution finishes, the result travels back along the exact same network path.</p><pre>Database<br>  ↓<br>TCP<br>  ↓<br>Router<br>  ↓<br>Firewall<br>  ↓<br>Switch<br>  ↓<br>Client</pre><p>The SQL client receives the response.</p><p>Rows appear on your screen.</p><p>The query is complete.</p><p>From the user’s perspective, nothing remarkable happened.</p><p>Yet in less than a second, dozens of hardware and software components collaborated flawlessly.</p><h3>Seeing the Entire Journey</h3><p>When viewed end-to-end, a SQL query follows an impressive path through modern enterprise infrastructure.</p><pre>Developer<br>    ↓<br>SQL Client<br>    ↓<br>DNS Resolution<br>    ↓<br>TCP/IP Stack<br>    ↓<br>Network Switch<br>    ↓<br>Router<br>    ↓<br>Firewall<br>    ↓<br>VPN / MPLS / Cloud WAN<br>    ↓<br>Load Balancer (Optional)<br>    ↓<br>Database Listener<br>    ↓<br>Oracle Instance / PostgreSQL Backend<br>    ↓<br>Shared Memory<br>    ↓<br>SQL Parser<br>    ↓<br>Optimizer<br>    ↓<br>Execution Engine<br>    ↓<br>Buffer Cache<br>    ↓<br>Database Files<br>    ↓<br>Results Returned</pre><p>Every layer has a single responsibility.</p><p>None of them execute the entire request.</p><p>Instead, each performs one specialized task before handing responsibility to the next component.</p><p>This modular design is precisely what makes enterprise systems scalable, resilient, and maintainable.</p><h3>Why Understanding the Entire Path Matters</h3><p>One of the biggest misconceptions in enterprise IT is assuming that every slow query is a database problem.</p><p>Sometimes, the root cause lies elsewhere.</p><p>A failed DNS lookup prevents clients from locating the server.</p><p>A firewall rule blocks incoming connections.</p><p>A router advertises an incorrect route.</p><p>An overloaded load balancer delays new sessions.</p><p>Only after ruling out the network should engineers begin investigating execution plans, memory pressure, or storage latency inside the database.</p><p>Likewise, network engineers benefit from understanding what happens after a connection reaches the listener. Knowing how Oracle’s Shared Pool, Buffer Cache, or PostgreSQL’s planner work helps distinguish between a network issue and a database bottleneck.</p><p>Enterprise systems demand collaboration, not isolated expertise.</p><h3>Final Thoughts</h3><p>This series began by opening the database and examining its internal machinery. We explored Oracle’s memory structures, background processes, query execution, PostgreSQL’s architecture, and the networking principles that connect users to these systems.</p><p>This capstone brings those lessons together.</p><p>A SQL query isn’t merely a command sent to a database. It’s a traveler crossing multiple layers of infrastructure — DNS servers, switches, routers, firewalls, WAN links, listeners, memory caches, optimizers, and execution engines — before a single row is ever returned.</p><p>Understanding that journey changes how we troubleshoot, how we design systems, and ultimately, how we think about enterprise infrastructure.</p><p>Because in the real world, databases don’t operate in isolation.</p><p>They are one part of a much larger ecosystem, where networking and databases work together to transform a single click into meaningful information.</p><h3>What’s Next?</h3><p>So far, we’ve followed a query across the network and into the database engine.</p><p>But what happens when that query <strong>changes data</strong>?</p><p>Where does that write go? How is it protected against disk failures? What storage architecture ensures those bytes are safely committed?</p><p>In the next chapter of this series, we’ll leave the network behind and dive beneath the database, exploring the world of enterprise storage — from block and file storage to SANs, RAID, and NetApp architectures. We’ll follow a database write all the way from memory to persistent storage, completing another essential piece of the enterprise infrastructure puzzle.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce5fa901c230" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stopping the Storm: DHCP DORA, VTP, and Layer 2 Network Security]]></title>
            <link>https://medium.com/@tanvi.gunjal22/stopping-the-storm-dhcp-dora-vtp-and-layer-2-network-security-244c14321a9c?source=rss-695fd04ae7ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/244c14321a9c</guid>
            <category><![CDATA[network]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Tanvi Gunjal]]></dc:creator>
            <pubDate>Tue, 23 Jun 2026 17:08:21 GMT</pubDate>
            <atom:updated>2026-06-23T17:08:21.721Z</atom:updated>
            <content:encoded><![CDATA[<p>~ <a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a> and <a href="https://medium.com/u/159f75f3e603">Kanishka Vishwasrao</a></p><p>Every network engineer has experienced that moment. The helpdesk starts reporting that users cannot connect to the network. New devices are unable to obtain IP addresses, phones are failing to register, and application teams are asking whether DHCP is down. The first instinct is often to look at the DHCP server itself. Is the service running? Is the address pool exhausted? Are there relay issues?</p><p>Yet many times the DHCP server is functioning exactly as expected.</p><p>What appears to be a DHCP issue is often a symptom of something happening much deeper within the switching infrastructure. A missing VLAN, a trunking misconfiguration, or a flood of broadcast traffic can prevent DHCP traffic from ever reaching its destination. In those situations, DHCP is simply the first service that exposes the problem because it relies heavily on Layer 2 communication.</p><p>This is why understanding the relationship between DHCP, VLAN management, and broadcast control is so important. These technologies are often discussed independently, but in real-world environments they are tightly connected. A failure in one area can quickly cascade into another, creating outages that are difficult to diagnose if you focus only on the visible symptoms.</p><p>In this article, we’ll walk through the DHCP DORA process, explore how VLAN Trunking Protocol (VTP) distributes VLAN information across a switching domain, and examine how Storm Control protects networks from excessive broadcast traffic. More importantly, we’ll look at how these mechanisms interact during both normal operation and failure scenarios.</p><h3>DHCP DORA: The First Conversation on the Network</h3><p>Whenever a device joins a network, it faces an immediate problem: it doesn’t know where it is. Without an IP address, subnet mask, gateway, or DNS information, it has no way of communicating beyond the local segment. Before it can reach applications, servers, or even the internet, it must first obtain its network identity.</p><p>This process is handled by the Dynamic Host Configuration Protocol (DHCP), which most engineers know through the acronym DORA: Discover, Offer, Request, and Acknowledge.</p><p>At first glance, DORA appears to be a simple four-step exchange between a client and a server. However, from a switching perspective, it is an excellent example of how dependent modern networks are on healthy Layer 2 operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*soyFbpmGlqinfifFDg-29Q.png" /><figcaption>Figure 1: DHCP DORA Process</figcaption></figure><p>When a client sends a DHCP Discover message, it has no knowledge of where a DHCP server resides. Since it cannot target a specific destination, it broadcasts the request to every device within its VLAN. The frame is sent using the destination MAC address ff:ff:ff:ff:ff:ff, instructing switches to flood it throughout the broadcast domain.</p><p>This behavior is often overlooked, but it is critical. The success of DHCP depends entirely on the ability of those broadcast frames to traverse the network correctly. If the VLAN is missing from a trunk, if the client is placed in the wrong VLAN, or if excessive broadcast traffic is overwhelming the segment, the DHCP server may never receive the Discover message.</p><p>The server responds with a DHCP Offer, proposing an available address along with other network parameters. The client then sends a Request indicating which offer it wishes to accept, and finally the server confirms the lease with an Acknowledgement. The exchange is simple, efficient, and generally invisible to users.</p><p>What makes DHCP particularly interesting is that it is often the first casualty when Layer 2 problems occur. A user experiencing a DHCP failure may believe the addressing service is broken, when in reality the underlying switching infrastructure is preventing the traffic from reaching its destination. In many troubleshooting scenarios, DHCP is not the root cause of the outage — it is merely the messenger.</p><h3>VLAN Trunking Protocol: Convenience with Consequences</h3><p>As networks scale, maintaining VLAN consistency across dozens or even hundreds of switches becomes increasingly challenging. Creating a VLAN on a single switch is trivial; creating that same VLAN across an entire campus network can quickly become an operational burden.</p><p>Cisco introduced VLAN Trunking Protocol (VTP) to address this challenge. The idea was straightforward: create VLANs in one location and allow that information to propagate automatically throughout the switching domain. In theory, this significantly reduces administrative overhead and helps maintain consistency.</p><p>In practice, VTP has earned a reputation that is both respected and feared by network engineers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*k2DkuBzYYdbBIZ1VUY47tg.png" /><figcaption>Figure 2: VTP Revision Number Overwrite Scenario</figcaption></figure><p>At the heart of VTP lies the concept of a VLAN database and a revision number. Every time a change is made to the VLAN configuration, the revision number increases. When switches exchange VTP advertisements, the switch with the higher revision number is assumed to possess the most recent information.</p><p>This design works well until an unexpected switch enters the network.</p><p>Imagine a production environment operating normally with dozens of active VLANs. During a maintenance window, an engineer connects a spare switch that was previously used in a lab environment. Unknown to the engineer, the switch contains a higher VTP revision number than the production domain. Even worse, its VLAN database is empty.</p><p>The moment VTP advertisements are exchanged, production switches see the higher revision number and accept the incoming database as authoritative. Within seconds, VLAN definitions begin disappearing across the network. Users lose connectivity, DHCP requests stop reaching their servers, and large portions of the infrastructure appear to fail simultaneously.</p><p>What makes this scenario particularly dangerous is that the network often looks healthy from a physical perspective. Links remain operational. Interfaces stay up. Spanning Tree appears stable. Yet the logical structure of the network has been erased.</p><p>Experiences like these are why many organizations either deploy VTP Version 3 with stricter controls or avoid automated synchronization altogether by operating in Transparent Mode.</p><h3>When Broadcasts Become a Storm</h3><p>Broadcast traffic is a normal and necessary part of Ethernet networking. DHCP relies on it. ARP relies on it. Numerous discovery mechanisms depend on it. Under normal circumstances, broadcasts represent only a small fraction of total network traffic.</p><p>Problems begin when broadcast traffic is no longer normal.</p><p>A Layer 2 loop, a spanning-tree failure, or a malfunctioning endpoint can cause frames to replicate uncontrollably throughout a VLAN. Since broadcast frames are forwarded to every device within the broadcast domain, even a relatively small issue can grow into a network-wide problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QcwxY9ZIp_qHrvTFVl6HSw.png" /><figcaption>Figure 3: Broadcast Storm and Storm Control</figcaption></figure><p>As broadcast traffic increases, switches must spend more resources processing and forwarding those frames. Bandwidth that should be available for legitimate user traffic becomes consumed by repeated broadcasts. CPU utilization rises, MAC address tables become unstable, and packet loss begins to occur.</p><p>The impact is often felt first by services that rely on broadcasts. DHCP requests may be delayed or dropped. ARP resolution may fail intermittently. Applications become sluggish, and users report connectivity problems that appear random and inconsistent.</p><p>In severe cases, the network can become effectively unusable even though every switch remains powered on and every link remains operational.</p><h3>Storm Control: Protecting the Broadcast Domain</h3><p>Storm Control exists to prevent these situations from escalating into full-scale outages. Rather than allowing unlimited broadcast, multicast, or unknown unicast traffic, switches can monitor traffic levels and enforce thresholds when abnormal conditions occur.</p><p>The principle is simple. If broadcast traffic suddenly exceeds an acceptable percentage of interface bandwidth, the switch begins dropping excess frames or generating alerts. This prevents a single device or failure from consuming all available resources within the VLAN.</p><p>Storm Control is not designed to eliminate broadcasts. Networks need broadcasts to function correctly. Instead, it acts as a safety mechanism that keeps expected traffic flowing while limiting abnormal behavior.</p><p>When properly configured, Storm Control provides a valuable layer of protection against both accidental loops and device failures. It cannot replace good network design or proper spanning-tree configuration, but it can significantly reduce the blast radius of a Layer 2 incident.</p><h3>Connecting the Dots</h3><p>The most interesting aspect of DHCP, VTP, and Storm Control is not how they function individually, but how they interact during real-world outages.</p><p>A VTP issue can remove VLAN information from a network. Missing VLANs can prevent DHCP broadcasts from reaching their destination. A broadcast storm can overwhelm the very traffic that DHCP depends upon. Storm Control can protect the network from that storm, but if thresholds are configured incorrectly, it can also contribute to DHCP failures during periods of heavy broadcast activity.</p><p>Viewed independently, these technologies seem unrelated. Viewed operationally, they form part of the same story.</p><p>This is one of the reasons troubleshooting enterprise networks requires looking beyond the immediate symptom. When users report that DHCP is down, the most effective engineers are not the ones who immediately restart the DHCP service. They are the ones who understand the health of the Layer 2 environment supporting that service.</p><p>In modern networks, the visible problem is often just the final domino to fall.</p><h3>Conclusion</h3><p>As networks grow in size and complexity, maintaining a stable Layer 2 environment becomes just as important as managing routing, security, or application delivery. While DHCP, VTP, and Storm Control are often studied as separate topics, they frequently intersect during real-world network operations and outages.</p><p>Key takeaways from this discussion:</p><ul><li><strong>DHCP relies heavily on Layer 2 broadcasts.</strong> If broadcast traffic cannot reach its destination, clients will fail to obtain IP addresses even when the DHCP server is functioning normally.</li><li><strong>The DORA process provides a useful troubleshooting framework.</strong> Understanding where Discover, Offer, Request, and Acknowledge messages flow can help quickly identify whether an issue lies with the client, switch infrastructure, or DHCP server.</li><li><strong>VTP simplifies VLAN management but introduces operational risk.</strong> Mismanaged revision numbers can overwrite VLAN databases and cause widespread connectivity issues across an entire switching domain.</li><li><strong>Broadcast storms can severely impact network performance.</strong> Excessive broadcast traffic consumes bandwidth, increases switch CPU utilization, and disrupts critical services such as DHCP and ARP.</li><li><strong>Storm Control acts as a protective mechanism.</strong> By limiting abnormal broadcast, multicast, and unknown unicast traffic, it helps contain failures before they impact the entire network.</li><li><strong>Most Layer 2 outages are interconnected.</strong> A VLAN issue can lead to DHCP failures, while a broadcast storm can mask itself as an application or server problem. Effective troubleshooting requires understanding the relationships between these technologies rather than viewing them in isolation.</li></ul><p>Ultimately, successful network troubleshooting is not about identifying the first service that appears to be failing — it’s about understanding the underlying infrastructure that supports it. The next time users report that “DHCP is down,” remember that the real problem may be hiding somewhere within the Layer 2 network.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=244c14321a9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Subnetting Is Not Math — It’s Architecture: A Guide to VLSM and DNS]]></title>
            <link>https://medium.com/@tanvi.gunjal22/subnetting-is-not-math-its-architecture-a-guide-to-vlsm-and-dns-835ca51f4f85?source=rss-695fd04ae7ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/835ca51f4f85</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Tanvi Gunjal]]></dc:creator>
            <pubDate>Thu, 18 Jun 2026 12:05:34 GMT</pubDate>
            <atom:updated>2026-06-18T12:05:34.627Z</atom:updated>
            <content:encoded><![CDATA[<p>~ <a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a> and <a href="https://medium.com/u/159f75f3e603">Kanishka Vishwasrao</a></p><p>Most networking tutorials teach subnetting as an exercise in binary arithmetic.</p><p>You’ll often see pages of calculations converting decimal values to binary, determining network IDs, and memorizing subnet masks. While those calculations are important, they miss the larger point.</p><p>Subnetting was never created to make engineers better at math.</p><p>It was created to make networks scalable.</p><p>Every subnet boundary represents an architectural decision. Every IP allocation influences routing behavior. Every DNS record affects how users reach applications. Every load balancer shapes traffic distribution across infrastructure.</p><p>Understanding subnetting purely as a mathematical operation is like understanding database indexing purely as a B-tree implementation. The implementation matters, but the real value comes from the architectural problem it solves.</p><p>In this article, we’ll connect four concepts that are often taught separately:</p><ul><li>IP and MAC addressing</li><li>Network framing and packet delivery</li><li>Variable Length Subnet Masking (VLSM)</li><li>DNS and Load Balancer based traffic routing</li></ul><p>Together, these concepts explain how modern networks scale from a few devices in an office to millions of users accessing cloud-native applications.</p><h3>Why Networks Need Addresses</h3><p>Imagine a data center with thousands of servers. If a packet arrives, how does the network know where to send it?</p><p>The answer is addressing. Modern networks use two different addressing systems:</p><ol><li>MAC Addresses</li><li>IP Addresses</li></ol><p>Although both identify devices, they solve entirely different problems. A MAC address identifies a device within a local network.</p><p>For example:</p><pre>00:1A:2B:3C:4D:5E</pre><p>A switch uses MAC addresses to forward Ethernet frames between devices connected to the same Layer 2 network.</p><p>IP addresses operate at Layer 3 and provide logical addressing across multiple networks.</p><p>For example:</p><pre>10.0.1.15</pre><p>or</p><pre>192.168.10.25</pre><p>When your laptop accesses a web application hosted in AWS, packets traverse multiple networks before reaching the destination.</p><p>The source machine never knows the MAC address of the final server.</p><p>Instead, it uses IP addresses to identify the destination network while MAC addresses are updated at each hop along the route.</p><p>This distinction is fundamental:</p><p>MAC addresses enable local delivery.</p><p>IP addresses enable global routing.</p><p>Without IP addressing, the Internet could not scale beyond a single broadcast domain.</p><h3>Frames, Packets, and Why Layering Matters</h3><p>Before discussing subnetting, it helps to understand what actually travels across a network.</p><p>At Layer 2, data is encapsulated into an Ethernet frame:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*1hBz5ZWiKLmz5LBeISDlgg.png" /></figure><p>The payload is typically an IP packet:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*zfYn4wc26wTT4nQS_-67EQ.png" /></figure><p>This separation allows networking layers to evolve independently.</p><p>Switches only care about MAC addresses.</p><p>Routers only care about IP addresses.</p><p>Applications only care about data.</p><p>Each layer performs a specific responsibility without understanding the internals of the others.</p><p>This separation is one of the reasons modern networks remain scalable despite handling billions of connected devices.</p><h3>The Real Problem Subnetting Solves</h3><p>Consider an organization assigned:</p><pre>10.0.0.0/16</pre><p>A /16 network contains:</p><pre>65,536 addresses</pre><p>Technically, every device could exist within a single subnet.</p><p>Architecturally, that would be disastrous.</p><p>Problems would include:</p><ul><li>Excessive broadcast traffic</li><li>Larger failure domains</li><li>Poor security boundaries</li><li>Inefficient routing</li><li>Difficult operational management</li></ul><p>Subnetting exists to divide large address spaces into smaller, manageable networks.</p><p>Instead of one massive network, engineers create logical segments.</p><p>For example:</p><pre>10.0.1.0/24  → Application Servers<br>10.0.2.0/24  → Databases<br>10.0.3.0/24  → Monitoring<br>10.0.4.0/24  → Internal Services</pre><p>Now routing becomes predictable, security policies become easier to implement, and failures become isolated.</p><p>Subnetting is therefore an architectural tool for segmentation.</p><p>The mathematics simply enable the design.</p><h3>Understanding VLSM</h3><p>Traditional subnetting divides networks into equally sized blocks.</p><p>Real systems rarely need equal-sized networks. A database cluster may require 30 addresses. A Kubernetes worker subnet may require hundreds. A management network may require only a handful. Allocating identical subnet sizes wastes address space. This is where Variable Length Subnet Masking (VLSM) becomes valuable.</p><p>VLSM allows subnet sizes to match actual requirements.</p><p>Suppose an organization owns:</p><pre>192.168.10.0/24</pre><p>Requirements:</p><pre>Engineering Team : 100 hosts<br>DevOps Team      : 50 hosts<br>Security Team    : 20 hosts<br>Management       : 10 hosts</pre><p>Using VLSM:</p><pre>192.168.10.0/25    → 126 Hosts<br>192.168.10.128/26  → 62 Hosts<br>192.168.10.192/27  → 30 Hosts<br>192.168.10.224/28  → 14 Hosts</pre><p>Instead of wasting addresses, network capacity closely matches demand. This is exactly the same mindset used in cloud architecture.</p><p>AWS VPCs commonly use VLSM when allocating CIDR ranges across:</p><ul><li>Public subnets</li><li>Private subnets</li><li>NAT gateways</li><li>Database tiers</li><li>Kubernetes clusters</li></ul><p>Good subnet design is fundamentally capacity planning.</p><h3>Why CIDR Matters More Than Binary Math</h3><p>When engineers see:</p><pre>10.0.0.0/24</pre><p>many immediately think:</p><p>“255.255.255.0”</p><p>A more useful interpretation is:</p><p>“This subnet contains 256 addresses.”</p><p>Similarly:</p><p>CIDRAddresses/24256/25128/2664/2732/2816</p><p>In production environments, engineers rarely perform binary calculations manually.</p><p>Instead, they reason about:</p><ul><li>Capacity</li><li>Growth</li><li>Failure domains</li><li>Routing boundaries</li></ul><p>CIDR notation is valuable because it expresses these constraints directly.</p><h3>From Address Allocation to Traffic Flow</h3><p>Subnetting determines where systems live.</p><p>Routing determines how traffic reaches them.</p><p>Once a packet leaves a client device, routers use destination IP addresses to determine the next hop.</p><p>For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/248/1*f_xTJ1KKb92oAtzbCCsC_Q.png" /></figure><p>Each router examines the destination network and forwards the packet toward the best available route.</p><p>This process happens millions of times per second.</p><p>Yet users experience it as a simple page load.</p><h3>DNS: The Internet’s Directory Service</h3><p>Humans prefer names. Networks prefer addresses. DNS exists to bridge that gap. When a user enters:</p><pre>www.example.com</pre><p>the browser cannot route traffic using that name. It first queries DNS. DNS responds with an IP address:</p><pre>www.example.com<br>      ↓<br>203.0.113.20</pre><p>Only after resolution can communication begin. Without DNS, every service would require users to memorize IP addresses. Modern DNS infrastructure does far more than simple name resolution. It also influences traffic distribution.</p><h3>How DNS Routes Traffic</h3><p>Large-scale systems often use DNS as the first layer of traffic management.</p><p>For example:</p><pre>api.company.com</pre><p>may resolve differently depending on:</p><ul><li>Geographic region</li><li>User latency</li><li>Disaster recovery status</li><li>Infrastructure health</li></ul><p>A user in India might receive:</p><pre>52.x.x.x</pre><p>while a user in Europe receives:</p><pre>54.x.x.x</pre><p>Both records point to different infrastructure regions. This technique reduces latency and improves availability.</p><p>DNS is often the first routing decision made before any packet reaches application infrastructure.</p><h3>Load Balancers: Routing Inside the Application Layer</h3><p>After DNS resolves a destination, traffic typically reaches a load balancer. A load balancer acts as an intelligent traffic distribution layer.</p><p>Instead of sending all requests to one server, it distributes them across multiple instances.</p><p>Example:</p><pre>Client<br>   ↓<br>Load Balancer<br>   ├── Server A<br>   ├── Server B<br>   ├── Server C<br>   └── Server D</pre><p>Common balancing strategies include:</p><ul><li>Round Robin</li><li>Least Connections</li><li>Weighted Routing</li><li>IP Hashing</li></ul><p>Modern cloud platforms provide managed load balancers that continuously monitor instance health and remove unhealthy nodes automatically.</p><p>This allows systems to scale horizontally without changing client behavior. Clients interact with one endpoint. The load balancer handles distribution.</p><h3>Putting It All Together</h3><p>When a user accesses:</p><pre>https://api.company.com</pre><p>the following sequence occurs:</p><ol><li>DNS resolves the hostname into an IP address.</li><li>Routers use IP addressing to reach the destination network.</li><li>Ethernet frames move traffic across local networks.</li><li>Load balancers distribute requests to healthy servers.</li><li>Application instances process the request.</li></ol><p>Every step depends on proper addressing and network design. Poor subnet planning creates routing complexity. Poor DNS design introduces latency. Poor load balancing creates bottlenecks. These systems are interconnected. Subnetting is therefore not an isolated networking exercise. It is one component of a broader traffic management strategy.</p><h3>Final Thoughts</h3><p>The biggest mistake engineers make when learning subnetting is treating it as a binary arithmetic problem.</p><p>Subnetting is actually an architectural discipline. The calculations are simple. The design decisions are not. Every subnet defines a boundary. Every CIDR block represents capacity planning. Every DNS record influences user routing. Every load balancer affects application scalability.</p><p>Understanding how these pieces work together transforms networking from a collection of protocols into a system design problem.</p><p>And that perspective becomes increasingly valuable as applications scale from a handful of servers to globally distributed infrastructure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=835ca51f4f85" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Under the Hood of PostgreSQL: The 5-Step Query Pipeline]]></title>
            <link>https://medium.com/@tanvi.gunjal22/under-the-hood-of-postgresql-the-5-step-query-pipeline-2c248321cd18?source=rss-695fd04ae7ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c248321cd18</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Tanvi Gunjal]]></dc:creator>
            <pubDate>Thu, 11 Jun 2026 09:57:55 GMT</pubDate>
            <atom:updated>2026-06-11T10:21:44.792Z</atom:updated>
            <content:encoded><![CDATA[<p>~ <a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a> and <a href="https://medium.com/u/159f75f3e603">Kanishka Vishwasrao</a></p><p>Every SQL query sent to PostgreSQL goes through a series of internal stages before results are returned. Understanding this process helps developers troubleshoot performance issues, interpret execution plans, and write more efficient queries.</p><p>In this article, we’ll explore PostgreSQL’s architecture, the role of the Postmaster process, and the five-stage query execution pipeline that transforms a SQL statement into a result set.</p><h3>PostgreSQL System Architecture</h3><p>PostgreSQL follows a process-based architecture. Instead of handling all client requests within a single process, PostgreSQL creates a dedicated backend process for each client connection.</p><p>At a high level, the architecture looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/252/1*LRs6rbpja8KNANNlboVl7Q.png" /></figure><p>The architecture can be divided into three major components:</p><h4>Frontend (Client)</h4><p>Applications and tools that connect to PostgreSQL, including:</p><ul><li>psql</li><li>Python applications</li><li>Java applications</li><li>Node.js services</li><li>Reporting and BI tools</li></ul><h4>PostgreSQL Server</h4><p>The collection of processes responsible for connection management and query execution.</p><h4>Database Storage</h4><p>The physical files where PostgreSQL stores tables, indexes, and metadata.</p><p>In this article, our focus is on the PostgreSQL server and query execution engine.</p><h3>Client vs Backend Processes</h3><p>One of PostgreSQL’s defining architectural characteristics is its connection model.</p><p>When a client establishes a connection, PostgreSQL creates a dedicated backend process for that session.</p><p>Each backend process owns a client session and handles the complete lifecycle of its queries, from parsing and planning to execution and result delivery.</p><h4>Why Use Dedicated Backend Processes?</h4><p>This approach provides:</p><ul><li>Session isolation</li><li>Simplified process management</li><li>Strong stability boundaries between connections</li></ul><p>The tradeoff is increased resource consumption when handling very large numbers of concurrent connections, which is why connection pooling is common in PostgreSQL deployments.</p><h3>The Postmaster: PostgreSQL’s Control Center</h3><p>The Postmaster is PostgreSQL’s parent server process. It accepts incoming connections, creates backend processes, and manages the server’s background workers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*XG75WyTn-EqsZevsmtPe-Q.png" /></figure><p>Whenever a client connects:</p><ol><li>The Postmaster accepts the connection.</li><li>A backend process is created.</li><li>The backend becomes responsible for that session.</li><li>The Postmaster resumes listening for additional connections.</li></ol><h3>PostgreSQL Background Processes</h3><p>In addition to backend processes, PostgreSQL runs several supporting processes behind the scenes.</p><pre>Postmaster<br>├── Backend Processes<br>├── Checkpointer<br>├── Background Writer<br>├── WAL Writer<br>└── Autovacuum Launcher</pre><p>Key background processes include:</p><ul><li><strong>Checkpointer</strong></li><li><strong>Background Writer</strong></li><li><strong>WAL Writer</strong></li><li><strong>Autovacuum Launcher</strong></li></ul><p>These processes support reliability and performance while backend processes focus on query execution.</p><h3>The Journey of a Query</h3><p>Consider the following SQL statement:</p><pre>SELECT employee_id, employee_name<br>FROM employees<br>WHERE employee_id = 100;</pre><p>Before PostgreSQL can return a result, the query passes through five distinct stages:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*rhcLdt43otT2YzTWMTSrrA.png" /></figure><p>Let’s examine each stage.</p><blockquote><strong>Step 1: Parser</strong></blockquote><p>The Parser validates SQL syntax and converts the statement into an internal parse tree.</p><p>For example:</p><pre>SELECT *<br>FROM employees;</pre><p>is valid, while:</p><pre>SELEKT *<br>FROM employees;</pre><p>produces:</p><pre>ERROR: syntax error at or near &quot;SELEKT&quot;</pre><p>Once validated, PostgreSQL transforms the SQL into a structured representation.</p><p>Conceptually:</p><pre>SELECT *<br>FROM employees<br>WHERE employee_id = 100;</pre><p>becomes:</p><pre>SELECT<br> |<br> +-- FROM employees<br> |<br> +-- WHERE employee_id = 100</pre><p>This parse tree becomes the input for the next stage.</p><blockquote><strong>Step 2: Rewriter</strong></blockquote><p>The Rewriter transforms queries before optimization begins.</p><p>A common example involves views.</p><p>Suppose we create:</p><pre>CREATE VIEW active_employees AS<br>SELECT *<br>FROM employees<br>WHERE status = &#39;ACTIVE&#39;;</pre><p>Now consider:</p><pre>SELECT *<br>FROM active_employees;</pre><p>Before optimization, PostgreSQL expands the view definition internally:</p><pre>SELECT *<br>FROM employees<br>WHERE status = &#39;ACTIVE&#39;;</pre><p>The Rewriter expands views and applies query transformation rules so the Planner can work with the actual query that will be executed.</p><blockquote><strong>Step 3: Planner (Optimizer)</strong></blockquote><p>The Planner is responsible for finding the most efficient way to execute a query.</p><p>Consider:</p><pre>SELECT *<br>FROM employees<br>WHERE employee_id = 100;</pre><p>PostgreSQL may have several possible execution strategies.</p><h4><strong>Sequential Scan</strong></h4><p>Read every row in the table.</p><pre>Table Start<br>    |<br>Read Row 1<br>Read Row 2<br>Read Row 3<br>...</pre><h4>Index Scan</h4><p>Use an index to directly locate matching rows.</p><pre>Index<br>   |<br>   v<br>Matching Row</pre><h4>Bitmap Scan</h4><p>Combine index lookups with efficient table access for larger result sets.</p><p>The Planner evaluates available options and selects the one with the lowest estimated cost.</p><h4>Cost-Based Optimization</h4><p>PostgreSQL uses a cost-based optimizer rather than fixed execution rules.</p><p>Its decision-making considers factors such as:</p><ul><li>Table size</li><li>Row counts</li><li>Data distribution</li><li>Index availability</li><li>Query selectivity</li></ul><p>For example, searching for a single row in a large table usually favors an index scan, while retrieving most rows may make a sequential scan more efficient.</p><p>The Planner relies on database statistics to estimate these costs and choose an execution strategy.</p><blockquote><strong>Step 4: Executor</strong></blockquote><p>The Executor runs the plan selected by the Planner.</p><p>Depending on the chosen strategy, it may perform:</p><ul><li>Table scans</li><li>Index lookups</li><li>Joins</li><li>Sorting operations</li><li>Aggregations</li><li>Filtering</li></ul><p>If the selected plan is an Index Scan, the Executor navigates the index, locates matching entries, retrieves rows, and returns qualifying results.</p><h4>Executing Joins</h4><p>For join operations, PostgreSQL may choose one of several algorithms:</p><h4>Nested Loop Join</h4><p>Compares rows from one table against rows from another.</p><h4>Hash Join</h4><p>Builds a hash table for efficient lookups.</p><h4>Merge Join</h4><p>Combines sorted data sets efficiently.</p><p>The Planner chooses the algorithm; the Executor carries it out.</p><h4>Plan Nodes</h4><p>Execution plans are represented as trees of plan nodes.</p><p>Example:</p><pre>Hash Join<br>   |<br>   +---- Seq Scan employees<br>   |<br>   +---- Seq Scan departments</pre><p>The Executor processes these nodes until the final result is produced.</p><blockquote><strong>Step 5: Result Delivery</strong></blockquote><p>After execution completes, PostgreSQL prepares the result set for transmission back to the client.</p><p>Example:</p><pre>employee_id | employee_name<br>------------+--------------<br>100         | John Smith</pre><p>The backend process sends the results through PostgreSQL’s communication protocol.</p><pre>Executor<br>    |<br>    v<br>Backend Process<br>    |<br>    v<br>Client Application</pre><p>The client library then converts the returned data into application-specific structures such as objects, JSON documents, DataFrames, or UI tables.</p><p>At this point, the query lifecycle is complete.</p><h3>Seeing the Pipeline with EXPLAIN</h3><p>One of PostgreSQL’s most useful diagnostic tools is EXPLAIN.</p><p>Consider:</p><pre>EXPLAIN<br>SELECT *<br>FROM employees<br>WHERE employee_id = 100;</pre><p>Possible output:</p><pre>Index Scan using employees_pkey<br>(cost=0.29..8.31 rows=1 width=64)</pre><p>This output reveals the execution strategy chosen by the Planner.</p><p>Developers commonly use EXPLAIN to understand:</p><ul><li>Scan methods</li><li>Join strategies</li><li>Estimated costs</li><li>Execution plans</li></ul><p>It provides a practical window into PostgreSQL’s query engine and is often the starting point for performance tuning.</p><h3>Key Takeaways</h3><ul><li>PostgreSQL uses a process-based architecture with one backend process per connection.</li><li>The Postmaster manages connections and server processes.</li><li>Queries move through five stages: Parser, Rewriter, Planner, Executor, and Result Delivery.</li><li>The Planner uses cost-based optimization to select an execution strategy.</li><li>The Executor performs the work defined by the execution plan.</li><li>EXPLAIN provides visibility into PostgreSQL&#39;s planning decisions and execution strategies.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c248321cd18" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Lifecycle of an Oracle Query]]></title>
            <link>https://medium.com/@tanvi.gunjal22/the-lifecycle-of-an-oracle-query-2025311b9fc9?source=rss-695fd04ae7ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/2025311b9fc9</guid>
            <category><![CDATA[oracle-database]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[parsing]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Tanvi Gunjal]]></dc:creator>
            <pubDate>Fri, 05 Jun 2026 18:20:15 GMT</pubDate>
            <atom:updated>2026-06-05T18:53:57.087Z</atom:updated>
            <content:encoded><![CDATA[<p>~ <a href="https://medium.com/u/159f75f3e603">Kanishkavishwasrao</a> and <a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a></p><p>For most developers, a database query feels almost magical.</p><p>You write a SELECT statement, click Execute, and rows appear on the screen.</p><p>What you don’t see is the high-speed assembly line running behind the scenes. Before Oracle returns even a single row, it validates your SQL, checks permissions, searches for reusable execution plans, optimizes access paths, retrieves data, and formats the results.</p><p>Every query typically passes through <strong>four major stages:</strong></p><ol><li><strong>Parsing</strong> — Understanding and validating the SQL statement.</li><li><strong>Optimization</strong> — Determining the most efficient execution strategy.</li><li><strong>Execution</strong> — Retrieving and processing the required data.</li><li><strong>Fetching</strong> — Returning the final results to the client.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*MDbbaiwkq1y99Sc0qfm99A.png" /><figcaption>Every SQL query passes through a structured lifecycle before data is returned</figcaption></figure><p>Let’s follow the journey of a simple query.</p><pre>SELECT employee_name<br>FROM employees<br>WHERE department_id = 10;</pre><h3>Stage 0: Establishing the Session</h3><p>Before Oracle can process a query, it must establish a connection.</p><p>The SQL statement travels through Oracle Net Services and reaches the Oracle Listener. The listener assigns the request to a server process, which creates or attaches to a session and allocates access to a private PGA (Program Global Area).</p><p>Only then is Oracle ready to process the statement.</p><h3>Stage 1: Parsing the Query</h3><p>Parsing is Oracle’s way of understanding what the SQL statement actually means.</p><h4>Syntax Check</h4><p>Oracle first validates SQL grammar.</p><pre>SELECT employee_name<br>FROM employees<br>WHERE;</pre><p>Since the statement is incomplete, Oracle immediately returns a syntax error.</p><h4>Semantic Check</h4><p>Next, Oracle verifies that referenced objects exist and that the user has permission to access them.</p><pre>SELECT employee_salaryy<br>FROM employees;</pre><p>Even though the syntax is valid, Oracle rejects the query because the column doesn’t exist.</p><h4>Library Cache Lookup</h4><p>Once the statement is validated, Oracle generates a hash value from the SQL text and searches the Shared Pool’s Library Cache for an existing execution plan.</p><p>This creates two possible paths:</p><h4>&gt; Soft Parse</h4><p>If a matching execution plan already exists, Oracle simply reuses it.</p><h4>&gt; Hard Parse</h4><p>If no matching plan is found, Oracle must generate a brand-new one from scratch.</p><p>Since hard parsing consumes CPU resources, Oracle always prefers soft parses whenever possible.</p><h3>Stage 2: Optimization</h3><p>When a hard parse occurs, Oracle invokes the Cost-Based Optimizer (CBO).</p><p>The optimizer evaluates multiple execution strategies and chooses the one with the lowest estimated cost.</p><p>For example, Oracle may compare:</p><ul><li>Full Table Scan</li><li>Index Range Scan</li></ul><p>Or different join methods such as:</p><ul><li>Nested Loop Join</li><li>Hash Join</li><li>Merge Join</li></ul><p>To make these decisions, Oracle relies on statistics such as row counts, index information, and data distribution.</p><p>The selected strategy becomes the query’s <strong>Execution Plan</strong>.</p><h3>Stage 3: Execution</h3><p>An execution plan is essentially a blueprint.</p><p>Oracle converts this blueprint into a runnable structure called a <strong>Row Source Tree</strong>, where each node performs a specific operation such as reading rows, filtering data, joining tables, or sorting results.</p><p>The execution engine then begins retrieving data.</p><h4>Cache Hit</h4><p>If the required data block already exists in the Database Buffer Cache, Oracle reads it directly from memory.</p><h4>Cache Miss</h4><p>If the block isn’t in memory, Oracle reads it from disk and loads it into the Buffer Cache before processing it.</p><p>This is one reason the SGA plays such an important role in performance.</p><h3>Stage 4: Fetching the Results</h3><p>Once the data is retrieved, Oracle formats the results for the client.</p><p>If operations such as:</p><ul><li>ORDER BY</li><li>GROUP BY</li><li>DISTINCT</li></ul><p>are present, additional sorting and hashing may occur inside the PGA.</p><p>The rows are then transmitted back to the client application in batches until the complete result set is delivered.</p><h3>The Query Lifecycle at a Glance</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*4LwnRBe7sf6ZRPFvd8t1bw.png" /><figcaption>The complete internal path a query follows inside Oracle, from parsing to result delivery</figcaption></figure><h3>Conclusion</h3><p>A SQL query may appear simple from the outside, but Oracle performs a remarkable amount of work before returning data. From parsing and optimization to execution and result fetching, every stage is designed to minimize resource usage and maximize performance.</p><p>Understanding this lifecycle also explains why concepts such as bind variables, execution plans, indexes, SGA caching, and PGA memory allocation are so important. They’re not isolated database features — they’re all pieces of the same query-processing pipeline.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2025311b9fc9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SGA vs. PGA: The Memory Architecture That Lets Oracle Handle Massive Workloads]]></title>
            <link>https://medium.com/@tanvi.gunjal22/sga-vs-pga-the-memory-architecture-that-lets-oracle-handle-massive-workloads-3703d1981cf7?source=rss-695fd04ae7ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/3703d1981cf7</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[memory-management]]></category>
            <category><![CDATA[oracle-database]]></category>
            <category><![CDATA[query-processing]]></category>
            <dc:creator><![CDATA[Tanvi Gunjal]]></dc:creator>
            <pubDate>Thu, 04 Jun 2026 17:08:58 GMT</pubDate>
            <atom:updated>2026-06-04T17:08:58.837Z</atom:updated>
            <content:encoded><![CDATA[<p>~ <a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a> and <a href="https://medium.com/u/159f75f3e603">Kanishkavishwasrao</a></p><p>When people talk about database performance, they usually focus on indexes, query optimization, or hardware upgrades. Yet one of the biggest reasons Oracle databases can support thousands of concurrent users is something less visible: memory management.</p><p>Behind every Oracle instance are two critical memory regions — the <strong>System Global Area (SGA)</strong> and the <strong>Program Global Area (PGA)</strong>. Although both reside in RAM, they serve entirely different purposes. One is designed for sharing information across the entire database, while the other provides private workspace for individual sessions.</p><p>Understanding how these two memory areas work together reveals why Oracle can process massive workloads efficiently while minimizing resource contention.</p><h3>Think of Oracle as a Corporate Office</h3><p>Imagine a large corporate office building.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*qPRxU4nzPSfzZBzB0-8bgA.png" /><figcaption>Oracle Memory Architecture Overview</figcaption></figure><p>There are shared resources available to everyone: meeting rooms, filing cabinets, printers, and company documents. These resources help employees avoid duplicating work and ensure information can be accessed quickly.</p><p>At the same time, every employee has a personal desk where they can perform their own tasks independently without interfering with others.</p><p>This is essentially how Oracle organizes memory.</p><ul><li><strong>SGA (System Global Area)</strong> = Shared office resources.</li><li><strong>PGA (Program Global Area)</strong> = An employee’s private workspace.</li></ul><p>The distinction is simple but powerful:</p><blockquote><em>The SGA is shared among all database processes, while the PGA belongs exclusively to a single server process.</em></blockquote><p>This separation allows Oracle to maximize efficiency while supporting thousands of simultaneous operations.</p><h3>The SGA: Oracle’s Shared Memory Hub</h3><p>The <strong>System Global Area (SGA)</strong> is a large block of memory allocated when an Oracle instance starts.</p><p>Every foreground and background process can access it, making it the central communication and caching layer of the database.</p><p>Instead of repeatedly reading data from disk or recalculating execution plans, Oracle stores frequently used information inside the SGA so it can be reused whenever needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*un2I5eVFVAiaDkpswMHAPw.png" /><figcaption>SGA Internal Components</figcaption></figure><h3>Shared Pool: The Database’s Brain</h3><p>One of the most important components of the SGA is the <strong>Shared Pool</strong>.</p><p>Its primary responsibility is reducing unnecessary work.</p><h4>Library Cache</h4><p>The Library Cache stores:</p><ul><li>Parsed SQL statements</li><li>Execution plans</li><li>PL/SQL objects</li></ul><p>When a SQL statement is executed for the first time, Oracle must parse it, validate it, and generate an execution plan.</p><p>Without caching, Oracle would repeat this process every time the same query is executed.</p><p>Instead, the execution plan is stored in the Library Cache and reused whenever possible.</p><p>For example, if 1,000 users run the same query, Oracle can reuse a single execution plan rather than generating 1,000 separate plans.</p><h4>Data Dictionary Cache</h4><p>The Data Dictionary Cache stores metadata about database objects, including:</p><ul><li>Tables</li><li>Columns</li><li>Indexes</li><li>User privileges</li><li>Constraints</li></ul><p>Whenever Oracle needs information about database structures, it can retrieve it directly from memory instead of repeatedly accessing system tables on disk.</p><p>This significantly reduces overhead during query execution.</p><h4>Database Buffer Cache: Keeping Data Close</h4><p>The <strong>Database Buffer Cache</strong> stores copies of data blocks that have been read from physical data files.</p><p>When a query requests data, Oracle first checks the buffer cache.</p><p>If the required block already exists in memory, the database can return it immediately without performing a physical disk read.</p><p>Since memory access is dramatically faster than disk access, this cache plays a major role in overall performance.</p><p>The buffer cache typically contains three types of blocks:</p><h4>Free Blocks</h4><p>Unused memory blocks available for future data.</p><h4>Pinned Blocks</h4><p>Blocks currently being accessed or modified by active sessions.</p><h4>Dirty Blocks</h4><p>Blocks that have been modified in memory but have not yet been written back to disk.</p><p>Oracle periodically writes dirty blocks to disk through background processes, ensuring data consistency while avoiding excessive I/O operations.</p><h4>Redo Log Buffer: Recording Every Change</h4><p>Whenever a transaction modifies data, Oracle generates redo information describing those changes.</p><p>Before this information is written to physical redo log files, it is temporarily stored inside the <strong>Redo Log Buffer</strong>.</p><p>Think of it as a high-speed transaction recorder.</p><p>The Redo Log Buffer enables Oracle to:</p><ul><li>Recover committed transactions after failures</li><li>Maintain transaction durability</li><li>Reduce the cost of frequent disk writes</li></ul><p>Without this component, Oracle would need to write every change directly to disk, creating a significant performance bottleneck.</p><h3>Specialized Components of the SGA</h3><p>Beyond its primary caches, the SGA contains additional memory regions for specialized workloads.</p><h4>Large Pool</h4><p>Used for memory-intensive operations such as:</p><ul><li>RMAN backups</li><li>Shared server configurations</li><li>Parallel execution</li></ul><h4>Java Pool</h4><p>Provides memory for Oracle’s embedded Java Virtual Machine and Java-based stored procedures.</p><h4>Flashback Buffer</h4><p>Supports Oracle Flashback technologies by helping maintain historical information required for data recovery and point-in-time analysis.</p><p>Although these areas may not be heavily used in every environment, they become increasingly important in large enterprise deployments.</p><h3>The PGA: Oracle’s Private Workspace</h3><p>While the SGA is shared, the <strong>Program Global Area (PGA)</strong> is completely private.</p><p>Each server process receives its own PGA when it is created.</p><p>No other session can access this memory.</p><p>If the SGA represents the company’s shared infrastructure, the PGA is an employee’s personal desk where individual work gets done.</p><h3>What Lives Inside the PGA?</h3><p>The PGA contains information specific to a single session and its current operations.</p><p>One of its key components is the <strong>Private SQL Area</strong>, which stores:</p><ul><li>Bind variables</li><li>Cursor information</li><li>Runtime statistics</li><li>Query execution state</li></ul><p>Even when multiple sessions use the same execution plan from the Shared Pool, each session still requires its own execution context.</p><p>The Private SQL Area provides that isolation.</p><h3>Sorting and Hashing Happen Here</h3><p>The PGA becomes especially important during complex query execution.</p><p>Operations such as:</p><ul><li>ORDER BY</li><li>GROUP BY</li><li>DISTINCT</li><li>Hash joins</li></ul><p>require temporary working memory.</p><p>Rather than performing these operations inside shared memory, Oracle executes them within each session’s PGA.</p><p>This design allows multiple users to perform intensive calculations simultaneously without interfering with one another.</p><p>Think of the PGA as a scratchpad where Oracle can temporarily organize, compare, and process large amounts of data before returning results.</p><h3>Why Oracle Needs Both</h3><p>At first glance, Oracle could have chosen a fully shared memory model or a fully private memory model.</p><p>Instead, it uses both because each solves a different problem.</p><p>The SGA eliminates duplicate work.</p><p>The PGA enables independent work.</p><p>Together they create a balance between efficiency and scalability.</p><h3>How the SGA Improves Performance</h3><p>The SGA improves performance by sharing expensive resources across all sessions.</p><p>Instead of repeatedly:</p><ul><li>Parsing identical SQL statements</li><li>Reading the same data blocks from disk</li><li>Loading metadata structures</li></ul><p>Oracle caches these resources once and allows every process to reuse them.</p><p>This dramatically reduces CPU usage and disk I/O.</p><h3>How the PGA Prevents Contention</h3><p>The PGA ensures that session-specific operations remain isolated.</p><p>Imagine fifty users simultaneously executing reports that require large sorting operations.</p><p>If all sorting occurred in shared memory, contention would quickly become a problem.</p><p>By allocating private workspaces to each process, Oracle allows these operations to occur independently.</p><p>The result is better concurrency and improved scalability under heavy workloads.</p><h3>How a Query Uses Both SGA and PGA</h3><p>A typical query demonstrates why both memory regions are necessary.</p><ol><li>The SQL statement is checked against the Shared Pool.</li><li>Oracle looks for an existing execution plan.</li><li>Required data blocks are searched in the Buffer Cache.</li><li>Missing data is retrieved from disk and cached.</li><li>The query executes.</li><li>Any sorting, grouping, or hash joins occur inside the PGA.</li><li>Results are returned to the user.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QcMr4epX6HKUPWw1ioPTDQ.png" /><figcaption>Query Execution Flow</figcaption></figure><p>The SGA provides shared intelligence and cached data.</p><p>The PGA provides the private workspace needed to process the request.</p><p>Together they form the foundation of Oracle’s performance architecture.</p><h3>Conclusion</h3><p>Oracle’s ability to support thousands of concurrent users is not simply the result of powerful hardware. It stems from a carefully engineered memory architecture that separates shared resources from session-specific processing.</p><p>The SGA accelerates performance by caching execution plans, metadata, and frequently accessed data so that all users can benefit from them. The PGA complements this by providing dedicated memory for sorting, hashing, and execution-specific operations.</p><p>By combining shared efficiency with private processing power, Oracle minimizes disk access, reduces contention, and scales effectively under heavy workloads. Understanding the relationship between the SGA and PGA is essential for anyone looking to understand how Oracle delivers enterprise-grade performance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3703d1981cf7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>