<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Krishna Kanth Latya</title>
    <description>The latest articles on DEV Community by Krishna Kanth Latya (@krishnakanthlatya).</description>
    <link>https://dev.to/krishnakanthlatya</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3986106%2F3695b0cb-cbf0-444c-8b27-8849377f5ba3.png</url>
      <title>DEV Community: Krishna Kanth Latya</title>
      <link>https://dev.to/krishnakanthlatya</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/krishnakanthlatya"/>
    <language>en</language>
    <item>
      <title>System Design: How a Simple App Grows from 10 Users to 10 Million Users</title>
      <dc:creator>Krishna Kanth Latya</dc:creator>
      <pubDate>Sat, 20 Jun 2026 21:01:57 +0000</pubDate>
      <link>https://dev.to/krishnakanthlatya/system-design-how-a-simple-app-grows-from-10-users-to-10-million-users-3agj</link>
      <guid>https://dev.to/krishnakanthlatya/system-design-how-a-simple-app-grows-from-10-users-to-10-million-users-3agj</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Building an application is easy. Building one that survives success is the real challenge.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Most applications start with a minimalist architecture: a single server, a database, and a handful of users. Everything feels fast, reliable, and inexpensive.&lt;/p&gt;

&lt;p&gt;Then growth happens. A marketing campaign goes viral, or a popular influencer mentions your product. Suddenly, thousands of users arrive simultaneously. What worked perfectly yesterday starts failing today.&lt;/p&gt;

&lt;p&gt;So, how do companies scale seamlessly from a few users to millions? Let’s walk through that architectural journey step-by-step.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Evolutionary Journey of Scaling :
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Stage 1: The Startup Phase :
&lt;/h2&gt;

&lt;p&gt;Imagine you launch a new platform called RecipeShare, where users upload and share cooking recipes. At launch, your architecture is as simple as it gets:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd69ou9mqicdlnhgddbdo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd69ou9mqicdlnhgddbdo.png" alt=" " width="800" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The application server handles everything: authentication, recipe uploads, search, notifications, and database queries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this works:&lt;/strong&gt; It is cheap, easy to deploy, simple to debug, and requires minimal operational overhead. For your first few hundred users, this monolithic setup is more than enough.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 2: Database Separation
&lt;/h2&gt;

&lt;p&gt;As traffic grows, the single machine begins to struggle. The application logic and the database start competing for the same hardware resources: CPU, memory, disk I/O, and network bandwidth.&lt;br&gt;
The first major optimization is splitting them onto dedicated hardware:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsnmj6hnfzh1x8oldd1v6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsnmj6hnfzh1x8oldd1v6.png" alt=" " width="800" height="309"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Benefit:&lt;/strong&gt; Independent scaling, optimized server configurations, and improved reliability. Application traffic spikes no longer directly starve the database of resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 3: Horizontal Scaling (Multiple App&amp;nbsp;Servers)
&lt;/h2&gt;

&lt;p&gt;Your platform gains traction. Thousands of users are now uploading recipes simultaneously, and that single application server becomes a glaring bottleneck. Instead of buying a bigger server (Vertical Scaling), we scale horizontally by adding more servers and introducing a Load Balancer:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwtqddzrt4ixo18nmq2lq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwtqddzrt4ixo18nmq2lq.png" alt=" " width="800" height="317"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Benefit:&lt;/strong&gt; High throughput and high availability. If one application server crashes, the load balancer automatically reroutes traffic to the healthy ones, eliminating a single point of failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 4: Caching Popular&amp;nbsp;Data
&lt;/h2&gt;

&lt;p&gt;In most applications - especially a recipe platform - users read data far more frequently than they write it. Popular recipes, user profiles, and trending categories are requested repeatedly, making constant database queries incredibly expensive.&lt;br&gt;
&lt;em&gt;We introduce an in-memory cache layer (like Redis or Memcached):&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzin9jsxzuanngntjikt6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzin9jsxzuanngntjikt6.png" alt=" " width="800" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Benefit:&lt;/strong&gt; Sub-millisecond response times and drastically reduced database load. A well-implemented cache layer can frequently deflect over 80% of read traffic away from your database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 5: Decoupling Media Content (Object Storage)
&lt;/h2&gt;

