<?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 Kanishka Vishwasrao on Medium]]></title>
        <description><![CDATA[Stories by Kanishka Vishwasrao on Medium]]></description>
        <link>https://medium.com/@kanishkavishwasrao21?source=rss-159f75f3e603------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*UAfdk0rmhfaLmL39</url>
            <title>Stories by Kanishka Vishwasrao on Medium</title>
            <link>https://medium.com/@kanishkavishwasrao21?source=rss-159f75f3e603------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 21:07:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kanishkavishwasrao21/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[Disaster-Proofing Storage: Inside NetApp SnapMirror, SnapMirror Business Continuity, and SVM-DR]]></title>
            <link>https://medium.com/@kanishkavishwasrao21/disaster-proofing-storage-inside-netapp-snapmirror-snapmirror-business-continuity-and-svm-dr-78b3a64a47d9?source=rss-159f75f3e603------2</link>
            <guid isPermaLink="false">https://medium.com/p/78b3a64a47d9</guid>
            <dc:creator><![CDATA[Kanishka Vishwasrao]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 16:54:28 GMT</pubDate>
            <atom:updated>2026-07-06T16:54:28.132Z</atom:updated>
            <content:encoded><![CDATA[<p>How NetApp protects enterprise data from outages, disasters, and business disruptions</p><h3>Introduction</h3><p>In modern enterprises, storage is no longer just about saving data; it’s about ensuring that data stays available even when hardware fails, networks break, applications crash, or an entire data center goes dark.</p><p>A few minutes of downtime can translate into real revenue loss, customer dissatisfaction, and operational disruption. That’s why organizations invest heavily in disaster recovery (DR), business continuity (BC), and data replication.</p><p>NetApp addresses this problem space through three major technologies:</p><ul><li><strong>SnapMirror</strong></li><li><strong>SnapMirror Business Continuity (SM-BC)</strong></li><li><strong>Storage Virtual Machine Disaster Recovery (SVM-DR)</strong></li></ul><p>These are often discussed in the same breath, but each one solves a genuinely different problem within the data protection landscape.</p><h3>The Evolution of Data Protection</h3><p>Traditional backups were built primarily for data <em>recovery</em>. The workflow was simple:</p><pre>Application<br>   <br>Storage<br>   ↓<br>Periodic Backup<br>   ↓<br>Tape/Disk Repository</pre><p>The problem: if a storage system failed at 2 PM and the last backup ran at midnight, the organization could lose up to 14 hours of data. That gap is what pushed the industry toward storage replication — continuously copying data to another location to shrink both recovery time and data loss. SnapMirror became NetApp’s answer to this challenge.</p><h3>What Is NetApp SnapMirror?</h3><p>SnapMirror is NetApp’s native ONTAP replication technology that creates and maintains copies of data between storage systems. Rather than re-copying entire datasets on every cycle, it transfers only the changed blocks after an initial baseline replication — which is what makes it efficient at scale.</p><p>The simplest way to think about it: a continuously updated backup copy living on another storage system.</p><h3>SnapMirror Architecture</h3><pre>Primary Storage<br>      │<br>      │ Changed Blocks<br>      ▼<br>Secondary Storage</pre><p>The process breaks down into three steps.</p><p><strong>Step 1 — Snapshot creation.</strong> ONTAP takes a point-in-time Snapshot copy of production data:</p><pre>Volume<br> ├─ Snapshot 1<br> ├─ Snapshot 2<br> └─ Snapshot 3</pre><p><strong>Step 2 — Baseline transfer.</strong> The full dataset is transferred once to the destination system.</p><p><strong>Step 3 — Incremental updates.</strong> From then on, only the blocks that changed since the last Snapshot get replicated:</p><pre>Changed Data Only<br>     ↓<br>Destination Updated</pre><p>This cuts bandwidth consumption, shortens replication time, and reduces storage overhead — all while keeping the destination ready to take over if needed.</p><h3>SnapMirror Deployment Models</h3><p><strong>Asynchronous SnapMirror</strong> replicates on a schedule:</p><pre>Production Site<br>      │<br>      │ Every 5 min / 15 min / 1 hour<br>      ▼<br>DR Site</pre><p>It needs low bandwidth, works well over long distances, and accepts a small but defined recovery point objective (RPO). Typical uses include backup repositories, DR sites, and branch-to-datacenter replication.</p><p><strong>Synchronous replication</strong> requires data to be written to both sites before the write is acknowledged:</p><pre>Application<br>      │<br>      ├──── Site A<br>      │<br>      └──── Site B</pre><p>This delivers near-zero data loss but is more sensitive to latency, making it best suited for mission-critical workloads — and it’s the foundation that more advanced business continuity designs build on.</p><h3>SnapMirror Business Continuity (SM-BC)</h3><h3>Why SnapMirror Alone Isn’t Enough</h3><p>Traditional DR solutions are built around recovery, not continuity. When disaster strikes, the sequence looks like this:</p><pre>Primary Site Failure<br>        ↓<br>Administrator Detects Issue<br>        ↓<br>Failover Initiated<br>        ↓<br>Applications Restart</pre><p>Even with data fully protected, there’s still application downtime in that sequence. For banking systems, payment gateways, healthcare applications, and manufacturing systems, “restart after failover” often isn’t good enough — they need continuous operation, not just recovery. That’s the gap SM-BC fills.</p><h3>What Is SM-BC?</h3><p>SnapMirror Business Continuity delivers application-level continuity through synchronous replication between storage systems. Its goal isn’t just protecting data — it’s keeping applications running through storage or site failures.</p><h3>SM-BC Architecture</h3><pre>Application<br>                       │<br>                Host Cluster<br>                       │<br>         ┌─────────────┴─────────────┐<br>         │                           │<br>         ▼                           ▼<br> Primary Storage            Secondary Storage<br>      (Active)                 (Mirrored)</pre><p>Data is synchronously replicated between both systems, so when a failure occurs:</p><pre>Storage Failure<br>       │<br>       ▼<br>Automatic Switchover<br>       │<br>       ▼<br>Application Continues</pre><p>The application barely notices.</p><h3>Key Benefits of SM-BC</h3><p>Because writes are synchronized, <strong>RPOs sit near zero</strong>. Failover is <strong>automated</strong>, cutting out manual intervention during an outage. <strong>Applications stay available</strong> even when one storage environment drops out entirely. And because switchover is non-disruptive, it also enables <strong>planned maintenance</strong> with minimal impact — infrastructure upgrades no longer require a maintenance window that takes the application down.</p><p>These properties are exactly why SM-BC is the go-to choice for Tier-1 enterprise workloads.</p><h3>What Is SVM-DR?</h3><p>To understand SVM-DR, you first need to understand a <strong>Storage Virtual Machine (SVM)</strong>.</p><p>An SVM in ONTAP is a logical storage environment that bundles together volumes, network configurations, NFS exports, SMB shares, user access settings, and security configurations:</p><pre>SVM<br> ├─ Volumes<br> ├─ Shares<br> ├─ Protocols<br> ├─ Users<br> └─ Policies</pre><p>In practice, it behaves like a complete storage tenant.</p><h3>The Problem SVM-DR Solves</h3><p>Imagine replicating only the volumes. After a disaster, administrators would still have to manually recreate network settings, shares, permissions, authentication configurations, and storage policies — a recovery process that can stretch into hours even with the data itself intact.</p><p>SVM-DR solves this by replicating the <em>entire</em> storage environment, not just the data sitting inside it.</p><h3>SVM-DR Architecture</h3><pre>Source SVM<br> ├─ Data<br> ├─ NFS Exports<br> ├─ SMB Shares<br> ├─ RBAC<br> └─ Policies<br>          │<br>          ▼<br>     SnapMirror<br>          │<br>          ▼<br>Destination SVM</pre><p>The destination ends up with data volumes, security settings, protocol configurations, access permissions, and storage configurations all in place — enabling a much faster recovery during a site disaster, since nothing has to be rebuilt from scratch.</p><h3>SnapMirror vs. SM-BC vs. SVM-DR</h3><h3>Analogy</h3><p>Picture a company with two office locations.</p><p><strong>SnapMirror</strong> copies all company files to a backup office:</p><pre>Office A → Office B</pre><p>If Office A fails, the files are safe but the office itself still needs to be rebuilt.</p><p><strong>SVM-DR</strong> copies the files <em>plus</em> the office configuration:</p><pre>Office A<br> ├─ Files<br> ├─ Employees<br> ├─ Access Cards<br> └─ Departments<br>        ↓<br>Office B</pre><p>Recovery is dramatically faster because the environment, not just the data, is already in place.</p><p><strong>SM-BC</strong> keeps both offices operational simultaneously:</p><pre>Office A ↔ Office B</pre><p>If one office goes down, work continues almost without interruption.</p><h3>Real-World Enterprise Design</h3><p>Large enterprises frequently layer all three technologies together rather than picking just one:</p><pre>Production Site<br>                       │<br>        ┌──────────────┴──────────────┐<br>        │                             │<br>        ▼                             ▼<br>     SM-BC Site                 SM-BC Site<br>        │                             │<br>        └──────────────┬──────────────┘<br>                       │<br>                       ▼<br>                DR Region<br>                  SVM-DR<br>                       │<br>                       ▼<br>                 SnapMirror<br>                  Backups</pre><p>This produces a layered protection strategy: <strong>SM-BC</strong> handles business continuity for Tier-1 applications, <strong>SVM-DR</strong> handles site-level disaster recovery for the broader environment, and <strong>SnapMirror</strong> provides long-term replication and backup retention underneath it all.</p><h3>Conclusion</h3><p>Modern enterprises need resilience. NetApp’s protection portfolio addresses that at three different levels of risk.</p><p>SnapMirror makes sure data is replicated efficiently and stays recoverable. SVM-DR extends that protection to the entire storage environment, configurations and access controls included. SnapMirror Business Continuity goes a step further still, keeping critical applications available straight through a failure rather than just recovering them afterward.</p><p>Together, these three technologies form a complete strategy for disaster recovery, business continuity, and operational resilience in enterprise storage. In a world where downtime is measured the ability to survive failure isn’t optional anymore it’s a core architectural requirement.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78b3a64a47d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Block, File, or Object? Choosing the Right Storage for Database Performance]]></title>
            <link>https://medium.com/@kanishkavishwasrao21/block-file-or-object-choosing-the-right-storage-for-database-performance-c192f968ecca?source=rss-159f75f3e603------2</link>
            <guid isPermaLink="false">https://medium.com/p/c192f968ecca</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[throughput]]></category>
            <category><![CDATA[storage-types]]></category>
            <dc:creator><![CDATA[Kanishka Vishwasrao]]></dc:creator>
            <pubDate>Thu, 02 Jul 2026 06:18:17 GMT</pubDate>
            <atom:updated>2026-07-02T06:18:17.179Z</atom:updated>
            <content:encoded><![CDATA[<ul><li><a href="https://medium.com/u/159f75f3e603">Kanishka Vishwasrao</a> and <a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a></li></ul><p>When engineers talk about database performance, the conversation usually circles around CPU, memory, indexing, or query optimization. One critical layer, though, often gets ignored until problems start showing up in production: storage.</p><p>A perfectly tuned database can still crawl if it’s sitting on the wrong storage architecture. Whether you’re running PostgreSQL, MySQL, Oracle, MongoDB, or a cloud-native workload, understanding the difference between <strong>Block Storage</strong>, <strong>File Storage</strong>, and <strong>Object Storage</strong> can make or break performance, scalability, reliability, and cost.</p><p>This article walks through the three storage typologies, the performance metrics that actually matter (IOPS, latency, throughput), and how provisioning models like thin and thick provisioning shape infrastructure efficiency.</p><h3>Why Storage Matters</h3><p>Every database operation eventually becomes a storage operation. When an application inserts a record, retrieves customer data, updates a transaction, or runs an analytical query, it’s the underlying storage system doing the heavy lifting. How fast and efficiently that happens depends entirely on how the data is stored and accessed.</p><p>Choosing the right storage type directly impacts:</p><ul><li>Performance</li><li>Scalability</li><li>Availability</li><li>Reliability</li><li>Operational Cost</li></ul><p>This article explores the major storage typologies, the performance metrics that drive workload efficiency, and how provisioning models influence storage utilization.</p><p>SIMPLIFIED DATABASE WORKFLOW:</p><pre>User Request →Application →Database Engine →Storage Layer →Disk/Storage System</pre><h3>The Three Primary Storage Types</h3><blockquote><strong>BLOCK STORAGE</strong></blockquote><p>Block storage splits data into fixed-size blocks, each with its own unique identifier, and stores them independently. The database (or OS) sees a raw disk and manages the file structure itself.</p><p>Picture receiving a warehouse full of empty boxes — you decide what goes into each one and how they’re arranged. That level of control is what makes block storage fast and flexible.</p><p><strong>Advantages:</strong> lowest latency, high IOPS, excellent database performance, supports boot volumes.</p><p><strong>Limitations:</strong> more expensive, requires filesystem management, not ideal for sharing data across many systems.</p><pre>Database → Operating System → Blocks → Storage Device</pre><blockquote><strong>FILE STORAGE</strong></blockquote><p>File storage organizes data into files and directories on a shared filesystem. Instead of raw blocks, users interact with familiar folder structures.</p><p><strong>Common use cases:</strong> shared enterprise storage, home directories, media repositories, application content storage.</p><p><strong>Advantages:</strong> easy to manage, shared access, familiar structure, strong collaboration support.</p><p><strong>Limitations:</strong> higher latency than block storage, weaker database performance, file locking can become a bottleneck at scale.</p><pre>Application → File System → Shared Storage</pre><blockquote><strong>OBJECT STORAGE</strong></blockquote><p>Object storage stores data as self-contained objects, each bundling the data itself, metadata, and a unique identifier. There’s no traditional directory structure — everything is accessed through APIs.</p><pre>Object<br>| — Data<br>| — Metadata<br>| — Object ID</pre><p>It’s the equivalent of a giant digital library where every book has a barcode — you search by barcode instead of remembering shelf locations.<br><strong>Common use cases:</strong> backups, images, videos, log archives, big data workloads, data lakes. Examples include Amazon S3, Azure Blob Storage, Google Cloud Storage, and OCI Object Storage.</p><p><strong>Advantages:</strong> massive scalability, cost-effective, durable, ideal for long-term retention.</p><p><strong>Limitations:</strong> not suited for transactional database workloads, higher latency, API-based access only.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/435/1*Iqvwo7GEjbRMeu4xn7xUTw.png" /><figcaption>Decision Flow for the Three Storage Types</figcaption></figure><h3>Understanding Performance Metrics</h3><p>The metrics underneath determine how fast workloads actually run.</p><blockquote><strong>IOPS (Input/Output Operations Per Second)</strong></blockquote><p>IOPS measures how many read/write operations a storage device can handle per second. A device rated at 50,000 IOPS can process far more concurrent requests than one rated at 5,000.</p><pre>Workflow:<br>Application → Thousands of Reads/Writes →Storage System → Higher IOPS i.e. Faster Processing</pre><p>This matters most for OLTP databases, transaction systems, banking applications, and e-commerce platforms. Think of it as a supermarket checkout — the more customers processed per minute, the higher the IOPS.</p><blockquote><strong>Latency</strong></blockquote><p>Latency measures how quickly a single operation completes. Itis the time a single storage operation takes to complete, typically measured in milliseconds or microseconds.</p><p>The difference between 1ms and 10ms looks trivial in isolation, but across millions of operations it compounds into noticeably slower queries and degraded user experience.</p><pre>Read Request → Storage → Response Returned<br>Time taken=Latency</pre><pre>Latency:<br>1ms= Excellent<br>5ms= Good<br>20ms= Noticeable delay</pre><p>Low latency means users experience faster response times.</p><blockquote><strong>Throughput</strong></blockquote><p>Throughput measures the amount of data transferred per second.</p><p>It measures how much data moves over time, usually in MB/s or GB/s. It matters most for data warehouses, backups, analytics, and large file transfers — the wider the highway, the more traffic flows at once.</p><h3>Thin Provisioning vs. Thick Provisioning</h3><p><strong>Thin provisioning</strong> allocates storage only as data is actually written. Request 1 TB but write 200 GB, and only 200 GB is physically consumed. This improves utilization and cuts cost,but introduces overcommitment risk — capacity can run out if growth isn’t actively monitored.</p><pre>Requested: 2TB<br>Write: 200 GB<br>Allocate only 200 GB</pre><p><strong>Thick provisioning</strong> reserves the full requested capacity immediately. Request 1 TB, and the full terabyte is locked in, even if only 200 GB is ever used. This guarantees predictable performance and capacity with no overcommitment risk, at the cost of wasted storage and higher spend.</p><pre>Requested: 1TB<br>Allocated: 1 TB<br>Used: 200 GB</pre><h3>The Hidden Danger: Overcommitment</h3><p>Overcommitment happens when total virtual allocations exceed physical capacity — say, 15 TB allocated against 10 TB of physical storage. This works fine as long as not everyone uses their full allocation simultaneously. But if usage spikes and storage suddenly fills, databases can stop writing, applications can fail, and performance can degrade sharply. Monitoring storage growth isn’t optional in production — it’s a guardrail against this exact failure mode.</p><p>A common enterprise architecture leans on all three at once.<br>Production Database → Block Storage<br>Application Shared Files → File Storage<br>Backups and Archives → Object Storage</p><h3>Conclusion</h3><p>Storage isn’t just a place to keep data — it’s a primary driver of application and database performance. Block storage delivers the low latency and high IOPS that transactional databases demand. File storage offers simplicity and shared access for enterprise applications. Object storage provides near-unlimited scalability for backups, archives, and large-scale data repositories.</p><p>Understanding IOPS, latency, throughput, and provisioning strategy lets engineers make deliberate architectural decisions instead of just buying bigger disks. The best-performing systems aren’t built by maximizing a single metric — they’re built by matching the right storage type to the right workload and balancing performance, scalability, reliability, and cost accordingly.</p><p>In modern cloud environments, storage isn’t background infrastructure anymore. It’s a strategic design decision with a direct line to business outcomes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c192f968ecca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BGP, CSPF, MPLS, and Cloud VPCs: Connecting Corporate Networks to the Cloud]]></title>
            <link>https://medium.com/@kanishkavishwasrao21/bgp-cspf-mpls-and-cloud-vpcs-connecting-corporate-networks-to-the-cloud-1d213b1bb9b0?source=rss-159f75f3e603------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d213b1bb9b0</guid>
            <category><![CDATA[nat]]></category>
            <category><![CDATA[computer-network]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Kanishka Vishwasrao]]></dc:creator>
            <pubDate>Tue, 30 Jun 2026 07:24:08 GMT</pubDate>
            <atom:updated>2026-06-30T07:24:08.873Z</atom:updated>
            <content:encoded><![CDATA[<ul><li><a href="https://medium.com/u/159f75f3e603">Kanishka Vishwasrao</a> and <a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a></li></ul><p>Modern cloud systems are powered by<strong> </strong>real networking principles<strong> </strong>that existed long before cloud came in.</p><blockquote><strong>If you understand WAN routing, you automatically understand:</strong><br>How AWS/Azure/GCP move traffic globally<br>Why VPC design matters<br>How security and routing decisions affect performance</blockquote><p>Think of this article as <strong>connecting traditional networking (WAN)</strong> with <strong>cloud networking (VPCs)</strong>.</p><h3>Part 1: Understanding WAN Routing (The Real Internet Backbone)</h3><p>WAN (Wide Area Network) routing is simply the way internet traffic travels across very large networks — like between data centers, across internet service providers (ISPs), or even between different countries and continents.</p><p>You can think of it like <strong>Google Maps for the internet</strong>. Just like Google Maps chooses the best route for your trip, WAN routing decides which path your data should take.<br>It figures out where to send traffic, tries to choose efficient paths, and can even find alternate routes if one path fails or becomes slow. This ensures that your data reaches its destination reliably, even when the network is large and complex.</p><blockquote><strong>BGP (BORDER GATEWAY PROTOCOL)-The Traffic Coordinator</strong></blockquote><p>BGP is the protocol that connects <strong>different networks (Autonomous Systems)</strong> on the internet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*7rVVP7CbDgzIr-ThWmQ2vg.png" /></figure><p>The main purpose of BGP is Internet Routing and is mainly policy-based and is used in WAN/Internet.</p><p><strong>For example:</strong><br>Airtel network talking to AWS.<br>AWS talking to Google Cloud.</p><blockquote><strong>CSPF (Constraint-Based Shortest Path First)</strong></blockquote><p>CSPF is an enhanced version of SPF (Shortest Path First) used in <strong>MPLS Traffic Engineering (MPLS-TE)</strong>.</p><p>CSPF (Constraint-Based Shortest Path First) is a routing algorithm used in MPLS Traffic Engineering that <strong>calculates the shortest path while considering constraints such as bandwidth, latency, and policy requirements</strong>. It enables more efficient and predictable traffic routing than standard SPF.</p><p>SPF = Shortest path.<br>CSPF = Shortest path that also meets business and network requirements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*2Di92Vu-QpTJMhSys5-XmQ.png" /></figure><blockquote><strong>MPLS (Multi-Protocol Label Switching)</strong></blockquote><p>MPLS (Multi-Protocol Label Switching) is a networking technology that <strong>forwards packets using short labels instead of performing a full IP route lookup at every router.</strong> This allows <strong>faster packet forwarding</strong>, lower latency, better traffic management, and <strong>higher reliability</strong> in large telecom and service provider networks.<br>MPLS <strong>improves network performance</strong> by attaching labels to packets and forwarding them based on those labels. Since routers do not need to examine the full destination IP address at every hop, traffic moves faster and more efficiently through the network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*uCTUkat0U0_qN9VMRkFu8A.png" /></figure><h3>Part 2: Mapping WAN Concepts to Cloud Networking</h3><p>Traditional WAN networks use routing protocols such as BGP, MPLS, and CSPF to determine how traffic moves between locations while maintaining performance and reliability. Cloud networking follows the same principles but uses cloud-native components such as VPCs/VCNs, Route Tables, Internet Gateways, NAT Gateways, and Network Security Groups.</p><p>A typical cloud networking workflow looks like:</p><pre>Application VM →VPC/VPN →Route Table →IGW/NAT Gateway →Destination</pre><p>Before traffic is allowed to pass, security policies are evaluated:</p><pre>Traffic generated → Route table decided “Where should it go?” →NSG Decides “Is it allowed?” → Traffic Forwarded</pre><p>In cloud networking:<br><strong>Routing determines the path.<br>Security determines permission.</strong></p><blockquote><strong>Networking Workflow</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*XMOODdFX2_9wLcnFAIhTKg.png" /></figure><p>In traditional WAN environments, BGP discovers available routes, CSPF selects the most suitable path, and MPLS efficiently forwards traffic along that path. Cloud networking follows the same logical workflow using Route Tables, Gateways, and Security Groups, providing similar routing, forwarding, and security functions through cloud-native services.</p><p>Cloud networking is not a replacement for traditional networking — it is an abstraction of it. Once you understand how BGP discovers routes, how CSPF selects paths, and how MPLS forwards traffic, concepts such as VPCs, Route Tables, NAT Gateways, and Security Groups become much easier to understand because they solve the same networking problems in a cloud-native way.</p><ul><li><strong>Security determines permission.</strong></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d213b1bb9b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Layer 3 Routing & Global Traffic.]]></title>
            <link>https://medium.com/@kanishkavishwasrao21/layer-3-routing-global-traffic-f72f7b384518?source=rss-159f75f3e603------2</link>
            <guid isPermaLink="false">https://medium.com/p/f72f7b384518</guid>
            <category><![CDATA[nat]]></category>
            <category><![CDATA[comuputernetworks]]></category>
            <category><![CDATA[routing]]></category>
            <category><![CDATA[router]]></category>
            <dc:creator><![CDATA[Kanishka Vishwasrao]]></dc:creator>
            <pubDate>Wed, 24 Jun 2026 15:03:24 GMT</pubDate>
            <atom:updated>2026-06-24T15:03:24.354Z</atom:updated>
            <content:encoded><![CDATA[<h3>Layer 3 Routing &amp; Global Traffic. How routers choose paths using Administrative Distance (AD), NAT types (Static, Dynamic, PAT), and Point-to-Point authentication.</h3><ul><li><a href="https://medium.com/u/159f75f3e603">Kanishka Vishwasrao</a> and <a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a></li></ul><p>Every time you open a website, stream a video, or access a cloud application, your data travels across multiple networks in just milliseconds. What seems instant and effortless is actually powered by routers constantly making intelligent decisions to ensure your data reaches the right destination efficiently and securely.</p><p>But how do routers decide which path to take? How do private networks communicate with the global internet? And how do devices ensure they are exchanging data with trusted entities?</p><p><strong>In this article, we’ll break down three critical Layer 3 concepts in a simple and relatable way:</strong></p><p><strong>Administrative Distance (AD) — <em>How routers choose the best path<br></em> NAT (Static, Dynamic, PAT) — <em>How private networks talk to the internet</em><br>Point-to-Point Authentication — <em>How routers verify who they’re talking to</em></strong></p><blockquote><strong>How Routers Choose Paths (Administrative Distance — AD)</strong></blockquote><p><strong>The problem: </strong><br>A router often learns multiple routes to the same destination; from different sources like static routes, OSPF, RIP, etc.<br>So, the question is: <strong>Which path should it trust?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*bl5qT_Fzya3Ma9R10ZKldA.png" /></figure><h4>That’s exactly what AD does:</h4><p>Administrative Distance is a number that tells a router how much it should <em>trust</em> a route. AD does <strong>NOT</strong> decide the <em>best path. </em>AD decides the <em>most trusted source.<br></em><strong>Administrative Distance = Trust Score of a route source</strong></p><p><strong>Why AD Matters in Real Networks</strong></p><ul><li>Prevents routing confusion when multiple protocols run together</li><li>Helps in <strong>backup route design</strong> (failover scenarios)</li><li>Useful in <strong>hybrid networks (static + dynamic routing)</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*OhlcYOEv5GnXWl3oDRvUzg.png" /><figcaption>AD VALUES AND TRUST LEVEL FOR VARIOUS SOURCES</figcaption></figure><p><strong>Why does <em>low AD = high trust</em>?</strong><br>Network engineers and protocol designers defined Administrative Distance as a standard convention to rank the reliability of different routing sources. Think of AD like a <strong>ranking system</strong>:</p><ul><li>Smaller number = closer to certainty</li><li>Larger number = more doubt</li></ul><p>The more indirect the information → the <strong>higher the AD.<br></strong>Administrative Distance does not determine the shortest or fastest path — it only determines which <strong>source of routing information is the most trusted</strong>.</p><h4>Directly Connected (AD = 0)</h4><ul><li>Router interface is physically connected</li><li>No dependency on any protocol<br><strong>Most trustworthy — no chance of misinformation</strong></li></ul><h4>Static Route (AD = 1)</h4><ul><li>Configured manually by admin</li><li>No dynamic calculation involved<br> <strong>Highly reliable (human-defined)</strong></li></ul><h4>Dynamic Protocols (OSPF, RIP, etc.)</h4><ul><li>Learn routes from other routers</li><li>Depend on:</li><li>network updates</li><li>timers</li><li>neighbor correctness</li></ul><p>These values are defined by Cisco (default AD values in routers) and are adopted widely across networking concepts</p><blockquote><strong>NAT — How Private Networks Access the Internet</strong></blockquote><p>Your home/private network uses IPs like:</p><pre>192.168.x.x / 10.x.x.x</pre><p>These are <strong>not routable on the internet</strong>. So how does your device access Google?</p><p>This is where NAT comes into picture acting as a bridge between private networks and the public internet.</p><p>Depending on how IP addresses are mapped, NAT operates in different forms:</p><p><strong>1]Static NAT</strong></p><p>One private IP ↔ One public IP</p><p>Use Cases:<br>Hosting servers (web/database)<br>Need fixed public access</p><pre>Example: 192.168.1.10 ↔ 203.0.113.10</pre><p>2]Dynamic NAT</p><p>Private IPs mapped to a <strong>pool of public IPs</strong></p><p>Use Cases:<br>Moderate size organizations<br>Limited public IPs but more than one available</p><p>3]PAT-Port Address Translation/NAT Overload</p><p>Multiple private IPs share <strong>one public IP</strong>, differentiated by ports</p><p>Use Cases:<br>Used in home routers and enterprise networks</p><pre>Examples:<br>192.168.1.10:5000 → 203.0.113.1:10001<br>192.168.1.11:5001 → 203.0.113.1:10002</pre><blockquote><strong>Point-to-Point Authentication (Router Trust Mechanism)</strong></blockquote><p><em>When two routers establish a point-to-point connection, they must verify each other’s identity to ensure that data is not exchanged with an unauthorized device. This process is handled through authentication protocols, with the two most common being </em><strong><em>PAP</em></strong><em> and </em><strong><em>CHAP</em></strong><em>.</em></p><p><strong>Common Authentication Protocols:</strong><br>1. Password Authentication Protocol<br><strong>PAP is the simplest form of authentication.</strong><br>In this method, the router sends its <strong>username and password in plain text</strong> to the other router during connection setup. If the credentials match, the connection is established. Since the credentials are transmitted without encryption, PAP is <strong>highly vulnerable to interception and attacks</strong>.</p><p>2. Challenge Handshake Authentication Protocol<br><strong>CHAP is a more secure and widely used authentication method.</strong><br>Instead of sending the actual password, it uses a <strong>challenge-response mechanism</strong>.<br>Working:<br>a] The router sends a <strong>challenge (random number).<br>b] T</strong>he other router uses its password to generate a <strong>hashed response.<br></strong>c] The first router verifies the response using the same hash algorithm.<br>d] If the values match, authentication succeeds.<br>Even if someone intercepts the communication, they <strong>cannot retrieve the actual password</strong>, making it much more secure than PAP.</p><blockquote><strong>A VISUAL FLOW TO UNDERSTAND THE DATA FLOW</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*3TTjif3hCnAPJp6L9_kDvw.png" /></figure><blockquote><strong>Conclusion</strong></blockquote><p>At its core, Layer 3 networking is not just about moving packets from one point to another — it’s about making <strong>intelligent, reliable, and secure decisions in real time</strong>. Every time data travels across the internet, routers are evaluating trust, translating identities, and validating connections within milliseconds.</p><p>We saw how <strong>Administrative Distance (AD)</strong> helps routers decide <em>which source of information to trust</em>, ensuring that the most reliable path is always chosen. We explored how <strong>NAT (Static, Dynamic, and PAT)</strong> acts as a bridge between private and public networks, enabling seamless global communication despite the limitations of IP addressing. And finally, we understood how <strong>authentication protocols like PAP and CHAP</strong> establish trust between devices, ensuring that data exchange happens only between verified entities.</p><p>When you connect these concepts, we understand that -<br>Routing is not just about paths — it’s about <strong>trust<br></strong> NAT is not just translation — it’s about <strong>connectivity at scale</strong><br>Authentication is not just verification — it’s about <strong>security and integrity</strong></p><p>Together, these mechanisms form the foundation of how global traffic flows efficiently and securely across networks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f72f7b384518" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Layer 2 Switching & Access Control-What’s Actually Happening Inside Your Switch]]></title>
            <link>https://medium.com/@kanishkavishwasrao21/layer-2-switching-access-control-whats-actually-happening-inside-your-switch-5227c4b994c2?source=rss-159f75f3e603------2</link>
            <guid isPermaLink="false">https://medium.com/p/5227c4b994c2</guid>
            <category><![CDATA[computer-network]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[network-switches]]></category>
            <dc:creator><![CDATA[Kanishka Vishwasrao]]></dc:creator>
            <pubDate>Mon, 22 Jun 2026 11:45:21 GMT</pubDate>
            <atom:updated>2026-06-22T11:45:21.327Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/u/159f75f3e603">Kanishka Vishwasrao</a> and <a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a></p><p>Modern networks are not just about moving data from one device to another. They’re about deciding <strong>who can communicate, where traffic is allowed to go, and what should be blocked before it ever reaches a firewall.</strong></p><p>Most people think security starts at Layer 3 or Layer 7. In reality, many of the first security and forwarding decisions happens inthe network switch itself.</p><p>Every frame entering a switch goes through a series of checks:</p><ul><li>Which VLAN does this belong to?</li><li>Which MAC address is the destination?</li><li>Which port should receive it?</li><li>Is this traffic even allowed?</li><li>Should the frame be forwarded, dropped, or isolated?</li></ul><p><strong>In this article, we’ll explore:</strong></p><ul><li>VLAN segmentation</li><li>Access and Trunk ports</li><li>CAM tables and MAC learning</li><li>Layer 2 security controls</li><li>The complete Layer 2 forwarding pipeline</li></ul><h3>Before We Begin: Why Layer 2 Matters</h3><blockquote>Imagine a company where HR, Finance, and Engineering are all connected to the same switch.</blockquote><blockquote>Without any segmentation, every broadcast generated by any department is visible to every other department. ARP requests, discovery protocols, and other broadcast traffic spread across the entire network.</blockquote><blockquote>As the number of devices grows, so does unnecessary traffic. More importantly, everyone exists in the same trust boundary.</blockquote><blockquote>A compromised machine in Engineering can potentially interact with systems belonging to Finance. Sensitive departments become exposed simply because they share the same Layer 2 network.</blockquote><blockquote>This is why network engineers rarely treat a switch as a simple connectivity device. A switch is a traffic controller, a segmentation engine, and often the first line of network security.</blockquote><h3>The Data Link Layer: Local Delivery Using MAC Addresses</h3><p>The Data Link Layer (Layer 2 of the OSI model) is responsible for delivering frames within a local network.</p><p>Unlike Layer 3, which uses IP addresses to move traffic between networks, Layer 2 relies on MAC addresses to identify devices on the same network segment.</p><p>Before a frame ever reaches a router, it must navigate a series of decisions inside the local network — MAC address lookups, VLAN identification, port classification, forwarding logic, and security checks.</p><p>The OSI model’s Layer 2 is the <strong>Data Link layer</strong>. Its job is local delivery: moving frames between devices on the same network segment using <strong>MAC addresses</strong>, not IP addresses.</p><p>The IP address is a <strong>logical identifier</strong> used for routing data across networks, and it can change depending on the network you are connected to. On the other hand, the MAC address is a <strong>permanent, hardware-level identifier</strong> assigned to a device’s network interface and is used within a local network to ensure the data reaches the exact machine. So, while the IP address helps the data travel long distances to the right location, the MAC address ensures it is delivered to the correct device once it gets there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*L4X6HQzmDHt-carE7e17GA.png" /></figure><h3>What Happens Inside a Switch?</h3><p>A switch controls how data moves between devices efficiently and securely. Unlike a hub, it is <strong>intelligent — it learns, remembers, and filters traffic to optimize communication.</strong></p><ul><li>It <strong>receives data in the form of frames</strong>, which operate at Layer 2.</li><li>It <strong>checks the destination MAC address</strong> in each frame to understand exactly where the data needs to go.</li><li>It <strong>decides the correct port</strong> to forward the frame instead of sending it everywhere.</li><li>It <strong>learns over time</strong> by recording MAC addresses in its internal MAC (CAM) table.</li><li>It <strong>forwards data only to the intended device</strong>, reducing unnecessary network traffic.</li><li>It <strong>prevents devices from seeing data that isn’t meant for them</strong>, improving security and performance.</li></ul><p>Unlike a hub, a switch does not blindly broadcast traffic everywhere. Only the intended recipient should receive the frame.</p><p>This reduces congestion, improves performance, and prevents unnecessary exposure of traffic.</p><h3>VLANs — Invisible Walls Inside a Physical Switch</h3><p>A VLAN (Virtual LAN) allows a single physical switch to behave as if it were multiple independent switches.</p><p>Each VLAN becomes its own broadcast domain. Devices inside VLAN 10 can communicate directly with other devices in VLAN 10. However, they cannot communicate with devices in VLAN 20 or VLAN 30, even though all devices are connected to the same physical switch. To communicate between VLANs, traffic must be sent to a Layer 3 device such as a router or Layer 3 switch. This creates clear security boundaries while reducing unnecessary broadcast traffic and improves <strong>network segmentation, security, and performance</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*57yhXDe0uUz-c3IXw3WDww.png" /></figure><h3>How VLANs Work (Step-by-step)</h3><ul><li>A switch <strong>assigns each port to a VLAN ID</strong> (e.g., VLAN 10, VLAN 20).</li><li>Devices connected to those ports <strong>automatically become part of that VLAN</strong>.</li><li>When a frame is sent, the switch <strong>keeps it within the same VLAN</strong>.</li><li>Devices in different VLANs <strong>cannot directly communicate</strong> at Layer 2.</li><li>To enable communication between VLANs, <strong>routing (Layer 3) is required</strong>.</li><li>Using the <strong>802.1Q standard</strong>, the switch can <strong>tag frames with VLAN information</strong> when sending data between switches (trunk links).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*2pIDLmlGb38cmgP0LqY4Yw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*2phpGAjRbPNbAkWhwDZ-9Q.png" /><figcaption>VLAN SEGMENTATION IN A SINGLE SWITCH</figcaption></figure><h3>Trunk vs. Access Ports — Two Modes, Very Different Jobs</h3><p>Switch ports can operate in two main modes: <strong>Access mode</strong> and <strong>Trunk mode</strong>, and each has a completely different purpose in a VLAN-based network.</p><h3>Access Port (End Device Mode)</h3><p>An <strong>access port</strong> is used to connect <strong>end devices</strong> like laptops, servers, printers, etc.</p><ul><li>It <strong>belongs to only one VLAN</strong> at a time.</li><li>Any device connected to it becomes part of that VLAN automatically.</li><li>Frames sent or received are <strong>untagged</strong> (no VLAN information attached).</li><li>The switch internally knows which VLAN the port belongs to, so it handles the mapping.</li><li>It is simple and is used at the <strong>edge of the network</strong>.</li></ul><h3>Trunk Port (Switch-to-Switch Mode)</h3><p>A <strong>trunk port</strong> is used to connect <strong>network devices like switches, routers, or firewalls</strong>.</p><ul><li>It <strong>carries traffic for multiple VLANs simultaneously</strong>.</li><li>Frames are <strong>tagged using 802.1Q</strong> to identify which VLAN they belong to.</li><li>This tagging ensures that VLAN information is preserved across devices.</li><li>It is used for <strong>interconnecting switches</strong> or connecting to a Layer 3 device.</li><li>Without trunking, VLANs cannot extend beyond a single switch.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*RAGdmC3H7fiHbEkiBGivOA.png" /></figure><h3>The CAM Table — The Switch’s Memory</h3><p>A switch is not a hub. It doesn’t blast traffic everywhere. It learns where every device lives by building a <strong>Content Addressable Memory (CAM) table</strong> — also called the MAC address table — and uses it to make surgical forwarding decisions.</p><p>This is where a switch <strong>stores MAC address mappings</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xui68iPPWwpT-ve5qH5KuA.png" /><figcaption>CAM TABLE: HOW A SWITCH LEARNS AND FORWARDS</figcaption></figure><h3><strong>The complete Layer 2 forwarding pipeline</strong></h3><p>Attackers understand that Layer 2 contains valuable trust relationships.</p><p>Common Layer 2 attacks include:</p><ul><li>MAC flooding</li><li>ARP spoofing</li><li>VLAN hopping</li><li>Rogue DHCP servers</li></ul><p>Without protection, attackers may redirect traffic, intercept communications, or overwhelm switch resources.</p><p>To defend against these threats, modern switches implement controls such as:</p><ul><li>Port Security</li><li>Dynamic ARP Inspection (DAI)</li><li>DHCP Snooping</li><li>BPDU Guard</li><li>Root Guard</li><li>Storm Control</li></ul><p>These mechanisms transform the switch from a forwarding device into an active security enforcement point.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/262/1*Vdjma5qFzstDv-L7h4RuAw.png" /><figcaption>WORKFLOW</figcaption></figure><h3>Conclusion</h3><p>A switch does far more than simply connect devices. Every frame that enters a switch goes through a series of decisions — identifying its VLAN, learning MAC addresses, checking security policies, and determining the correct forwarding path. These processes happen in milliseconds, yet they form the foundation of how modern networks achieve performance, scalability, and security.</p><p>Features such as VLANs, trunk links, CAM tables, and Layer 2 security controls allow network engineers to build networks that are not only efficient but also segmented and resilient. Understanding what happens inside a switch provides a deeper appreciation of how local networks operate and highlights why Layer 2 remains one of the most important layers in network design.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5227c4b994c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Packet to Server: Understanding Data Flow Through the OSI and TCP/IP Models]]></title>
            <link>https://medium.com/@kanishkavishwasrao21/from-packet-to-server-understanding-data-flow-through-the-osi-and-tcp-ip-models-3bb583879347?source=rss-159f75f3e603------2</link>
            <guid isPermaLink="false">https://medium.com/p/3bb583879347</guid>
            <category><![CDATA[computer-network]]></category>
            <category><![CDATA[osi-model]]></category>
            <dc:creator><![CDATA[Kanishka Vishwasrao]]></dc:creator>
            <pubDate>Wed, 17 Jun 2026 11:03:32 GMT</pubDate>
            <atom:updated>2026-06-17T11:03:32.445Z</atom:updated>
            <content:encoded><![CDATA[<ul><li><a href="https://medium.com/u/159f75f3e603">Kanishka Vishwasrao</a> and <a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a></li></ul><p>Every engineer uses the network.</p><p>Backend services call APIs. Databases replicate data across regions. Browsers fetch web pages. Mobile applications synchronize state with cloud infrastructure. Kubernetes clusters communicate across nodes. Yet many engineers interact with networking only through abstractions provided by frameworks, cloud platforms, and SDKs.</p><p>The result is a common gap in understanding: we know how to build applications, but not always how those applications communicate.</p><p>Networking becomes much easier to reason about when viewed as a series of independent problems, each solved at a different layer.</p><p>This is exactly what the OSI Model attempts to do.</p><p>The OSI model is not how the Internet is implemented. Modern networks use the TCP/IP model. However, the OSI model remains one of the most useful mental frameworks for understanding how data moves through a system because it separates networking concerns into clearly defined layers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*alBNRTAEyeYC2WLJ1O9HEw.png" /></figure><p>Each layer provides services to the layer above it while hiding implementation details beneath it.</p><p>Understanding these layers helps engineers debug production incidents, design distributed systems, optimize application performance, and reason about network failures.</p><p>Let’s follow a request from a browser to a server and examine what each layer contributes to that journey.</p><h3><strong>Layer 1 — Physical Layer</strong></h3><p>The Physical Layer is responsible for transmitting raw bits between devices.</p><p>At this level, networking has nothing to do with HTTP requests, APIs, databases, or applications. The only concern is moving electrical, optical, or radio signals through a physical medium.</p><p>Common transmission media include:</p><ul><li>Ethernet cables</li><li>Fiber optic cables</li><li>Wi-Fi radio frequencies</li><li>Cellular networks</li><li>Satellite communication links</li></ul><p>Every packet sent across the Internet eventually becomes a sequence of binary signals transmitted through one of these mediums.</p><p>The Physical Layer introduces constraints that directly influence system design.</p><p>Latency, for example, is fundamentally constrained by physics. A request traveling from Mumbai to Virginia must cross thousands of kilometers of infrastructure. Even under ideal conditions, the speed of light imposes a lower bound on communication time.</p><p>This is why large-scale systems invest heavily in:</p><ul><li>Content Delivery Networks (CDNs)</li><li>Edge computing</li><li>Regional deployments</li><li>Multi-region architectures</li></ul><p>Many performance issues attributed to software are actually consequences of physical distance.</p><p>For distributed systems engineers, Layer 1 serves as an important reminder: Network latency is not a software problem. It is a physics problem.</p><p>Every architecture eventually becomes constrained by it.</p><h3><strong>Layer 2 — Data Link Layer</strong></h3><p>Once bits can move between devices, the next challenge is organizing communication within a local network.</p><p>The Data Link Layer provides local delivery between devices connected to the same network segment.</p><p>The primary concepts introduced here are:</p><ul><li>MAC addresses</li><li>Ethernet frames</li><li>Switches</li><li>VLANs</li><li>ARP</li></ul><p>Every network interface card is assigned a MAC address that uniquely identifies it within a local network.</p><p>When a machine wants to communicate with another device on the same subnet, it packages data into an Ethernet frame containing:</p><ul><li>Source MAC address</li><li>Destination MAC address</li><li>Payload</li><li>Error detection information</li></ul><p>Switches operate at Layer 2.</p><p>Unlike hubs, which broadcast traffic to every connected device, switches maintain MAC address tables and forward frames only to the correct destination.</p><p>This significantly reduces unnecessary traffic and improves network efficiency.</p><p>Layer 2 is also where ARP (Address Resolution Protocol) operates.</p><p>Suppose a machine knows the destination IP address but not the corresponding MAC address. ARP resolves this mapping by broadcasting a request to the local network.</p><p>For example:</p><pre>arp -a</pre><p>will display recently learned IP-to-MAC mappings.</p><p>Many networking issues inside Kubernetes clusters, VPCs, and enterprise networks eventually trace back to Layer 2 concepts such as VLAN misconfigurations, ARP failures, or switching issues.</p><p>The key abstraction provided by Layer 2 is local delivery.</p><p>It guarantees nothing about the Internet as a whole. Its responsibility ends at the local network boundary.</p><h3><strong>Layer 3 — Network Layer</strong></h3><p>Layer 2 solves communication within a local network. Layer 3 solves communication between networks.</p><p>This is the layer where IP addresses and routing become relevant.</p><p>Every packet contains:</p><ul><li>Source IP address</li><li>Destination IP address</li></ul><p>Routers inspect the destination address and determine the next hop required to move the packet closer to its destination.</p><p>An important misconception among newer engineers is that routers calculate complete end-to-end paths.</p><p>They do not.</p><p>Each router makes an independent forwarding decision using its routing table.</p><p>Collectively, these decisions create global routing.</p><p>For example, when a user in India accesses an application hosted in AWS us-east-1, the packet may traverse:</p><ul><li>Local ISP infrastructure</li><li>National backbone providers</li><li>International transit networks</li><li>AWS edge infrastructure</li><li>VPC routing components</li></ul><p>No single router has complete knowledge of this path.</p><p>The Internet scales because responsibility is distributed.</p><p>Several critical networking concepts live at Layer 3:</p><p><strong><em>Subnetting</em></strong></p><p>Large networks are divided into smaller logical segments.</p><p>Examples include:</p><ul><li>AWS VPC subnets</li><li>Kubernetes pod networks</li><li>Enterprise network segmentation</li></ul><p>Subnetting improves scalability, security, and manageability.</p><p><strong><em>Routing Protocols</em></strong></p><p>Routers exchange route information using protocols such as:</p><ul><li>BGP</li><li>OSPF</li><li>IS-IS</li></ul><p>BGP, in particular, is responsible for routing traffic across the public Internet.</p><p><strong><em>ICMP</em></strong></p><p>ICMP provides diagnostic capabilities.</p><p>Tools such as:</p><pre>ping<br>traceroute</pre><p>depend on ICMP messages.</p><p>When debugging production connectivity issues, Layer 3 verification is often the first step.</p><p>If packets cannot reach the destination, application-level debugging becomes irrelevant.</p><p>The abstraction provided by Layer 3 is global reachability.</p><p>Applications only need an address. Routing infrastructure handles the rest.</p><h3><strong>Layer 4 — Transport Layer</strong></h3><p>Reaching the destination machine is not enough. Applications require communication guarantees. This is the responsibility of the Transport Layer.</p><p>Layer 4 introduces:</p><ul><li>Ports</li><li>Reliability</li><li>Flow control</li><li>Congestion control</li></ul><p>The two dominant protocols are TCP and UDP.</p><p><strong><em>TCP</em></strong></p><p>TCP prioritizes reliability.</p><p>Before transmitting data, TCP establishes a connection using the three-way handshake:</p><p><strong>SYN</strong></p><p><strong>SYN-ACK</strong></p><p><strong>ACK</strong></p><p>Once established, TCP provides:</p><ul><li>Ordered delivery</li><li>Retransmissions</li><li>Acknowledgments</li><li>Flow control</li><li>Congestion control</li></ul><p>This makes TCP suitable for:</p><ul><li>HTTP/HTTPS</li><li>Database connections</li><li>SSH</li><li>Financial transactions</li></ul><p>A missing packet is retransmitted until delivery succeeds.</p><p>Reliability is achieved at the cost of latency and overhead.</p><p><strong><em>UDP</em></strong></p><p>UDP prioritizes speed.</p><p>There is:</p><ul><li>No connection establishment</li><li>No retransmission</li><li>No delivery guarantees</li><li>No packet ordering</li></ul><p>The sender transmits data and moves on.</p><p>This makes UDP ideal for</p><ul><li>Video streaming</li><li>VoIP</li><li>Multiplayer gaming</li><li>Real-time telemetry</li></ul><p>In these workloads, stale data is often worse than missing data.</p><p>A dropped video frame is acceptable. A two-second delay is not.</p><p><strong><em>Ports</em></strong></p><p>Ports allow multiple services to share the same machine.</p><p>Examples include:</p><pre>22      SSH<br>53      DNS<br>80      HTTP<br>443     HTTPS<br>3306    MySQL<br>5432    PostgreSQL</pre><p>The IP address identifies the host. The port identifies the application.</p><p>This distinction becomes important when debugging microservices, service meshes, and containerized workloads.</p><p>Layer 4 is fundamentally about tradeoffs.</p><p>Reliability, latency, throughput, and resource consumption compete with one another.</p><p>Every distributed system eventually makes choices at this layer.</p><h3><strong>Layer 5 — Session Layer</strong></h3><p>The Session Layer manages long-lived interactions between systems.</p><p>While often less visible in modern architectures, its concepts appear everywhere.</p><p>A session represents shared communication state between two parties.</p><p>Examples include:</p><ul><li>Authentication sessions</li><li>WebSocket connections</li><li>Database connections</li><li>RPC streams</li><li>Video conferencing sessions</li></ul><p>Consider a database connection pool.</p><p>Creating a TCP connection for every query would be inefficient.</p><p>Instead, connections remain active and are reused.</p><p>This is effectively session management.</p><p>Similarly, when a user authenticates into an application, subsequent requests rely on session context rather than repeating authentication logic every time.</p><p>Modern implementations frequently move session logic into:</p><ul><li>JWT tokens</li><li>OAuth flows</li><li>Distributed caches</li><li>Sticky sessions</li><li>Stateful service layers</li></ul><p>The fundamental problem remains unchanged:</p><p>How do systems preserve context across multiple interactions?</p><p>For distributed systems, this becomes one of the hardest architectural challenges because state introduces complexity.</p><p>Stateless services scale easily.</p><p>Stateful interactions require coordination.</p><p>The Session Layer exists to manage that coordination.</p><h3><strong>Layer 6 — Presentation Layer</strong></h3><p>The Presentation Layer is responsible for how information is represented.</p><p>Data arriving successfully is meaningless if the receiving system cannot interpret it.</p><p>Three major responsibilities live here:</p><p><strong><em>Serialization</em></strong></p><p>Different systems need a common representation format.</p><p>Examples include:</p><ul><li>JSON</li><li>XML</li><li>Protocol Buffers</li><li>Avro</li></ul><p>A Java service and a Go service may have completely different internal object models.</p><p>Serialization allows them to exchange information consistently.</p><p>Protocol Buffers, for example, are heavily used in gRPC because they provide smaller payloads and faster parsing than JSON.</p><p><strong><em>Encryption</em></strong></p><p>Modern applications depend heavily on encryption.</p><p>TLS operates here.</p><p>When HTTPS is used, application data is encrypted before transmission and decrypted by the receiving system.</p><p>Without TLS:</p><ul><li>Credentials are exposed</li><li>Session tokens can be intercepted</li><li>Sensitive data becomes vulnerable</li></ul><p>Encryption is no longer optional infrastructure.</p><p>It is a baseline requirement.</p><p><strong><em>Compression</em></strong></p><p>Compression reduces bandwidth consumption and improves transfer efficiency.</p><p>Examples include:</p><ul><li>Gzip</li><li>Brotli</li></ul><p>Many APIs automatically compress large responses before transmission.</p><p>At scale, these savings translate directly into lower infrastructure costs and improved latency.</p><p>The Presentation Layer ensures that systems agree on format, security, and representation before data reaches the application.</p><p><strong>Layer 7 — Application Layer</strong></p><p>This is the layer most software engineers interact with every day.</p><p>Layer 7 defines protocols that applications use to communicate.</p><p>Examples include:</p><ul><li>HTTP</li><li>HTTPS</li><li>DNS</li><li>SMTP</li><li>FTP</li><li>WebSockets</li><li>gRPC</li></ul><p>When a browser requests:</p><pre>GET /products HTTP/1.1</pre><p>that interaction occurs at Layer 7.</p><p>When a microservice calls another service through a REST endpoint, that interaction occurs at Layer 7.</p><p>When a DNS resolver translates a domain name into an IP address, that interaction occurs at Layer 7.</p><p>Modern application infrastructure extends far beyond protocol definitions.</p><p>Layer 7 often includes:</p><ul><li>API gateways</li><li>Load balancers</li><li>Rate limiters</li><li>Authentication middleware</li><li>Service meshes</li><li>Web Application Firewalls (WAFs)</li></ul><p>Most production engineering work happens here because this is where business functionality exists.</p><p>However, Layer 7 problems frequently originate elsewhere.</p><p>An API timeout might actually be:</p><ul><li>Packet loss at Layer 4</li><li>Routing failure at Layer 3</li><li>Physical connectivity issues at Layer 1</li></ul><p>Experienced engineers understand that symptoms appear at Layer 7 while root causes may exist anywhere below it.</p><p><strong>Following a Real Request Through the Stack</strong></p><p>Consider a user opening:</p><pre>https://example.com</pre><p>The browser creates an HTTP request at Layer 7.</p><p>TLS encrypts the request at Layer 6.</p><p>Session context is maintained at Layer 5.</p><p>TCP encapsulates the request into segments at Layer 4.</p><p>IP adds source and destination addresses at Layer 3.</p><p>Ethernet frames are created at Layer 2.</p><p>The Physical Layer converts everything into signals and transmits them.</p><p>At the destination, the process happens in reverse.</p><p>This process is known as <strong>encapsulation</strong> and <strong>decapsulation</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/324/1*HDNFvfq-M0vYhyXNUJMHgw.png" /></figure><h3>Every network interaction follows this pattern.</h3><p>Whether you’re loading a webpage, streaming a video, replicating a database, or calling a microservice, the same principles apply.</p><p><strong>Debugging Systems Through the OSI Lens</strong></p><p>One of the most practical uses of the OSI model is troubleshooting.</p><p>When something breaks, work from the bottom upward.</p><p><strong>Layer 1:</strong> Is the network physically reachable?</p><p><strong>Layer 2:</strong> Can local devices communicate?</p><p><strong>Layer 3:</strong> Can packets reach the destination?</p><p><strong>Layer 4: </strong>Is the service listening on the expected port?</p><p><strong>Layer 5:</strong> Is session state valid?</p><p><strong>Layer 6:</strong> Are encryption or serialization issues occurring?</p><p><strong>Layer 7: </strong>Is the application behaving correctly?</p><p>This systematic approach prevents engineers from debugging application code when the actual problem is a routing failure or network outage.</p><h3>Conclusion</h3><p>The OSI model is often taught as networking theory. In practice, it is a systems design framework.</p><p>Each layer solves a specific problem. Each layer hides complexity from the layers above it. Each layer can evolve independently.</p><p>The same principle appears everywhere in software engineering: operating systems, distributed systems, cloud platforms, microservices, databases, and APIs.</p><p>Engineers who understand only the application layer build features. Engineers who understand the entire stack build resilient systems. And in modern distributed architectures, that distinction matters more than ever.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3bb583879347" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PostgreSQL vs. MSSQL: MVCC, Auto vacuum, and Engine Architecture]]></title>
            <link>https://medium.com/@kanishkavishwasrao21/postgresql-vs-mssql-mvcc-auto-vacuum-and-engine-architecture-151b08804887?source=rss-159f75f3e603------2</link>
            <guid isPermaLink="false">https://medium.com/p/151b08804887</guid>
            <category><![CDATA[oracle]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[cloud-architecture]]></category>
            <category><![CDATA[mssql]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Kanishka Vishwasrao]]></dc:creator>
            <pubDate>Sat, 13 Jun 2026 08:46:03 GMT</pubDate>
            <atom:updated>2026-06-13T08:46:03.028Z</atom:updated>
            <content:encoded><![CDATA[<ul><li><a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a> and <a href="https://medium.com/u/159f75f3e603">Kanishka Vishwasrao</a></li></ul><p>Modern databases may look similar on the surface, but their true differences reveal themselves deep within their internal architecture.<br>The real differences emerge deep within the database engine itself, in how it handles concurrency, storage, and query execution.</p><p>How does a database handle concurrent transactions without locking users out? What happens when rows are updated millions of times? How does storage remain efficient over years of operation?</p><p>The answers lie in the internal architecture.</p><p>PostgreSQL and Microsoft SQL Server (MSSQL) are two of the most widely deployed enterprise-grade relational databases. Both support ACID compliance, transaction management, indexing, query optimization, and high availability and yet their internal philosophies are fundamentally different.</p><p>At a high level, both PostgreSQL and SQL Server solve the same problem: allowing multiple users to read and modify data simultaneously while preserving consistency.</p><p>In this article, we explore how PostgreSQL uses MVCC and Autovacuum, and how MSSQL relies on its Relational and Storage Engine architecture, highlighting the key differences in their design philosophies.</p><h3>The Core Problem: Concurrent Access</h3><p>Imagine one user updating a customer’s balance while another user is reading the same record. The database must ensure that readers don’t see partially completed transactions and writers don’t corrupt data being accessed elsewhere.</p><p>Both systems solve this problem differently.</p><p>PostgreSQL was designed around <strong>Multi-Version Concurrency Control (MVCC)</strong> as a core architectural principle; a mechanism that allows multiple transactions to operate on the same data without blocking each other.<br>SQL Server relied on <strong>locking and latching mechanisms</strong>, later adding row-versioning features to improve concurrency.</p><blockquote><strong>How PostgreSQL solves it: MVCC</strong></blockquote><p>PostgreSQL was built from the ground up around a concept called Multi-Version Concurrency Control, or MVCC. The idea is simple but powerful: instead of modifying a row in place, PostgreSQL creates a new version of that row on every update and keeps the old version around for any transaction that still needs it.</p><h4>The Google Docs Analogy</h4><p>Think of Google Docs. Multiple people can open the same document simultaneously. Some are reading, some are typing, and nobody blocks anyone else. Everyone sees a consistent version of the document at any given moment.</p><p>PostgreSQL works the same way with data. Readers get a consistent snapshot of the database as it existed when their transaction began. Writers create new versions without touching what the readers are seeing. Nobody waits on anyone else.</p><h4>A Walk-Through Example</h4><p>Let’s say a table stores employee salaries, and the current salary for one employee is 1,000.</p><p>• Transaction A starts and reads the salary. It sees 1,000: the current committed value.</p><p>• While Transaction A is still running, Transaction B updates the salary to 2,000.</p><p>• PostgreSQL does not overwrite the existing row.<br>It marks the old row as expired (using a hidden field called xmax) and inserts a brand-new row with salary 2,000 (stamped with a new xmin).</p><p>• Both versions now exist in the table at the same time.</p><p>• Transaction A, which started before the update, continues to see 1,000: its snapshot hasn’t changed.</p><p>• Transaction B and any new transactions see 2,000.</p><p>Each transaction sees its own consistent snapshot of reality, without locking or blocking the other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*ApDuCm3vg3KwEqb5BuSxBw.png" /></figure><h4>The Hidden Fields: xmin and xmax</h4><p>PostgreSQL attaches two invisible metadata fields to every row:</p><p>• xmin — the transaction ID that created this version of the row</p><p>• xmax — the transaction ID that deleted or updated this version (if any)</p><p>When a transaction reads data, PostgreSQL checks these fields to determine which version of each row was “visible” when the transaction began. This is how it serves different versions of the same row to different transactions simultaneously</p><h4>The Trade-Off: Dead Tuples and Autovacuum</h4><p>PostgreSQL performs exceptionally well in environments with heavy read workloads or mixed workloads where multiple users interact with the database simultaneously. However, this approach comes with a trade-off. Since old versions of rows are retained, they accumulate over time and can consume storage and degrade performance if not managed properly.</p><p>Every update leaves behind a “dead tuple” — the outdated version of a row that’s no longer needed by any active transaction. A table that receives thousands of updates per minute can build up an enormous backlog of these dead rows, consuming storage and degrading performance over time.</p><p>This is where Autovacuum comes in.</p><h4>What Autovacuum Does</h4><p>Autovacuum is a background maintenance process responsible for cleaning up obsolete row versions, commonly referred to as dead tuples. It periodically scans tables, removes outdated data, and updates statistics used by the query planner. Without Autovacuum, the database would gradually become inefficient due to excessive storage consumption and slower query performance. In essence, MVCC enables concurrency by retaining multiple versions, and Autovacuum ensures the system remains efficient by cleaning up those versions.</p><p>Autovaccuum basically</p><p>• Scans tables for dead tuples and removes them, freeing up storage</p><p>• Updates table statistics so the query planner makes optimal decisions</p><p>• Prevents transaction ID wraparound.</p><h4>An Example</h4><p>Suppose a salary table has received 50,000 updates today. Without any cleanup, the table physically contains 50,000 old row versions alongside the current ones. Queries slow down because PostgreSQL has to scan through more data to find live rows.</p><p>Autovacuum detects that these dead tuples have exceeded the threshold, runs in the background, removes them, and updates the statistics. The table stays lean and queries stay fast — all without any manual intervention.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*UCdTXWMrSaONFQE0rOrUgw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*1t8hrz8M9_zQqUf5tp9alQ.png" /><figcaption>Postgres MVCC Flow</figcaption></figure><p>This diagram shows how PostgreSQL handles updates using MVCC. Instead of overwriting data, a new row version is created, allowing different transactions to see consistent snapshots without blocking each other.</p><blockquote><strong>How MSSQL Solves It: The Two-Engine Architecture</strong></blockquote><p>Microsoft SQL Server takes a structurally different approach. Rather than building concurrency into every row, MSSQL separates its internal work into two distinct layers: the Relational Engine and the Storage Engine.</p><h4>The Relational Engine: The Brain</h4><p>The Relational Engine acts as the brain of the system. It receives SQL queries, validates them, and determines the most efficient way to execute them. This involves parsing the query, checking its syntax and semantics, and generating an execution plan using a cost-based optimizer. The goal of the Relational Engine is to ensure that every query runs as efficiently as possible.</p><p>• It parses the SQL and checks syntax and semantics</p><p>• It runs a cost-based optimizer to find the most efficient execution plan</p><p>• It passes the finalized execution plan down to the Storage Engine</p><p>Its sole job is to figure out the best way to answer your query. It doesn’t touch data directly.</p><h4>The Storage Engine: The Executor</h4><p>This component is responsible for the actual interaction with the data. It handles reading from disk, writing data, managing indexes, caching frequently accessed data in memory, and enforcing transaction consistency. Importantly, the Storage Engine also manages concurrency through locking mechanisms. Shared locks are used for read operations, while exclusive locks are applied during write operations. This ensures data consistency but can sometimes lead to blocking, especially in high-concurrency environments.</p><p>This is also where MSSQL manages concurrency. By default, it uses a locking mechanism: a shared lock for reads and an exclusive lock for writes. This ensures consistency but can result in blocking when multiple operations compete for the same data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*Nu47_6BSgy4k_tQaqp2Tqw.png" /><figcaption>MSSQL Engine Architecture</figcaption></figure><blockquote>Conclusion</blockquote><p>PostgreSQL and MSSQL both solve the same fundamental problems of concurrency and data consistency, but they get there through very different philosophies.</p><p>PostgreSQL is often preferred for applications requiring high concurrency and minimal locking, such as analytics platforms or systems with heavy read workloads.<br>MSSQL is well-suited for enterprise environments where structured control, tight integration with Microsoft tools, and robust transaction management are critical.</p><p>PostgreSQL bets on non-blocking reads and writes through MVCC, paired with Autovacuum to keep storage in check. The result is a system that handles many simultaneous users gracefully, with predictable behavior under heavy load.</p><p>MSSQL bets on structured layering and separating query intelligence (Relational Engine) from data management (Storage Engine).</p><p>Neither approach is strictly better. The right database depends on your workload, your team, and your ecosystem,</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=151b08804887" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scaling Databases: An Architect’s Guide to Oracle Multi-Tenant & RAC]]></title>
            <link>https://medium.com/@kanishkavishwasrao21/scaling-databases-an-architects-guide-to-oracle-multi-tenant-rac-9ee80f6f3b3f?source=rss-159f75f3e603------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ee80f6f3b3f</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[database-architecture]]></category>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[oracle-architecture]]></category>
            <category><![CDATA[oracle]]></category>
            <dc:creator><![CDATA[Kanishka Vishwasrao]]></dc:creator>
            <pubDate>Tue, 09 Jun 2026 09:14:36 GMT</pubDate>
            <atom:updated>2026-06-09T09:29:46.470Z</atom:updated>
            <content:encoded><![CDATA[<p>— <a href="https://medium.com/u/159f75f3e603">Kanishka Vishwasrao</a> and <a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a></p><p>Modern applications don’t just need databases — they need <strong>scalable, efficient, and highly available database architectures</strong>. Oracle addresses this requirement through two powerful concepts:</p><ul><li><strong>Multi-Tenant Architecture (CDB &amp; PDB)</strong></li><li><strong>Real Application Clusters (RAC)</strong></li></ul><p>Together, they solve two different but equally critical problems:</p><ul><li><em>Efficient resource utilization (Multi-Tenant)</em></li><li><em>Horizontal scaling and high availability (RAC)</em></li></ul><h3>The Problem: Traditional Database Architecture</h3><p>Consider an enterprise with multiple departments:</p><ul><li>HR Database → Instance 1</li><li>Finance Database → Instance 2</li><li>Sales Database → Instance 3</li><li>Inventory Database → Instance 4</li></ul><p>Each database runs on its <strong>own Oracle instance</strong>. At a smaller scale, it seems fine however as systems grow, we encounter several bottenecks:</p><ul><li>Each instance consumes <strong>separate memory (SGA + PGA)</strong></li><li>Each database runs its own <strong>background processes</strong></li><li>Managing patches, users, backups becomes <strong>complex</strong></li><li>Infrastructure is <strong>underutilized</strong></li></ul><p>Here is where multi-tenant architecture comes into place.<br><strong>Multi-Tenant Architecture: One Container, Many Databases</strong></p><h3>Multi-tenant Architecture</h3><p>Oracle’s multi-Tenant architecture allows <strong>multiple databases to coexist inside a single container database (CDB)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*vaeMgTANBUQsAnzRHK4oUg.png" /></figure><blockquote><strong>Architecture Overview</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*xl0PFq9dn2aCnrGW_PS-pg.png" /></figure><blockquote><strong>CDB</strong></blockquote><p>The <strong>Container Database (CDB)</strong> is the <strong>top-level logical database</strong> in Oracle’s multi-tenant architecture. It acts as the <strong>foundation layer that holds and manages all other databases</strong> within it.</p><p>Instead of running separate database instances for each application, the CDB allows you to <strong>consolidate multiple databases into a single instance</strong>, sharing memory structures (SGA), background processes, and system resources.</p><blockquote><strong>CDB$ROOT</strong></blockquote><p>The <strong>CDB$ROOT</strong> is the <strong>central control layer</strong> inside the Container Database. It does not store application data but instead holds <strong>critical system-level information</strong> required for the entire database environment to function properly.</p><p>It contains:</p><ul><li><strong>System metadata</strong> → Definitions of database structures, internal tables, and dictionary views</li><li><strong>Common users</strong> → Users that exist across all PDBs (like admins)</li><li><strong>Shared configurations</strong> → Parameters and settings applied globally</li></ul><blockquote><strong>PDB$SEED</strong></blockquote><p>The <strong>PDB$SEED</strong> is a <strong>read-only template database</strong> used to create new pluggable databases quickly and consistently.</p><p>Instead of building a new database from scratch every time, Oracle uses this seed as a blueprint, which is cloned whenever a new PDB is required.</p><p>Advantages of using this:</p><ul><li><strong>Rapid provisioning</strong> → New PDBs can be created in seconds</li><li><strong>Standardization</strong> → Every new PDB starts with a consistent structure</li><li><strong>Reduced human errors</strong> → No need for manual setup each time</li></ul><p>Oracle performs a <strong>fast cloning operation</strong>, which is significantly more efficient than traditional database creation processes.</p><blockquote><strong>PDB (Pluggable Database)</strong></blockquote><p>The <strong>Pluggable Database (PDB)</strong> is where <strong>actual business applications live and operate</strong>. Each PDB behaves like a <strong>fully independent database</strong>, even though it shares infrastructure with others inside the same CDB.</p><p>Each PDB has:</p><ul><li>Its own <strong>users and roles</strong></li><li>Its own <strong>schemas and tables</strong></li><li>Its own <strong>application data and logic</strong></li></ul><p>Let’s understand it through an analogy:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*5j4a9dM1yUiC-ZeqQuC9UA.png" /></figure><blockquote><strong>How Multi-Tenant Works</strong></blockquote><ol><li><strong>Oracle instance starts → Loads CDB</strong><br> When the Oracle instance is started, it initializes the <strong>Container Database (CDB)</strong> into memory. This step sets up shared resources like <strong>SGA (memory structures)</strong> and <strong>background processes</strong>, which will later be used by all pluggable databases.</li></ol><p>2. <strong>CDB initializes core components</strong><br> During startup, the CDB automatically loads its essential internal containers:</p><ul><li><strong>CDB$ROOT (Root Container)</strong> → Holds system metadata, common users, and global configurations</li><li><strong>PDB$SEED (Seed Database)</strong> → A template database used for creating new PDBs<br> These components ensure that the system is ready for both control operations and database creation.</li></ul><p>3. <strong>DBA creates new PDBs (cloned from seed)</strong><br> When a new database is required, the DBA creates a <strong>Pluggable Database (PDB)</strong> by cloning the <strong>PDB$SEED</strong>.</p><ul><li>This is a <strong>fast and lightweight operation</strong></li><li>Ensures every new PDB is <strong>consistent and pre-configured</strong><br> No need to manually create structures or configure from scratch.</li></ul><p>4. <strong>Applications connect directly to specific PDBs</strong><br> Once PDBs are created, applications connect to them individually.</p><ul><li>Each PDB appears as an <strong>independent database</strong> to the application</li><li>No need for the application to be aware of the CDB<br> This allows teams to work on their own databases without affecting others.</li></ul><p>5. <strong>All PDBs share common infrastructure</strong><br> Although PDBs are logically separate, they share the same physical resources:</p><ul><li><strong>Memory (SGA/PGA)</strong> → No duplication per database</li><li><strong>Background processes</strong> → Shared Oracle processes manage all PDBs</li><li><strong>Underlying infrastructure (storage, instance)</strong> → Consolidated environment</li></ul><h3>ORACLE RAC</h3><p><strong>Oracle RAC (Real Application Clusters)</strong> is a database architecture in which <strong>multiple servers (called nodes) run separate Oracle instances but all work on the same single database at the same time</strong>.</p><p>In simple words, instead of having one server handling all database requests, RAC allows <strong>many servers to work together like a team</strong>, sharing the workload.</p><p>This makes the system:</p><ul><li><strong>Faster</strong> → because work is divided across multiple machines</li><li><strong>Highly available</strong> → if one node fails, others continue running</li><li><strong>Scalable</strong> → you can add more servers when demand increases</li></ul><blockquote><strong>RAC Architecture</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*738cfuyTJU-n2O6brKXmMw.png" /></figure><p>Oracle RAC (Real Application Clusters) is built using a few key components that work together to make the database <strong>fast, scalable, and always available</strong>. In simple terms, RAC uses <strong>multiple servers (called nodes)</strong> where each server runs its own Oracle instance, but all of them connect to the <strong>same single database</strong>. This means instead of one machine handling all the workload, many machines work together, sharing the load and improving performance.</p><p>All these nodes access a <strong>common shared storage system called ASM (Automatic Storage Management)</strong>. This is where the actual database files are stored. No matter which node is processing a request, the data always comes from the same storage, ensuring consistency. To coordinate between nodes, RAC uses a <strong>private interconnect network</strong>, which is a high-speed internal connection. This allows nodes to quickly exchange data in memory instead of going to disk, making operations much faster.</p><p>For client applications, things are kept simple using a <strong>SCAN listener (Single Client Access Name)</strong>. Instead of connecting to specific servers, clients connect to a single endpoint, and RAC automatically routes the request to the best available node. Behind the scenes, <strong>Oracle Clusterware</strong> manages everything — it keeps track of which nodes are active, handles failures, and ensures that if one node goes down, the others continue working without interruption.</p><p>In short, RAC combines <strong>multiple servers, shared storage, intelligent networking, and cluster management</strong> to create a system where the database is <strong>distributed but still behaves like a single unit</strong>, ensuring high performance and continuous availability.</p><blockquote>Cache Fusion</blockquote><p>In an Oracle RAC environment, multiple servers run separate Oracle instances, but all of them access the same database at the same time.<br>Consider a situation where one node updates some data and another node immediately needs that same data. Each Oracle instance has its own <strong>Database Buffer Cache</strong>, which stores frequently used data blocks in memory so that the system doesn’t have to read from disk again and again. Since memory access is much faster than disk access, Oracle always tries to process data in memory whenever possible.</p><p>To handle this efficiently across multiple nodes, Oracle uses a mechanism called <strong>Cache Fusion</strong>.</p><p>Instead of writing the updated data to disk and making another node read it back, Oracle directly transfers the required data block from one node’s memory to another through a high-speed private network. This means the data never touches the disk and is shared instantly between nodes. As a result, operations become faster, disk usage is reduced, and all nodes stay in sync. This is what allows multiple RAC nodes to work together smoothly and behave like a single, high-performance database system.</p><blockquote>Unified View of Oracle Multi-Tenant and RAC</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*z7JjFEic9wNcrQxTaCaAnQ.png" /></figure><p>This diagram represents how <strong>Oracle Multi-Tenant and RAC work together in a unified architecture</strong>.<br>Applications first connect through a <strong>SCAN listener</strong>, which routes requests to one of the available RAC nodes.<br>Each node runs its own Oracle instance, but instead of managing separate databases, all nodes connect to a <strong>single Container Database (CDB)</strong>.<br>Inside this CDB, multiple <strong>Pluggable Databases (PDBs)</strong> such as HR and Finance operate independently while sharing the same infrastructure. The CDB also contains the <strong>Root container </strong>and <strong>Seed database</strong>, ensuring centralized control and rapid provisioning of new PDBs.<br>All RAC nodes access shared storage via ASM and communicate through a <strong>private interconnect</strong>, enabling high-speed data exchange and consistency. The result is a system where multiple applications (PDBs) run across multiple servers (RAC nodes) on shared storage, achieving both resource efficiency and high availability in a single architecture.</p><blockquote>Conclusion</blockquote><p>In conclusion, Oracle Multi-Tenant and RAC together form a <strong>powerful, modern database architecture </strong>designed for today’s enterprise needs. Multi-Tenant ensures that multiple databases can run efficiently within a single system by sharing resources while maintaining isolation, whereas RAC takes it a step further by distributing the workload across multiple servers to provide <strong>high availability, scalability, and fault tolerance</strong>.<br>This makes the architecture ideal for organizations aiming to build <strong>robust, scalable, and future-ready database systems</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ee80f6f3b3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Oracle’s Invisible Workhorses: The Engineering Behind DBWn, LGWR, CKPT, SMON, PMON, ARCn and…]]></title>
            <link>https://medium.com/@kanishkavishwasrao21/oracles-invisible-workhorses-the-engineering-behind-dbwn-lgwr-ckpt-smon-pmon-arcn-and-b42198dfc077?source=rss-159f75f3e603------2</link>
            <guid isPermaLink="false">https://medium.com/p/b42198dfc077</guid>
            <category><![CDATA[oracle-architecture]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[database-architecture]]></category>
            <category><![CDATA[oracle]]></category>
            <dc:creator><![CDATA[Kanishka Vishwasrao]]></dc:creator>
            <pubDate>Mon, 08 Jun 2026 12:58:53 GMT</pubDate>
            <atom:updated>2026-06-08T12:58:53.416Z</atom:updated>
            <content:encoded><![CDATA[<h3>Oracle’s Invisible Workhorses: The Engineering Behind DBWn, LGWR, CKPT, SMON, PMON, ARCn and Database Startup Modes</h3><p>-@Kanishka Vishwasrao, <a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a></p><p>Consider an online payment system. A customer transfers money, and your code runs this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/317/1*x2n0fgIb-iCqfkyLsX0kIg.png" /></figure><p>From a user’s perspective, the transaction takes only a few milliseconds. The application receives a confirmation, and the work seems complete.</p><p>Behind the scenes, Oracle is running<strong> six background processes</strong> working together to make sure your change is fast, safe, and never lost, even if the server crashes immediately.</p><p>Every database system must balance <strong>four critical requirements :</strong></p><blockquote>First,<strong> transactions must be fast.</strong> Users should not wait for every change to be physically written to disk.</blockquote><blockquote>Second, <strong>committed data must never be lost</strong>. Once Oracle confirms a commit, the database must be able to recover that transaction even after a crash.</blockquote><blockquote>Third, <strong>recovery must be efficient</strong>. A database serving thousands of users cannot spend hours recovering after every failure.</blockquote><blockquote>Finally, <strong>the system must scale</strong>. Thousands of concurrent users should be able to work without being blocked by disk operations.</blockquote><p>These goals often conflict with each other.</p><p>Writing every change directly to disk would improve durability but destroy performance. Keeping everything in memory would improve speed but risk data loss.</p><p>Oracle solves this dilemma using a collection of specialized background processes.</p><p>The same data block might be updated a hundred times in a minute. Writing it to disk each time wastes enormous I/O bandwidth.</p><p>What Oracle comes up with:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*ZXrQRpVDhx8tgSeBDU2Wqg.png" /></figure><p>When any statement is being executed, Oracle does not immediately update the physical database file. Instead, the required block is loaded into the Buffer Cache within the System Global Area (SGA). The modification is performed in memory, creating what Oracle calls a dirty buffer.</p><p>At this moment:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*5McisL9pSpvk2Zj5Mmq7GQ.png" /></figure><p>The database file on disk remains unchanged.</p><p>Disk operations are significantly slower than memory operations. If Oracle wrote every update directly to disk, transaction throughput would collapse under heavy workloads.</p><p>This is where DBWn enters the picture.</p><h3><strong>DBWn</strong></h3><p>The real purpose of DBWn is to separate <strong>transaction processing</strong> from <strong>physical disk writing</strong>.</p><p>Disk operations are significantly slower than memory operations. If Oracle were to write every modified block directly to disk before allowing a transaction to continue, users would constantly wait for I/O operations to complete. In a system processing thousands of transactions per second, such delays would severely limit performance.</p><p>To avoid this bottleneck, Oracle follows a different approach. When a transaction modifies data, the affected blocks are updated in the <strong>Database Buffer Cache</strong> located in memory. These modified blocks, known as <strong>dirty buffers</strong>, can remain in memory for some time before being written to disk. This allows user sessions to continue processing while DBWn handles the actual disk writes asynchronously in the background.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*n4N20JCZxDlsAeVW0YdY6w.png" /><figcaption>DBWn</figcaption></figure><h3><strong>LGWR</strong></h3><p>LGWR stands for Log Writer. It is the process responsible for making your commit real and permanent.</p><p>Whenever a change occurs, Oracle generates redo information describing that modification.</p><p>This redo information is stored in the Redo Log Buffer within memory.</p><p>When a COMMIT occurs, LGWR immediately writes the redo information to the Online Redo Log files.</p><p>Only after this write succeeds does Oracle return:</p><p>‘Commit complete’ to the user.</p><p>This introduces one of the most important concepts in Oracle architecture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*JZ--VyaVkyuVw8kvOdaWxQ.png" /></figure><p>The actual data block may still exist only in memory.</p><p>The datafile may not yet contain the updated information.</p><p>What matters is that Oracle has safely recorded the change history in the redo logs.</p><p>If a crash occurs, Oracle can reconstruct the transaction using the redo information.</p><p>This approach is known as <strong>Write-Ahead Logging</strong>.</p><p><strong>LGWR and DBWn Working Together</strong></p><p>These two processes are partners. There is one rule between them:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*ld09Gc8eWXnEDrU5e23KbQ.png" /></figure><p>LGWR guarantees that changes are remembered. DBWn guarantees that changes have eventually persisted.</p><p>Without LGWR, committed transactions could be lost. Without DBWn, memory would eventually fill up and the database would stop functioning.</p><p>Together they form the foundation of Oracle’s reliability model.</p><h3>CKPT</h3><p>As transactions continue throughout the day, Oracle generates enormous amounts of redo information.</p><p>[<strong>Redo information</strong> is a record of every change made to the database, describing <em>what changed</em> and <em>how to recreate that change</em>.]</p><p>In a busy production system, millions of changes may occur between startup and shutdown. If a system failure were to occur, Oracle would need to use this redo information to recover the database.</p><p>But here’s the challenge: the more redo that must be processed during recovery, the longer recovery takes.</p><p>To address this problem, Oracle uses <strong>checkpoints</strong>, coordinated by the <strong>Checkpoint Process (CKPT)</strong>.</p><p>One of the most common misconceptions about CKPT is that it writes database blocks to disk. It does not.</p><p>That responsibility belongs entirely to <strong>DBWn (Database Writer)</strong>. CKPT’s role is that of a coordinator — it initiates checkpoints, tracks recovery progress, and records the point up to which the database has been safely synchronized.</p><p>During a checkpoint, CKPT performs <strong>three key actions</strong>:</p><blockquote>Signals DBWn to write dirty buffers from the Buffer Cache to the datafiles.</blockquote><blockquote>Updates the control files with checkpoint information.</blockquote><blockquote>Updates the headers of the datafiles with the latest checkpoint details.</blockquote><p>These updates establish an important recovery boundary.</p><p>This coordination has a major benefit: <strong>faster crash recovery</strong>. Instead of replaying the entire redo log history after a failure, Oracle only needs to replay changes generated after the latest checkpoint. As a result, checkpoints help reduce recovery time, improve database availability, and ensure that large systems can return to service more quickly after an unexpected interruption.</p><h3>ARCn</h3><p><strong>What happens to old redo logs once they become full?</strong></p><p>Consider a hypothetical example: Imagine you’re writing notes in a notebook with only three pages. Once all three pages are full, you have no choice but to erase the first page and start writing on it again.</p><p>Oracle’s Online Redo Logs work in a very similar way.</p><p>LGWR continuously writes change information into a set of Online Redo Log files. These files are fixed in size and reused in a circular manner. When one log becomes full, Oracle switches to the next log. Eventually, it returns to the first log and prepares to overwrite it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/369/1*VZGMjSSNmoVp6arhN5tioA.png" /></figure><p>But before Oracle overwrites an old log, it must preserve the history stored inside it.</p><p>This is where the <strong>Archiver Process (ARCn)</strong> comes in.</p><p>ARCn copies completed Online Redo Logs to a separate location, creating <strong>Archived Redo Logs</strong> that can be stored indefinitely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/248/1*BuBMxkj0JA4RDv_Mbdm7wA.png" /></figure><p>Think of ARCn as a historian. While LGWR focuses on recording current activity, ARCn ensures that the database’s past is never lost.</p><h4>Why Is This Important?</h4><p>Suppose a developer accidentally deletes a critical table on Tuesday afternoon.</p><p>Without archived logs, you could restore only the most recent backup. Any work performed after that backup would be lost.</p><p>With archived logs, Oracle can restore the backup and then replay the archived changes until just before the mistake occurred. This capability is known as <strong>Point-in-Time Recovery (PITR)</strong>.</p><p>before it can be reused.</p><p>LGWR protects committed transactions by recording changes in the Online Redo Logs.</p><p>CKPT creates recovery boundaries that reduce recovery time.</p><p>ARCn preserves redo history so that Oracle can recover not just from crashes, but also from data loss, user mistakes, hardware failures, and even entire site disasters.</p><p>Without ARCn, a backup is merely a static snapshot of the database at a particular moment in time.</p><p>With ARCn, Oracle gains the ability to reconstruct its history and recover data with remarkable precision.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*T-CTy8JtG9W7TyzWyNOgsQ.png" /></figure><h3>SMON</h3><p>So far, we’ve seen how Oracle processes transactions during normal operation:</p><ul><li>DBWn writes modified data blocks to disk.</li><li>LGWR protects committed transactions by recording changes in the redo logs.</li><li>CKPT creates recovery boundaries through checkpoints.</li><li>ARCn preserves redo history for long-term recovery.</li></ul><p>Imagine the database server suddenly loses power. The contents of memory disappear instantly.</p><p>The Buffer Cache, which exists entirely in RAM, is lost. Any dirty buffers that DBWn had not yet written to the datafiles vanish. Active transactions are interrupted, and the datafiles on disk may no longer reflect the most recent committed changes.</p><p>At this point, the database is left in an inconsistent state.</p><p>When Oracle starts again, the responsibility for restoring consistency falls to the <strong>System Monitor process (SMON)</strong>.</p><p>Think of SMON as Oracle’s recovery specialist. Its job is to examine the state of the database after a failure and determine exactly what must be done to make the database consistent again.</p><p>To do this, SMON analyzes:</p><ul><li>Checkpoint information recorded by CKPT</li><li>Redo logs generated by LGWR</li><li>Datafiles stored on disk</li></ul><p>Using this information, SMON automatically performs <strong>Instance Recovery</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*DmNtw5izljMpxlVYYTLqAg.png" /><figcaption>SMON</figcaption></figure><h3>How Instance Recovery Works</h3><p>When SMON performs Instance Recovery, it typically proceeds in two phases.</p><h4>Phase 1: Roll Forward (Redo Phase)</h4><p>SMON begins by reading the redo logs and replaying all recorded changes that may not yet exist in the datafiles.</p><p>By applying the redo information, SMON reconstructs those changes and brings the datafiles forward to the most recent consistent state.</p><h4>Phase 2: Roll Back (Undo Phase)</h4><p>After replaying the redo, SMON identifies transactions that were active but not committed when the crash occurred.</p><p>These incomplete transactions must not appear in the database after recovery.</p><p>Using undo information, SMON reverses their changes and removes any partial work left behind by interrupted sessions.</p><p>This ensures that only committed transactions remain in the database.</p><h3>Why SMON Matters</h3><p>Without SMON, every unexpected shutdown would require administrators to manually inspect the database and determine which changes should be preserved and which should be discarded.</p><p>Instead, Oracle automates the entire process.</p><p>When a crash occurs:</p><ul><li>LGWR provides the history of committed changes.</li><li>CKPT identifies the recovery starting point.</li><li>DBWn provides whatever data had already reached disk.</li><li>SMON uses all of this information to restore consistency automatically.</li></ul><p>This is why Oracle databases can recover from crashes with minimal intervention. Even if memory is completely lost, SMON can rebuild the database state using the information preserved by Oracle’s recovery architecture.</p><p>LGWR protects your transactions while Oracle is running. SMON restores them after a crash</p><h3>PMON</h3><p>Not every failure in a database environment is a catastrophic server crash.</p><p>Sometimes a user closes an application unexpectedly. A network connection drops. A browser tab is terminated. An application server crashes in the middle of a transaction. While the database itself continues running normally, these failed sessions can leave behind unfinished work and occupied resources.</p><p>This is where the <strong>Process Monitor (PMON)</strong> comes in.</p><p>When a user session terminates unexpectedly, it can leave behind a variety of problems:</p><ul><li>An open transaction holding row locks</li><li>Memory still allocated for the session</li><li>Database resources that are no longer being used</li><li>A connection slot that appears active even though the client has disappeared</li></ul><p>Without proper cleanup, these abandoned resources would gradually accumulate. Other users could become blocked waiting for locks that will never be released. Connection pools could become exhausted. Over time, the overall performance and availability of the database would begin to suffer.</p><p>PMON continuously monitors user and server processes, looking for sessions that have failed unexpectedly. When it detects one, it automatically performs the necessary cleanup operations.</p><h3>SMON vs PMON</h3><p>A useful way to remember the difference is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*9CbGbE2jJfpjTJtFJkmGCg.png" /></figure><p>SMON deals with large-scale failures that affect the entire database instance.</p><p>PMON deals with the much more common day-to-day failures involving individual users, applications, and network connections.</p><p>Together, they ensure that Oracle remains resilient at both levels: recovering from major outages when necessary and continuously cleaning up smaller failures before they impact other users.</p><p>In simple terms:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*baCv8lFb8LDfFWGP0PW9VQ.png" /></figure><p><strong>STARTUP STAGES</strong></p><p><strong>NOMOUNT</strong>- SGA (memory) is created- All background processes start: DBWn, LGWR, CKPT, SMON, PMON, ARCn-<br>Used for: control file recreation</p><p><strong>MOUNT</strong>- Control file is opened and read- Oracle learns-where are the datafiles? where are the redo logs? what is the last checkpoint SCN?- <br>Used for: enabling ARCHIVELOG mode, media recovery, renaming files</p><p><strong>OPEN</strong>- Datafiles are opened and verified-. SMON checks if a crash occured? If yes: runs instance recovery automatically.</p><blockquote><strong>How do you make a system simultaneously fast, durable, consistent, and recoverable?</strong></blockquote><p>Oracle keeps transactions fast by processing most work in memory and writing only essential change information to disk during a commit.<br>It keeps data safe by recording every committed change in the redo logs before confirming the transaction.<br>It maintains consistency by automatically removing incomplete transactions after a crash.<br>And it enables recovery by preserving a complete history of database changes that can be replayed when needed.</p><p>The UPDATE that subtracted 1000 from a bank balance will either have happened completely and correctly or would have not happened at all.</p><p>The six background processes work together behind the scenes to ensure that every transaction is processed efficiently, protected from data loss, and recoverable when things go wrong.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b42198dfc077" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Oracle Instance vs Physical Database: Understanding the Core Architecture]]></title>
            <link>https://medium.com/@kanishkavishwasrao21/oracle-instance-vs-physical-database-understanding-the-core-architecture-afac25fae254?source=rss-159f75f3e603------2</link>
            <guid isPermaLink="false">https://medium.com/p/afac25fae254</guid>
            <category><![CDATA[oracle-database]]></category>
            <category><![CDATA[database-architecture]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[physical-database]]></category>
            <category><![CDATA[oracle]]></category>
            <dc:creator><![CDATA[Kanishka Vishwasrao]]></dc:creator>
            <pubDate>Wed, 03 Jun 2026 14:02:47 GMT</pubDate>
            <atom:updated>2026-06-04T17:39:54.586Z</atom:updated>
            <content:encoded><![CDATA[<p>-Kanishkavishwasrao, <a href="https://medium.com/u/695fd04ae7ae">Tanvi Gunjal</a></p><p>When most people hear the word <em>database</em>, they imagine tables, rows, and stored information.</p><p>However, one of the first things every Oracle DBA learns is that an Oracle Database is more than just stored data.</p><p>Under the hood, Oracle separates processing from storage through two distinct components:</p><ul><li><strong>Oracle Instance</strong> — the active, running brain</li><li><strong>Physical Database</strong> — the permanent storage system</li></ul><p>This separation is one of the reasons Oracle can deliver both high performance and enterprise-grade reliability.</p><p>Let’s see how it works.</p><p><strong>What Exactly Is Oracle?</strong></p><p>In simple terms, Oracle is a relational database management system (RDBMS) that helps organizations store, organize, manage, and retrieve large amounts of data efficiently.</p><p>Whether it’s a:</p><p>bank processing transaction<br>a telecom company handling customer records</p><p>a healthcare system storing patient information, Oracle provides the foundation for storing and accessing that data reliably.</p><p><strong>Oracle’s architecture contains an important design principle-</strong></p><p>Users never directly access database files. Every query, transaction, update, or deletion first passes through the Oracle Instance, which then communicates with the Physical Database on the user’s behalf.</p><p><strong>Understanding the Oracle Instance: The Operational Brain of the Database</strong></p><p>The Oracle Instance is the runtime environment that brings the database to life. It receives requests, manages memory, coordinates disk activity, handles transactions, and ensures recoverability. failures, or serve thousands of concurrent users. This is where the <strong>Oracle Instance</strong> comes into play.</p><p><strong>A simple analogy:</strong></p><p>If the Physical Database is the body, the Oracle Instance is the brain and nervous system.</p><p>Unlike the Physical Database, which consists of persistent files stored on disk, the Instance exists only while Oracle is running. The moment the database service stops or the server crashes, the Instance disappears completely because it resides primarily in memory and operating system processes.</p><p>From a technical standpoint, an Oracle Instance is composed of two fundamental elements:</p><ol><li><strong>System Global Area (SGA)</strong> — Shared memory structures allocated in RAM.</li></ol><p>It stores:</p><ul><li>Frequently accessed data</li><li>SQL execution information</li><li>Cached database blocks</li><li>Transaction information</li></ul><ol><li><strong>Background Processes</strong> — Specialized operating system processes responsible for managing database operations.</li></ol><p>These processes handle tasks such as:</p><ul><li>Writing data to disk</li><li>Managing checkpoints</li><li>Recording transactions</li><li>Performing recovery operations</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YvXt92VhfK2wTlyD_qsVOw.png" /><figcaption>Workflow of a Transaction</figcaption></figure><p>Together, these components create the execution layer that enables Oracle to function as a high-performance enterprise database.</p><p><strong>Understanding the Physical Database:</strong></p><p>While the Oracle Instance performs processing, the <strong>Physical Database</strong> stores information permanently.</p><p>The Physical Database remains on disk regardless of whether the database is running.</p><p>The Physical Database consists of multiple files working together to store, organize, and protect data.</p><p><strong>Three file types form the foundation of Oracle storage architecture:</strong></p><ol><li>Data Files</li><li>Control Files</li><li>Redo Log Files</li></ol><p><strong>Data Files(.dbf): Where the Actual Data Lives</strong></p><p>Data Files are the most fundamental component of the Physical Database because they contain the actual information that organizations rely on every day: application data, user tables, indexes, system metadata, internal oracle structure, making them the primary repository of all business information.</p><p>Whenever a customer places an order, a bank processes a transaction, or a telecom company updates subscriber information, the resulting data is ultimately stored within these files. When users retrieve data through queries, they are indirectly accessing information that resides within these files. In many ways, Data Files can be viewed as the database’s warehouse, housing everything from user-generated content to critical system information. Without them, there would be no persistent data for Oracle to manage, making them the true source of the database’s stored information.</p><p>If someone asks where the data truly lives, the answer is simple:</p><p><strong>Inside the data files.</strong></p><p><strong>Control Files(.ctl): The Database Blueprint</strong></p><p>While Data Files store the information itself, Control Files store information about the database. They act as Oracle’s blueprint or master map, containing essential metadata that allows the database to understand its own structure. Whenever Oracle starts, one of the first files it reads is the Control File, which tells it where the Data Files are located, where the Redo Log Files reside, and how the database is organized. It also maintains important details such as the database name, creation timestamp, checkpoint information, and recovery-related metadata. Without Control Files, Oracle would essentially lose its sense of direction. Even if every Data File remained intact, the database would struggle to understand how those files fit together or where they should be accessed from.</p><p>Without a valid control file, Oracle has no way of knowing how the database is structured.</p><p>Even if every data file exists perfectly, the database cannot be mounted without its control file.</p><p>This is why Control Files are considered one of the most critical components of the database architecture and are often multiplexed, meaning multiple copies are maintained to prevent a single point of failure.</p><p><strong>Redo Log Files(.log): The Database’s Flight Recorder</strong></p><p>If Data Files store the present state of the database and Control Files describe its structure, Redo Log Files record its history of change. Every modification made within Oracle, whether it is an INSERT, UPDATE, DELETE, or COMMIT operation-generates redo information. Before Oracle permanently updates the Data Files, it records details about the change in the Redo Log Files. This design serves a crucial purpose: recovery. In the event of a system crash, power failure, or unexpected shutdown, Oracle can use the information stored in the Redo Logs to reconstruct committed transactions and restore the database to a consistent state. This is why Redo Log Files are often compared to an aircraft’s black box recorder. Just as a flight recorder preserves critical information about events leading up to an incident, Redo Logs preserve a record of database changes that can be replayed during recovery. Their existence ensures that committed transactions are not lost, even if a failure occurs before the changes have been fully written to the Data Files.</p><p><strong>Why the Instance Is Called “Volatile”</strong></p><p>The Oracle Instance only exists while the database is running. When Oracle starts, memory is allocated and background processes are created. When Oracle shuts down, all of that disappears.</p><p>If a server suddenly crashes:</p><ul><li>Memory contents are lost</li><li>Processes terminate</li><li>The entire instance vanishes</li></ul><p>This is why the instance is often referred to as the <strong>volatile component</strong> of Oracle architecture.</p><p>Now, if the instance disappears, what happens to the actual data?</p><p>Well it’s stored in the Physical Database, right?!</p><p><strong>How the Oracle Instance and Physical Database Work Together</strong></p><p>Understanding the distinction between the Oracle Instance and the Physical Database is important, but understanding how they interact is what truly reveals the working of Oracle’s architecture.</p><p>The Oracle Instance and Physical Database are not independent components. They operate as a tightly coordinated system where the Instance acts as the intelligent processing layer and the Physical Database serves as the persistent storage layer.</p><p>Every query, transaction, and recovery operation flows through this relationship.</p><p>A fundamental principle of Oracle architecture is:</p><p>Data lives on disk, but work happens in memory.</p><p>This design allows Oracle to achieve both high performance and strong data durability.</p><p>Let’s follow the journey of a transaction from the moment a user submits a request.</p><p>The Oracle Instance acts as the processing layer, while the Physical Database acts as the storage layer. Every request made by a user flows through this relationship.</p><p>A simple way to think about it is:</p><p>Data lives on disk, but work happens in memory.</p><p>The journey of a typical transaction can be understood through a series of interactions between the Oracle Instance and the Physical Database.</p><p><strong>Step 1]</strong></p><p>A user or application submits a request to the database.</p><p>The request could be a query to retrieve information, an update to modify existing records, or a transaction that inserts new data.</p><p>Rather than communicating directly with the database files, the request is first received by the Oracle Instance, which serves as the operational layer of the database.</p><p><strong>Step 2]</strong></p><p>Once the request reaches the Instance, Oracle determines what information is required to fulfill it. If the necessary data is not already available within the active runtime environment, the Instance retrieves it from the Physical Database. The required information is then brought into memory, where Oracle can work with it efficiently.</p><p><strong>Step 3]</strong></p><p>With the data available, the Oracle Instance performs all necessary processing. This may involve validating the request, executing calculations, applying business rules, retrieving results, or modifying existing records. All of this activity occurs within the runtime environment rather than directly on the physical storage files.</p><p>If the operation results in any changes to the database, Oracle records information about those changes before they are permanently stored. This record acts as a safeguard, allowing Oracle to recover completed transactions even if an unexpected system failure occurs. This is one of the key mechanisms that enables Oracle to maintain reliability and data integrity.</p><p><strong>Step 4]</strong></p><p>After the changes have been properly recorded, Oracle stores the updated information within the Physical Database, ensuring that it becomes part of the database’s permanent state. Unlike the Instance, which exists only while the database is running, the Physical Database preserves this information even when the system is shut down.</p><p><strong>Step 5]</strong></p><p>Finally, once the operation has been completed successfully, Oracle returns the requested data or transaction confirmation back to the user or application. From the user’s perspective, the interaction may take only a fraction of a second, but behind the scenes Oracle has coordinated a series of carefully managed operations between its processing layer and storage layer.</p><p>This interaction highlights the fundamental design principle of Oracle architecture: the Oracle Instance is responsible for processing and execution, while the Physical Database is responsible for permanent storage. Together, they create a system that delivers both high performance and long-term data reliability.</p><p><strong>Why do we need to have two separate components?</strong></p><p><strong>Performance</strong></p><p>Disk operations are inherently slow.</p><p>Reading and writing directly to storage for every user request would create significant bottlenecks.</p><p>The Oracle Instance acts as a high-speed processing layer that absorbs most user activity in memory while synchronizing changes to disk efficiently in the background.</p><p>The result is faster response times and higher transaction throughput.</p><p><strong>Reliability</strong></p><p>Because memory and storage are independent components, a failure in one does not necessarily destroy the other.</p><p>If an instance crashes:</p><p>Memory is lost</p><p>Processes terminate</p><p>However:</p><ul><li>Data files remain intact</li><li>Control files remain intact</li><li>Redo logs remain intact</li></ul><p>When Oracle starts again, recovery processes use these files to restore the database to a consistent state.</p><p>This separation is one of the key reasons Oracle databases are trusted for mission-critical enterprise workloads.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=afac25fae254" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>