How do you store data so it doesn't fall over when millions of people suddenly use your app at once — and doesn't lose a single byte if a server catches fire? This is the core challenge of designing scalable and reliable data storage, and it's a major topic in the Google Professional Data Engineer exam. Understanding how to choose and configure the right storage system (like Cloud Storage, Bigtable, or Spanner) for the right job is what separates a good data engineer from a great one.
Jump to a section
A simple way to picture Designing Scalable and Reliable Data Storage
Have you ever wondered how a food stall at a massive music festival manages to serve thousands of hungry people without running out of burgers or making everyone wait for hours?
Let's say you're running that burger stall. On a quiet Tuesday, you might have one grill, one server, and a small fridge. It works fine for the local lunch crowd. But when the festival arrives with 50,000 people, that setup collapses. Your single grill can only cook so many patties per minute — that's a lack of scalability. If your fridge breaks and you have no backup, all your meat spoils — that's a reliability failure.
To design for scalability, you need more grills (horizontal scaling — adding more machines), a bigger fridge that can expand (elastic storage), and a way to take orders from multiple queues so no single line gets blocked (load balancing). For reliability, you keep a second freezer truck parked nearby (replication), you have a backup generator (failover), and you store your secret sauce recipe in a separate locked box (backup and disaster recovery).
Now, not every stall needs to be a mega-kitchen. If you're just selling lemonade, a single stand with a big cooler might be enough. The art is matching your setup to the demand — and planning for when demand explodes or disaster strikes. That's exactly what designing scalable and reliable data storage is about.
Let's start with the absolute basics. Data storage is just a way to keep information (like customer names, sales records, or cat videos) so you can find it later. In IT, we have many different storage tools, each good at different things.
First, what does 'scalable' actually mean? Imagine a playground seesaw. If one person sits on it, it works fine. But if twenty people try to sit on it, it breaks. A scalable storage system is built so that if twenty people (or twenty million) want to use it, you can add more resources — like more servers or more disk space — without having to redesign the whole thing. There are two main ways to scale. Vertical scaling means making one machine bigger (more memory, faster processor). It's like buying a bigger truck to carry more boxes. Horizontal scaling means adding more machines to work together, like hiring a whole fleet of small vans instead. Horizontal scaling is usually better for huge systems because you can keep adding vans forever.
Now, 'reliability'. This means your data stays safe and available, even when things go wrong. Things go wrong all the time in IT: hard drives die, power fails, cables get chewed by rats. A reliable storage system protects against this by making copies of your data (called replication). If one copy is destroyed, another copy is still safe. Think of it like having a backup key to your house with a neighbour. Further, reliability includes 'durability' (the data won't get lost) and 'availability' (you can access the data when you need it).
Let's meet the Google storage tools you need to know for the PDE exam.
Cloud Storage is like a giant, unlimited filing cabinet in the sky. It's perfect for storing large files (like videos, backups, or images). It is hugely scalable and very durable — Google automatically keeps multiple copies of your data. You can choose different 'storage classes' based on how often you access the data. Standard is for frequent access, Nearline and Coldline are cheaper for data you access less often, and Archive is the cheapest for data you almost never look at (long-term backups). It is object storage, meaning you store 'objects' (files) in 'buckets' (folders). It is not great for storing a constantly changing database of customer orders, but it's perfect for a data lake.
Cloud SQL is a fully managed relational database. It's like having a personal assistant who sets up and runs your SQL database (like MySQL or PostgreSQL) for you. It handles all the tricky parts: backups, updates, and basic high availability (if the main database fails, a standby one takes over automatically). However, Cloud SQL is not designed for massive scale. It's 'vertically scalable' — you can make the machine bigger but it's hard to add many machines. It's ideal for typical business applications like a CRM (Customer Relationship Management) system or an e-commerce store with a few thousand users.
Cloud Spanner is the superhero of the database world. It's a relational database that is both horizontally scalable and strongly consistent. 'Strongly consistent' means that once you write data, every subsequent read anywhere in the world will see that exact data immediately. This is extremely hard to achieve at global scale. Spanner is for the biggest, most demanding applications in the world — think a global payment system like Google Pay, or an international airline reservation system. It can span across continents and still keep data perfectly in sync. It is expensive and complex, so you only use it when you absolutely need that global consistency and scale.
Bigtable is Google's very fast, scalable NoSQL database. 'NoSQL' means it does not use the traditional table-and-row structure of SQL databases. Instead, it's designed for high-throughput read and write operations. Think of it like a giant, sparse spreadsheet that can grow to handle petabytes of data. It is perfect for time-series data (like stock market ticks or IoT sensor readings), advertising analytics, and real-time personalisation. It scales horizontally beautifully. But it is not a relational database — you cannot do complex joins or queries across multiple tables easily.
BigQuery is a serverless, highly scalable data warehouse. A data warehouse is a special database designed for analysing huge amounts of data (analytics), not for running your live website. BigQuery can process terabytes of data in seconds using SQL queries. You do not manage any servers — it just works. It is the go-to tool for business intelligence, reporting, and large-scale data analysis. It is not designed for fast, small updates (transactions); it's designed to read and aggregate enormous datasets.
How do you choose between these? It comes down to the workload characteristics. Is it a transaction-heavy system needing strong consistency and global scale? Use Spanner. Is it high-volume, low-latency reads and writes of simple key-value data? Use Bigtable. Is it storing static files for a website? Use Cloud Storage. Is it an internal app database with moderate traffic? Use Cloud SQL. Is it running massive analytical queries? Use BigQuery.
Finally, you need to think about 'regions' and 'zones'. Google Cloud runs in data centres all around the world. A region is a geographic area (like London or Tokyo). Each region has three or more zones (individual data centres). For high reliability, you store your data in multiple zones (a regional resource). For even higher reliability (and lower latency for users around the world), you can store data in multiple regions (multi-region). This protects against a whole region going offline (very rare, but possible).
Designing for scalability and reliability is about anticipating problems before they happen. You plan for growth by choosing a horizontally scalable database. You plan for failure by replicating data across zones and regions. You plan for cost by matching storage class to access frequency. The PDE exam will test whether you can match these tools to real-world business problems.
Identify Data Types
First, categorise all your data into types: structured relational data (e.g., user accounts), semi-structured time-series data (e.g., sensor readings), and unstructured blob data (e.g., videos). This step determines which storage service families are even possible.
Determine Consistency and Transaction Requirements
Ask: does the application need strong consistency (every read sees the latest write) or is eventual consistency acceptable? Do you need atomic transactions (where multiple operations succeed or fail as a unit)? This narrows your choice between relational (Spanner, Cloud SQL) and NoSQL (Bigtable) options.
Estimate Scale and Throughput
Project your data volume (gigabytes vs. petabytes) and read/write throughput (operations per second). Cloud SQL tops out at a few thousand writes per second; Bigtable handles millions. Matching scale expectations to service limits is critical to avoid costly re-architecture.
Select Geographic Distribution
Decide whether your data must be available in one region, multiple regions, or globally. This directly affects which Google Cloud products are viable and how you configure replication. Multi-region configurations increase reliability but also cost and latency.
Implement Access Control and Lifecycle Policies
Configure IAM roles to restrict who can read, write, or delete data in each storage system. For Cloud Storage, set up Object Lifecycle Management to move data to cheaper storage classes automatically as it ages. This step ensures security and cost efficiency over time.
Design and Test Disaster Recovery
Define your recovery point objective (RPO — how much data can you lose?) and recovery time objective (RTO — how fast must you restore?). Configure replication, backups, or failover accordingly. Test the plan regularly to ensure it works.
Let's follow Maria, a data engineer at a fast-growing online fitness company called FitTrack.
The company started with a simple Cloud SQL database storing user profiles and workout logs. It worked fine for 1,000 users. But now FitTrack has 100,000 users and is growing fast. Maria's boss asks her to design a storage system that won't break as they grow to 10 million users, and that keeps working even if a data centre goes down.
Maria first looks at the different types of data. - User profile data (name, email, subscription status): This needs strong consistency (you don't want to show a user they have a paid subscription when they just cancelled). It's a relational dataset with moderate traffic. Maria decides to migrate from Cloud SQL to Cloud Spanner for this part, because Spanner can scale horizontally and provide global consistency when FitTrack expands to Europe and Asia. She replicates the database across three zones in the us-central1 region and a second region in europe-west1 for disaster recovery. - Workout session data: Each workout generates a stream of data (heart rate, reps, duration). This is high-volume, time-series data. A relational database would struggle. Maria chooses Cloud Bigtable. It can handle millions of writes per second as users upload their workout data from smartwatches. She configures Bigtable with a 'replication' policy across two zones so that if one zone fails, the workout data is still being saved. - Raw video of exercise classes: These are large files (500MB each) that users upload. This is perfect for Cloud Storage. Maria creates a bucket with 'Standard storage class' for frequently accessed recent videos, and a 'Nearline' bucket for videos older than 30 days. She makes sure the bucket is 'multi-region' (e.g., US) so that users anywhere in the country can download their videos quickly from a nearby Google data centre. She also sets up 'Object Lifecycle Management' to automatically move old videos to 'Archive' class after one year to save money. - Analytics data: The marketing team wants to run complex SQL queries across all user data to find trends. Maria sets up BigQuery. She creates a pipeline that copies data from Spanner and Bigtable into BigQuery every hour. BigQuery will handle the massive analytical queries without slowing down the live systems.
Maria also thinks about disaster recovery. She writes a plan: if the entire us-central1 region fails, the application will switch to the Spanner replica in europe-west1. The Cloud Storage bucket is already multi-region, so it just keeps working. Bigtable has replication across zones, but for a full region failure, Maria sets up a manual failover script.
Finally, she implements 'IAM' (Identity and Access Management) policies to control who can access each storage system. For example, only the video processing service can write to Cloud Storage; analysts can only read from BigQuery.
Maria's design is scalable (each system can grow independently), reliable (replication across zones and regions), and cost-effective (storage classes for different data ages). She has successfully designed a storage architecture that can support FitTrack's growth from 100,000 to 10 million users.
The PDE exam will test your ability to map business requirements to the right Google Cloud storage product. The questions are often scenario-based: they describe a company with specific needs (e.g., 'global strong consistency', 'high throughput for time-series data', 'cheap storage for infrequently accessed blobs'), and you must choose the correct storage service or configuration.
Here are the specific concepts the exam loves to test:
Cloud Storage is object storage for unstructured data like files, images, and backups, and it is highly durable and scalable.
Cloud SQL is a fully managed relational database for moderate transactional workloads, scaling vertically, not horizontally.
Cloud Spanner is a globally distributed, horizontally scalable relational database with strong consistency for mission-critical applications.
Bigtable is a NoSQL database designed for high-throughput, low-latency access to large amounts of time-series or key-value data.
BigQuery is a serverless data warehouse for analytical queries on petabytes of data, not for real-time transactions.
Replication across zones and regions is how you achieve high availability and disaster recovery in Google Cloud storage.
Choosing a storage class (Standard, Nearline, Coldline, Archive) in Cloud Storage helps balance cost versus access frequency.
For the PDE exam, always match the storage service to the workload's requirements for consistency, scalability, latency, and data structure.
These come up on the exam all the time. Here's how to tell them apart.
Cloud SQL
Scales vertically (bigger machine); limited horizontal scale
Single-region or limited cross-region (read replicas only)
Lower cost for moderate workloads
Relational database with full SQL support
Cloud Spanner
Scales horizontally (add nodes); near-limitless scale
Multi-region with global strong consistency
Higher cost; designed for mission-critical workloads
Relational database with full SQL support
Bigtable
NoSQL database for real-time, high-throughput reads/writes
Designed for transactional workloads (e.g., serving ads)
Data accessed by row key; limited aggregation
Millisecond latency for single-row lookups
BigQuery
Data warehouse for analytical SQL queries
Designed for analytic workloads (e.g., business intelligence)
Data accessed via SQL with full aggregation power
Second-level latency; scans terabytes of data
Cloud Storage Nearline
Faster retrieval (seconds to minutes)
Higher per-GB storage cost than Archive
Ideal for data accessed less than once a month
Cloud Storage Archive
Slower retrieval (minutes to hours)
Lowest per-GB storage cost
Ideal for data accessed less than once a year
Vertical Scaling
Upgrade a single machine (more CPU/RAM)
Limited growth ceiling (machine size max)
Simpler to implement; no need to distribute data
Horizontal Scaling
Add more machines to a cluster
Linear, near-unlimited growth
Complex to implement; requires data partitioning
Mistake
Cloud SQL scales horizontally just like Spanner.
Correct
Cloud SQL only scales vertically (bigger machine) and has read replicas, but it does not support horizontal scaling for writes like Spanner does.
Cloud SQL is called 'managed', which makes beginners assume it handles all scaling automatically. But 'managed' means the ops work — not infinite horizontal scalability.
Mistake
BigQuery is a good choice for a real-time transaction processing system.
Correct
BigQuery is a data warehouse designed for analytical queries on large datasets, not for high-frequency, low-latency transactions (like updating a user's balance).
BigQuery's speed and scale are impressive, so people mistakenly think it can replace a transactional database. But it has high latency per query (seconds) compared to transactional databases (milliseconds).
Mistake
Cloud Storage is just like a hard drive in the cloud — I can use it like a regular file system.
Correct
Cloud Storage is object storage, not a file system. You cannot mount it like a drive, and you cannot modify a single byte of a file — you have to rewrite the whole object.
The name 'Cloud Storage' feels familiar, and beginners equate it with their local computer's hard drive. The technical differences (eventual consistency for some operations, no in-place edits) are subtle but critical.
Mistake
Replication means you never lose data, so you don't need backups.
Correct
Replication protects against hardware failure, but not against accidental deletion, corruption, or ransomware. Backups are essential for point-in-time recovery.
People think 'copies' are the same as 'backups'. But if a user accidentally deletes a table, all replicas immediately delete that table. You need a separate backup to restore from a time before the deletion.
Mistake
All Google Cloud storage services have the same consistency model.
Correct
Different services have different consistency guarantees. Cloud Spanner offers strong global consistency; Cloud Storage offers strong consistency for some operations and eventual consistency for others; Bigtable offers eventual consistency by default.
The word 'consistent' is used broadly. Beginners assume 'the cloud' means 'everything is always in sync'. Understanding the specific consistency model of each service is a common exam topic.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
Cloud Storage is for storing files (objects) like videos and backups. Cloud SQL is a relational database for storing structured data like customer orders, with support for SQL queries and transactions.
No, Bigtable is a NoSQL database. It doesn't support SQL joins or strong consistency across rows. It is designed for fast, high-throughput access to time-series or key-value data.
Use Spanner when you need a global relational database that can scale horizontally and provide strong consistency across regions. Use Cloud SQL for simpler applications running in a single region that don't need massive scale.
Cloud Storage automatically replicates your data across multiple devices within a region, protecting against hardware failure. For protection against accidental deletion, you must enable Object Versioning or set up separate backups.
Serverless means you don't have to provision or manage any servers. BigQuery automatically allocates compute resources to run your queries and you pay only for the data processed, not for idle capacity.
Not a good idea. BigQuery is designed for analytical queries (e.g., 'total sales by region') that scan large datasets, not for individual row lookups or real-time transactions. Use it for analytics, not for your live app's backend.
You've finished Designing Scalable and Reliable Data Storage. Continue through the PDE study guide to build a complete picture of the exam.
Done with this chapter?