&lt;p&gt;Users love uploading high-resolution food photos and cooking videos. Storing these massive binary blobs directly inside a relational database is inefficient and tanks database performance.&lt;/p&gt;

&lt;p&gt;Instead, we offload media to &lt;strong&gt;Object Storage (like AWS S3)&lt;/strong&gt; and store only the lightweight metadata in the database:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa8mg4659dkhzwg7f1yys.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa8mg4659dkhzwg7f1yys.png" alt=" " width="800" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Benefit: Smaller database backups, cheaper storage costs, and faster data processing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 6: Edge Computing via CDNs
&lt;/h2&gt;

&lt;p&gt;As RecipeShare expands internationally, users in India, Europe, and North America begin accessing the platform. Because your main servers reside in one location, international users suffer from high latency, slow image loads, and buffering videos.&lt;/p&gt;

&lt;p&gt;To fix this, we introduce a Content Delivery Network (CDN):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F42r634hic7ds0qqc4vuu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F42r634hic7ds0qqc4vuu.png" alt=" " width="800" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Benefit:&lt;/strong&gt; Static assets (images, videos, CSS) are cached globally at edge locations close to the user, resulting in blazing-fast load times and dramatically reduced origin bandwidth costs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 7: Transitioning to a Stateless Architecture
&lt;/h2&gt;

&lt;p&gt;Initially, user sessions (like login states) might be stored in the memory of individual application servers. This creates “sticky session” dependencies; if User A’s next request hits a different server, they are suddenly logged out.&lt;/p&gt;

&lt;p&gt;To scale horizontally without friction, we move session data to a shared, centralized store:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fanlkmk3xbdmsdtu0bxn3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fanlkmk3xbdmsdtu0bxn3.png" alt=" " width="800" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Benefit:&lt;/strong&gt; The application layer becomes entirely stateless. Any server can handle any request from any user, making autoscaling and zero-uptime deployments trivia&lt;/p&gt;

&lt;p&gt;_&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;The “Sticky” Problem:&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
The Waiter Example: Imagine you order a meal from Waiter 1, who writes it down in his own personal notepad. A few minutes later, you want to change your order, but Waiter 1 is busy, so Waiter 2 steps up. Because the data is trapped in Waiter 1’s pocket, Waiter 2 has no idea who you are or what you ordered. You are stuck waiting for Waiter 1.&lt;br&gt;
&lt;strong&gt;&lt;em&gt;The Stateless Solution :&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
The Waiter Example: To fix this, the kitchen installs a giant digital whiteboard in the center of the room. Now, when Waiter 1 takes your order, he instantly writes it on the shared whiteboard. If you need a modification later, Waiter 2 can step up, look at the board, instantly see your order history, and handle the change seamlessly.&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Why it Matters :&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;The Takeaway:&lt;/em&gt; Because the waiters keep no secrets in their own pockets, they are completely stateless. Any waiter can serve any customer at any given second.&lt;br&gt;
_&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Stage 8: Database Replication (Read Replicas)
&lt;/h2&gt;

&lt;p&gt;Even with caching, your primary database is starting to sweat from sheer volume. Since the vast majority of database traffic is still reads, we can clone the database using a Master-Slave topology:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdnzsxyd3l0rn1tgy102c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdnzsxyd3l0rn1tgy102c.png" alt=" " width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Benefit:&lt;/strong&gt; Massive read scalability. Write operations go strictly to the primary database, which asynchronously replicates data to the read replicas that handle all user browsing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 9: Asynchronous Processing (Message Queues)
&lt;/h2&gt;

&lt;p&gt;As the app matures, new background tasks are introduced: sending welcome emails, transcoding raw videos into multiple resolutions, and updating search indexes. Forcing a user to wait for these tasks to finish before sending an HTTP response causes severe lag.&lt;/p&gt;

&lt;p&gt;We introduce a Message Queue (like RabbitMQ or Kafka) to handle things asynchronously:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2hye4l52cjobilg4x3fo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2hye4l52cjobilg4x3fo.png" alt=" " width="799" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Benefit:&lt;/strong&gt; The user receives an instant success response, while heavy, time-consuming tasks are processed reliably in the background by worker nodes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stage 10: Database Sharding
&lt;/h2&gt;

&lt;p&gt;You’ve hit millions of users. Even with read replicas, the sheer volume of data writes is overwhelming a single primary database. It’s time to partition the data horizontally across multiple databases using Sharding:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxcbknlolw1wxrdu97gag.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxcbknlolw1wxrdu97gag.png" alt=" " width="800" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Benefit:&lt;/strong&gt; Infinite horizontal data scalability. Each database shard only handles a fraction of the global dataset, transforming your platform into a true distributed system.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📚 &lt;strong&gt;The Library Example&lt;/strong&gt;&lt;br&gt;
Imagine you run a library and keep a list of every single book in a single notebook.&lt;br&gt;
As your collection grows to millions of books, the notebook becomes so thick that it takes minutes just to turn a page. Even worse, if ten readers want to look up a book at the same time, they all have to fight over that one notebook. And if someone spills coffee on it, your entire library catalog is destroyed.&lt;br&gt;
In system design, this is a &lt;strong&gt;monolithic database bottleneck&lt;/strong&gt;. A single database instance cannot handle a massive volume of simultaneous reads and writes.&lt;br&gt;
 📖 &lt;strong&gt;The Sharded Solution&lt;/strong&gt;&lt;br&gt;
To fix this, you rip the pages out of that giant notebook and split them across three completely separate, smaller notebooks placed at different desks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Notebook A (Shard A):&lt;/strong&gt; Stores only books starting with A to I.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Notebook B (Shard B):&lt;/strong&gt; Stores only books starting with J to R.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Notebook C (Shard C):&lt;/strong&gt; Stores only books starting with S to Z.&lt;/li&gt;
&lt;li&gt;When a reader looks for a &lt;strong&gt;"Lasagna Recipe"&lt;/strong&gt;, they bypass the others and go straight to &lt;strong&gt;Notebook B&lt;/strong&gt;. Desks A and C remain completely quiet and free of traffic.
### Why this is a game-changer for your app
&lt;strong&gt;The Takeaway:&lt;/strong&gt; The books are sorted by their first letter — this sorting rule is your &lt;strong&gt;Shard Key&lt;/strong&gt;. Because these notebooks are completely independent, you can add infinitely more desks as your collection grows. Best of all, if Desk A catches fire, readers using Notebooks B and C can continue finding their books completely uninterrupted.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;


&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Stage 11: Multi-Region Deployment
&lt;/h2&gt;

&lt;p&gt;What happens if an entire cloud data center suffers a major blackout? A localized infrastructure outage could take your global platform completely offline.&lt;/p&gt;

&lt;p&gt;The final frontier of scaling is deploying your architecture across multiple geographic regions:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuaovyov9qiz753a6yxqw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuaovyov9qiz753a6yxqw.png" alt=" " width="800" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Benefit: High disaster recovery capability, near-perfect uptime, and localized compliance/performance for global users.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🌍 &lt;strong&gt;The “Cross-Ocean Flight” Problem&lt;/strong&gt;&lt;br&gt;
📚 &lt;strong&gt;&lt;em&gt;The Library Example&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Your sharded three-notebook library system in New York is a massive success.&lt;br&gt;
But now, you have millions of readers living in London.&lt;br&gt;
Every time a reader in London wants to look up a recipe, they must send a letter across the Atlantic Ocean to New York and wait for a response. The process is incredibly slow. Worse, if a massive storm knocks out power to the New York library, the entire global system goes dark.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;em&gt;In system design, this is cross-continent latency and a single-region point of failure.&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;🏛️ &lt;strong&gt;The Multi-Region Solution&lt;/strong&gt;&lt;br&gt;
📚 &lt;strong&gt;&lt;em&gt;The Library Example&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
To solve this problem, you open an identical twin library in London (&lt;strong&gt;Region: EU-CENTRAL&lt;/strong&gt;).&lt;br&gt;
You give the London library its own matching set of three sharded notebooks (&lt;strong&gt;A, B, and C&lt;/strong&gt;) so British readers can look up recipes locally in milliseconds.&lt;br&gt;
To keep both libraries identical, you hire an assistant whose only job is to continuously send copies of new book entries across the ocean (&lt;strong&gt;Cross-Region Replication&lt;/strong&gt;), ensuring the New York and London notebooks stay perfectly synchronized.&lt;br&gt;
💡 &lt;strong&gt;The Takeaway&lt;/strong&gt;&lt;br&gt;
At the front door, a receptionist (&lt;strong&gt;Geo-DNS&lt;/strong&gt;) checks your ID and directs you to the closest library building.&lt;/p&gt;

&lt;p&gt;Because you now have two identical, self-sustaining libraries, if the New York building completely floods, the receptionist simply routes every reader to the London library.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Your global business never closes for a single second.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Stage 12: Observability (Monitor Everything)
&lt;/h2&gt;

&lt;p&gt;Junior engineers focus entirely on scaling components; seasoned engineers focus on visibility. You cannot optimize what you do not measure. A massive distributed system needs robust monitoring for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CPU and Memory utilization&lt;/li&gt;
&lt;li&gt;Application error rates&lt;/li&gt;
&lt;li&gt;P99 Request latency&lt;/li&gt;
&lt;li&gt;Database query execution speeds&lt;/li&gt;
&lt;li&gt;Message queue depths&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvkhotwlw4uv0e39djkdz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvkhotwlw4uv0e39djkdz.png" alt=" " width="799" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A complex distributed system without monitoring is like driving a high-performance sports car in the dark without a dashboard.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Stage 13: The API Gateway &amp;amp; Reverse Proxy Layer
&lt;/h2&gt;

&lt;p&gt;As your multi-region backend grows more complex, exposing individual service internal URLs directly to client applications (Web, Mobile) creates tightly coupled security vulnerabilities and client-side configuration nightmares.&lt;/p&gt;

&lt;p&gt;We introduce a dedicated API Gateway (e.g., Kong, AWS API Gateway, Envoy) as the single entry point for all client traffic within a region.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fesyxok05ogvq2gvtq5fu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fesyxok05ogvq2gvtq5fu.png" alt=" " width="800" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Analogy:&lt;/strong&gt; Instead of having library visitors wander directly into the back rooms to find specific managers for billing, book requests, or complaints, you place a highly trained Concierge Desk at the front lobby. The concierge takes your request, verifies your library card, and routes you to the exact desk you need.
-&lt;strong&gt;The Technical Shift:&lt;/strong&gt; The Load Balancer feeds directly into the API Gateway. The Gateway handles cross-cutting concerns like:&lt;/li&gt;
&lt;li&gt;Centralized Authentication &amp;amp; JWT Verification: Validating users before they hit down-stream application layers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate Limiting / Throttling:&lt;/strong&gt; Preventing malicious API clients or scripts from overwhelming individual application nodes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Request Routing &amp;amp; Path Rewriting:&lt;/strong&gt; Translating a clean external route like /v1/recipes to internal service endpoints.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Stage 14: Microservices Architecture (Domain Decomposition)&lt;/strong&gt;&lt;br&gt;
Up until this point, your application servers (even when multiplied horizontally across regions) are still running the entire codebase monolithic-style. A tiny bug in the notification code can crash the server and take down recipe browsing. Furthermore, scaling the whole monolith just to handle a spike in cooking video processing wastes massive computing resources.&lt;/p&gt;

&lt;p&gt;We pull the monolithic codebase apart into completely autonomous, loosely coupled, domain-specific Microservices (e.g., Recipe Service, User Profile Service, Billing Service).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffgvatpscthu4kuz1a6ku.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffgvatpscthu4kuz1a6ku.png" alt=" " width="799" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Analogy:&lt;/strong&gt; Your library has grown so large that the single team of general clerks is completely overwhelmed. You break the team down into specialized departments. You now have a Procurement Department, a Filing Department, and a Customer Accounts Department. Each department works independently, operates in its own dedicated room, and uses its own set of tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Technical Shift:&lt;/strong&gt; Each microservice runs on its own isolated compute cluster (containerized via Docker/Kubernetes) and scales independently based on its specific load characteristics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Microservices&lt;/strong&gt; talk to each other via lightweight, language-agnostic network protocols like &lt;strong&gt;gRPC&lt;/strong&gt; or asynchronous events via the Message Queue.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Stage 15: Polyglot Persistence (The Right Database for the Right Job)
&lt;/h2&gt;

&lt;p&gt;In the earlier stages, we relied purely on standard relational databases (SQL). However, as features diversify, a rigid tabular database structure becomes highly inefficient for complex operations like full-text search indexing, relational social graphs (e.g., user follows, likes), or high-frequency trending leaderboards.&lt;/p&gt;

&lt;p&gt;We transition from a single database type to a Polyglot Persistence model, matching individual microservices to the ideal storage engine type.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Analogy:&lt;/strong&gt; In your library, you no longer try to force every single piece of information into identical cardboard folders. You store historical books on open shelves, visitor login times on a digital swipe-card log, and the master index in a lightning-fast alphabetical card catalog drawer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Relational DB (PostgreSQL/MySQL):&lt;/strong&gt; Retained for core transactions, user billing, and structured profile profiles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NoSQL Document Store (MongoDB/DynamoDB):&lt;/strong&gt; Used for flexible, unstructured recipe metadata and reviews.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search Engine (Elasticsearch/OpenSearch):&lt;/strong&gt; Used to power fuzzy text search, autocomplete, and complex ingredient filters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graph Database (Neo4j):&lt;/strong&gt; Used to map out social graphs, tracking follower connections and personalized recipe recommendations.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Golden Rule of System Design
&lt;/h2&gt;

&lt;p&gt;Scaling isn’t about jumping straight to microservices, database sharding, or complex container orchestration on day one. The best architectures evolve organically.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;The Success Blueprint&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Build simply.&lt;/li&gt;
&lt;li&gt;Measure performance and identify real bottlenecks.&lt;/li&gt;
&lt;li&gt;Fix the single largest bottleneck.&lt;/li&gt;
&lt;li&gt;Automate the operation.&lt;/li&gt;
&lt;li&gt;Repeat.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>systemdesign</category>
      <category>system</category>
      <category>java</category>
      <category>backend</category>
    </item>
    <item>
      <title>System Design: What Actually Happens When You Upload a File to Google Drive?</title>
      <dc:creator>Krishna Kanth Latya</dc:creator>
      <pubDate>Mon, 15 Jun 2026 20:27:04 +0000</pubDate>
      <link>https://dev.to/krishnakanthlatya/system-design-what-actually-happens-when-you-upload-a-file-to-google-drive-ple</link>
      <guid>https://dev.to/krishnakanthlatya/system-design-what-actually-happens-when-you-upload-a-file-to-google-drive-ple</guid>
      <description>&lt;p&gt;Uploading a file to Google Drive feels simple. You select a file, click Upload, watch a progress bar move, and moments later the file appears in your Drive.&lt;/p&gt;

&lt;p&gt;But behind this seemingly simple action lies a highly distributed system designed to handle millions of users, billions of files, and exabytes of data while remaining reliable, scalable, and fault-tolerant.&lt;/p&gt;

&lt;p&gt;In this article, we'll explore what actually happens behind the scenes when you upload a file to Google Drive and how the system is designed to operate at global scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;At first glance, uploading a file appears straightforward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User
  │
  ▼
Upload API
  │
  ▼
Storage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a small application, this architecture might work. However, Google Drive operates at an entirely different scale. Users upload everything from small images to massive video files and backups that can be hundreds of gigabytes in size. At the same time, millions of users may be uploading files concurrently from different parts of the world.&lt;/p&gt;

&lt;p&gt;This creates several challenges:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Large file uploads can take hours&lt;/li&gt;
&lt;li&gt;Network connections may disconnect midway&lt;/li&gt;
&lt;li&gt;Millions of uploads must be handled simultaneously&lt;/li&gt;
&lt;li&gt;Uploaded data must remain accurate and uncorrupted&lt;/li&gt;
&lt;li&gt;Hardware failures should never cause data loss&lt;/li&gt;
&lt;li&gt;Storage must scale to billions of files&lt;/li&gt;
&lt;li&gt;Users expect fast and seamless uploads&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A simple upload server cannot solve these problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  High-Level Solution
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs5seqx5xkx85ct537iyx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs5seqx5xkx85ct537iyx.png" alt=" " width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instead of uploading an entire file at once, Google Drive breaks the file into smaller chunks. These chunks are uploaded independently, validated, temporarily stored, and later assembled into the final file.&lt;/p&gt;

&lt;p&gt;Each upload is tracked through an upload session, allowing interrupted uploads to resume from where they stopped rather than starting over.&lt;/p&gt;

&lt;p&gt;Once the upload is complete, the file is stored in Google's distributed storage infrastructure and replicated across multiple locations to ensure durability and availability.&lt;/p&gt;

&lt;p&gt;Meanwhile, background services generate thumbnails, scan for viruses, extract metadata, and prepare previews without delaying the user experience.&lt;/p&gt;

&lt;p&gt;Let's walk through the complete upload journey.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: User Authentication
&lt;/h2&gt;

&lt;p&gt;Before an upload begins, Google must verify the user's identity. The Google Drive client sends an access token obtained during login.&lt;/p&gt;

&lt;p&gt;The authentication service verifies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User identity&lt;/li&gt;
&lt;li&gt;Storage quota&lt;/li&gt;
&lt;li&gt;Account permissions&lt;/li&gt;
&lt;li&gt;Upload authorization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Only after successful verification can the upload proceed. This prevents unauthorized users from consuming storage resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Upload Session Creation
&lt;/h2&gt;

&lt;p&gt;Google does not immediately start receiving file data. Instead, it first creates an upload session. The upload session acts as a tracking record for the entire upload process.&lt;/p&gt;

&lt;p&gt;It stores information such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User ID&lt;/li&gt;
&lt;li&gt;File name&lt;/li&gt;
&lt;li&gt;Upload status&lt;/li&gt;
&lt;li&gt;Uploaded chunks&lt;/li&gt;
&lt;li&gt;Remaining chunks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This session becomes extremely important if the upload gets interrupted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: File Chunking
&lt;/h2&gt;

&lt;p&gt;Uploading large files as a single request is inefficient and risky. Instead, Google splits files into smaller chunks.&lt;/p&gt;

&lt;p&gt;Example: &lt;strong&gt;5 GB File&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Chunk 1
Chunk 2
Chunk 3
Chunk 4
...
Chunk N
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Chunking provides several advantages:&lt;/p&gt;

&lt;h3&gt;
  
  
  Faster Recovery
&lt;/h3&gt;

&lt;p&gt;If a single chunk fails:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Retry Chunk 52
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;instead of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Retry Entire 5 GB File
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Parallel Uploads
&lt;/h3&gt;

&lt;p&gt;Multiple chunks can be uploaded simultaneously. This significantly improves upload performance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Chunk 1 ──►
Chunk 2 ──►
Chunk 3 ──►
Chunk 4 ──►
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4: API Gateway and Load Balancing
&lt;/h2&gt;

&lt;p&gt;Every upload request first reaches Google's edge infrastructure.&lt;/p&gt;

&lt;p&gt;Responsibilities include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Request routing&lt;/li&gt;
&lt;li&gt;Authentication validation&lt;/li&gt;
&lt;li&gt;Rate limiting&lt;/li&gt;
&lt;li&gt;Traffic management&lt;/li&gt;
&lt;li&gt;DDoS protection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of a single upload server handling all traffic, requests are distributed across thousands of upload servers. This allows Google Drive to support millions of concurrent uploads.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Chunk Verification
&lt;/h2&gt;

&lt;p&gt;Data can become corrupted during transmission. To ensure integrity, every uploaded chunk is validated using checksums.&lt;/p&gt;

&lt;p&gt;Common verification methods include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SHA-256&lt;/li&gt;
&lt;li&gt;CRC32C&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If verification fails:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Chunk Rejected
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The client simply uploads the chunk again. This guarantees that the stored data exactly matches the original file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Temporary Chunk Storage
&lt;/h2&gt;

&lt;p&gt;Successfully verified chunks are stored temporarily. At this stage, the file does not yet exist as a complete object. Google stores each chunk independently while tracking progress through the upload session.&lt;/p&gt;

&lt;p&gt;This design enables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Upload recovery&lt;/li&gt;
&lt;li&gt;Parallel uploads&lt;/li&gt;
&lt;li&gt;Efficient retries&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 7: Resumable Uploads
&lt;/h2&gt;

&lt;p&gt;One of the most important features of Google Drive is resumable uploads.&lt;/p&gt;

&lt;p&gt;Imagine a network failure during upload. Without upload sessions, the user would need to start over.&lt;/p&gt;

&lt;p&gt;Instead, Google checks the upload session:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Uploaded Chunks:
1 ✓
2 ✓
3 ✓
4 ✓
...
400 ✓
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When connectivity returns:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Resume From Chunk 401
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;rather than:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Resume From Chunk 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This dramatically improves reliability and user experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 8: File Assembly Service
&lt;/h2&gt;

&lt;p&gt;After all chunks arrive successfully, Google assembles them into a complete file. The assembly service ensures chunks are combined in the correct order to reconstruct the original file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 9: Metadata Service
&lt;/h2&gt;

&lt;p&gt;A file consists of two parts:&lt;/p&gt;

&lt;h3&gt;
  
  
  Metadata
&lt;/h3&gt;

&lt;p&gt;The actual bytes of the file.&lt;/p&gt;

&lt;h3&gt;
  
  
  File Content
&lt;/h3&gt;

&lt;p&gt;Information about the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"fileId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"xyz123"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"vacation.mp4"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"owner"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"user1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"size"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"5GB"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Metadata is stored separately because it allows Google Drive to provide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Search&lt;/li&gt;
&lt;li&gt;Sharing&lt;/li&gt;
&lt;li&gt;Folder navigation&lt;/li&gt;
&lt;li&gt;Permission management&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;without scanning the actual file contents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 10: Distributed Object Storage &amp;amp; Metadata Mapping
&lt;/h2&gt;

&lt;p&gt;Once all chunks are successfully uploaded and verified, the system logically assembles the file. Instead of physically gluing the chunks back together onto a single hard drive, the system creates a metadata map (a recipe showing how the chunks fit together) and distributes the individual chunks across Google's storage infrastructure.&lt;/p&gt;

&lt;p&gt;Instead of keeping the data on one machine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Storage Node A holds Chunk 1
Storage Node B holds Chunk 2
Storage Node C holds Chunk 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Benefits include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Horizontal scalability:&lt;/strong&gt; No single server runs out of disk space.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Faster access:&lt;/strong&gt; Users can download different chunks in parallel from multiple servers simultaneously.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage efficiency:&lt;/strong&gt; Allows Google Drive to manage billions of massive files without bottlenecking individual hardware units.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 11: Chunk Replication for Durability
&lt;/h2&gt;

&lt;p&gt;Hardware failures happen constantly in large-scale systems. To prevent data loss, the system doesn't just store those distributed chunks once — it immediately creates identical redundant copies of each chunk across different physical locations.&lt;/p&gt;

&lt;p&gt;The system clones the chunks across isolated zones:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Copy 1 of all chunks → Data Center A (e.g., Oregon)

Copy 2 of all chunks → Data Center B (e.g., Iowa)

Copy 3 of all chunks → Data Center C (e.g., Belgium)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a specific server node crashes, a rack loses power, or an entire data center goes offline due to a natural disaster, the file remains fully intact and accessible from another region.&lt;/p&gt;

&lt;p&gt;This geographic replication strategy ensures near-perfect data durability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 12: Background Processing
&lt;/h2&gt;

&lt;p&gt;The upload may be complete, but additional work still needs to happen.&lt;/p&gt;

&lt;p&gt;Google typically performs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Virus scanning&lt;/li&gt;
&lt;li&gt;Thumbnail generation&lt;/li&gt;
&lt;li&gt;Search indexing&lt;/li&gt;
&lt;li&gt;OCR processing&lt;/li&gt;
&lt;li&gt;Video transcoding&lt;/li&gt;
&lt;li&gt;Preview generation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of blocking the upload, these tasks run asynchronously in the background. As a result, users gain access to their files quickly while additional processing continues behind the scenes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;A file upload may look simple on the surface, but behind the scenes it involves a sophisticated distributed system. This architecture enables Google Drive to provide a fast, reliable, and scalable experience while handling billions of files across the globe.&lt;/p&gt;

&lt;p&gt;The next time you drag a file into Google Drive, remember that behind a simple progress bar is a massive distributed system working together to ensure your data is uploaded safely and reliably.&lt;/p&gt;

</description>
      <category>systemdesign</category>
      <category>java</category>
      <category>googledrive</category>
    </item>
  </channel>
</rss>
