CCNA Pcd Design Scalable Questions

75 of 170 questions · Page 1/3 · Pcd Design Scalable topic · Answers revealed

1
Multi-Selecthard

You are designing a Cloud Bigtable schema for a time-series application that stores metrics from millions of devices. The row key is currently deviceID#timestamp. You want to avoid hotspotting on writes and optimize scan performance for reading all data from a specific device within a time range. Which two row key design strategies should you apply? (Choose 2)

Select 2 answers
A.Add a salt prefix to the row key (e.g., hash of deviceID)
B.Reverse the timestamp so that recent data appears first
C.Store data in multiple tables per device
D.Use a single column family for all metrics
E.Promote the device type to the start of the row key
AnswersA, B

Salting distributes writes across tablets to avoid hotspots.

Why this answer

Option A is correct because adding a salt prefix (e.g., a hash of the deviceID) distributes write load across multiple tablet servers, preventing hotspotting on a single node when many devices write concurrently. This ensures that sequential timestamps for the same device are not all written to the same tablet, which would otherwise cause a bottleneck.

Exam trap

Cisco often tests the misconception that reversing the timestamp alone solves hotspotting, but it only optimizes scan order; the salt is required to distribute write load, and candidates may overlook that both strategies are needed together.

2
MCQmedium

An e-commerce platform uses Memorystore for Redis as a session store. During a flash sale, the application experiences high latency and some sessions are evicted. The application currently uses a Standard Tier instance with 5 GB of memory. What is the MOST effective solution to improve performance and prevent evictions?

A.Increase the instance memory to 10 GB and enable persistence
B.Switch from Standard Tier to Basic Tier to reduce overhead
C.Delete all unused keys hourly using a scheduled job
D.Implement a cache-aside pattern with Cloud Firestore
AnswerA

Increasing memory capacity prevents evictions; persistence ensures data survives restarts, but the main fix is more memory.

Why this answer

Memorystore for Redis has two tiers: Basic (no replication, no HA) and Standard (replicated, HA). Basic tier does not support replication or high availability. Increasing memory to 10 GB provides more room for session data, preventing evictions.

Using a larger machine type with additional memory is the correct remedy for evictions. Changing to Basic tier would worsen availability. Using a cache aside pattern is a client-side optimization, not directly addressing evictions.

Deleting unused keys may free space but is not a scalable solution.

3
MCQhard

A startup is migrating an on-premises PostgreSQL 14 database to Cloud SQL. The database is 500 GB and handles OLTP workloads. They want to minimize downtime during migration. Which approach should they use?

A.Export the database using pg_dump and import using psql
B.Create a Cloud SQL read replica from the on-premises database
C.Use gcloud sql import to directly import from a dump file
D.Use Database Migration Service (DMS) with continuous replication
AnswerD

DMS supports continuous replication for minimal downtime.

Why this answer

Database Migration Service (DMS) supports continuous replication from source PostgreSQL to Cloud SQL, allowing near-zero downtime. Export/import requires downtime. Replica promotion is not a migration method.

4
MCQmedium

A company uses Cloud Bigtable for AdTech clickstream data. They notice that some tables have many deleted rows and the storage cost is increasing. What should they configure to automatically remove deleted data and reduce storage?

A.Set up cluster replication to a secondary cluster
B.Enable compaction on the table
C.Configure a garbage collection policy based on time or number of versions
D.Use IAM conditions to restrict write access
AnswerC

Garbage collection automatically removes old or deleted data, reducing storage.

Why this answer

Cloud Bigtable automatically compacts data in the background, but deleted rows are not immediately removed; they remain as tombstones until a garbage collection policy is applied. By configuring a garbage collection policy based on time or number of versions, you instruct Bigtable to permanently delete expired data and reclaim storage space, reducing costs.

Exam trap

Cisco often tests the misconception that compaction alone removes deleted data, but without a garbage collection policy, tombstones can persist and storage is not reclaimed.

How to eliminate wrong answers

Option A is wrong because cluster replication is used for high availability and disaster recovery, not for removing deleted data; it actually increases storage cost by duplicating data across clusters. Option B is wrong because compaction is an automatic background process in Bigtable that merges SSTables and removes tombstones, but it does not enforce a retention policy—without a garbage collection policy, tombstones can persist indefinitely. Option D is wrong because IAM conditions control access permissions, not data lifecycle management; they cannot remove deleted rows or reduce storage.

5
MCQmedium

An e-commerce company is designing a global product inventory system that requires strong consistency across regions, horizontal scaling for millions of users, and 99.999% availability. Which Google Cloud database meets all these requirements?

A.Firestore
B.Cloud Bigtable
C.Cloud Spanner
D.Cloud SQL for PostgreSQL
AnswerC

Spanner is a globally distributed, horizontally scalable relational database with strong consistency and 99.999% SLA.

Why this answer

Cloud Spanner is the only Google Cloud database that provides globally distributed ACID transactions with strong consistency, horizontal scaling, and 99.999% SLA.

6
MCQeasy

A mobile app needs to store user preferences as a simple key-value store. The data is infrequently accessed and should be highly available with no operational overhead. The app is already using Firebase. Which database is the best fit?

A.Bigtable
B.Firestore
C.Memorystore
D.Cloud SQL
AnswerB

Firestore is serverless, no operational overhead, integrates with Firebase, and suitable for key-value data.

Why this answer

Firestore is serverless, integrates with Firebase, and is ideal for storing user preferences as documents.

7
MCQhard

You are designing a Cloud Spanner schema for a global user database. Users are identified by a UUID. You notice hotspotting on a specific node during writes. What is the most effective way to resolve this?

A.Use a composite primary key with a hash prefix of the UUID
B.Enable interleaved tables to store child rows with parent
C.Change the primary key to a monotonically increasing timestamp
D.Add a secondary index on the UUID column
AnswerA

This spreads writes across splits, eliminating hotspotting.

Why this answer

Hotspotting in Cloud Spanner occurs when writes are concentrated on a single node due to a monotonically increasing primary key (like a UUID without a hash prefix). By using a composite primary key with a hash prefix of the UUID, you distribute writes evenly across all nodes because the hash prefix ensures that successive writes land on different splits. This prevents a single node from becoming a bottleneck, thereby resolving the hotspotting issue.

Exam trap

Cisco often tests the misconception that secondary indexes or interleaved tables can fix write distribution issues, but the root cause is the primary key design, and only modifying the primary key (e.g., with a hash prefix) directly addresses hotspotting in Cloud Spanner.

How to eliminate wrong answers

Option B is wrong because interleaved tables organize child rows physically near their parent row, which can improve read performance but does not address write hotspotting caused by the primary key distribution. Option C is wrong because changing the primary key to a monotonically increasing timestamp would worsen hotspotting, as all new writes would target the same split (the last one), concentrating load on a single node. Option D is wrong because adding a secondary index on the UUID column does not change the underlying primary key distribution; writes still use the original primary key, so hotspotting persists.

8
MCQmedium

A mobile app team wants to store user session state with low latency and support for pub/sub messaging. They need a managed service that automatically scales. Which database is BEST suited for this?

A.Bigtable
B.Cloud SQL
C.Firestore
D.Memorystore for Redis
AnswerD

Redis excels at session store, pub/sub, and caching with sub-millisecond latency.

Why this answer

Memorystore for Redis is the best choice because it provides an in-memory data store with sub-millisecond latency, ideal for session state caching, and natively supports pub/sub messaging via Redis Pub/Sub. As a managed service, it automatically handles scaling and failover, meeting the team's requirements without operational overhead.

Exam trap

Cisco often tests the distinction between real-time database listeners (like Firestore) and true pub/sub messaging, leading candidates to mistakenly choose Firestore for pub/sub needs when it only supports document-level real-time updates, not a general publish-subscribe channel.

How to eliminate wrong answers

Option A is wrong because Bigtable is a wide-column NoSQL database optimized for analytical workloads with high throughput, not for low-latency session state or pub/sub messaging. Option B is wrong because Cloud SQL is a relational database with higher latency due to disk-based storage and lacks built-in pub/sub capabilities. Option C is wrong because Firestore is a document database that supports real-time listeners but does not offer native pub/sub messaging; its real-time updates are limited to document changes, not a general-purpose pub/sub channel.

9
MCQmedium

You are designing a Cloud Spanner schema with a parent table 'Customers' and a child table 'Orders'. To optimize read performance for retrieving a customer and their orders in a single split, you should use:

A.Interleaved tables with Customers as the parent
B.A secondary index on Orders.customer_id
C.A foreign key constraint from Orders to Customers
D.Use a single table with repeated fields
AnswerA

Interleaving stores child rows adjacent to the parent, improving read performance.

Why this answer

Interleaved tables store child rows with the parent row in the same split, enabling efficient joins and low-latency reads.

10
MCQmedium

You need a caching layer for a web application that handles high read traffic. The cache must support pub/sub messaging for cache invalidation across multiple servers. Which service should you use?

A.Cloud Bigtable
B.Memorystore for Memcached
C.Memorystore for Redis
D.Firestore
AnswerC

Memorystore for Redis supports pub/sub for cache invalidation.

Why this answer

Memorystore for Redis is the correct choice because Redis natively supports pub/sub messaging, which enables cache invalidation notifications across multiple application servers. This allows each server to subscribe to channels and receive real-time invalidation messages, ensuring cache consistency in a distributed environment. Memcached, in contrast, lacks pub/sub capabilities, making it unsuitable for this requirement.

Exam trap

The trap here is that candidates often confuse Memcached with Redis, assuming both support pub/sub, but Memcached is purely a key-value cache with no messaging primitives, while Redis includes pub/sub as a built-in feature.

How to eliminate wrong answers

Option A is wrong because Cloud Bigtable is a NoSQL wide-column database designed for large-scale analytical and operational workloads, not a caching layer, and it does not support pub/sub messaging for cache invalidation. Option B is wrong because Memorystore for Memcached provides a distributed cache but lacks pub/sub messaging support, which is essential for cross-server cache invalidation. Option D is wrong because Firestore is a document-oriented NoSQL database for mobile and web apps, not a caching layer, and it does not offer pub/sub messaging for cache invalidation across servers.

11
Multi-Selecthard

A company is designing a multi-region Cloud Spanner deployment for a global user base. They want to ensure the lowest possible read latency for users in North America and Europe while maintaining strong consistency. Which THREE configuration choices should they make? (Choose 3)

Select 3 answers
A.Use interleaved tables to localize related data
B.Configure the application to use stale reads with 1-second bounded staleness
C.Choose a multi-region configuration that includes us-central1 and europe-west1 as primary regions
D.Use a single-region configuration and rely on Cloud CDN to cache read results
E.Add read-only replicas in both us-central1 and europe-west1
AnswersA, C, E

Interleaving improves locality and reduces cross-split reads, lowering latency.

Why this answer

A multi-region configuration with primary regions in North America and Europe provides leader placement for writes and read replicas for low-latency reads. Adding read-only replicas in each region reduces read latency. Placing read-write replicas in both regions ensures strong consistency locally.

12
MCQmedium

An e-commerce platform uses Cloud SQL for PostgreSQL for its inventory database. To meet a higher availability requirement, they decide to enable the HA configuration. What is the expected recovery point objective (RPO) with Cloud SQL HA?

A.0 (zero)
B.Depends on the replication lag
C.Up to 5 minutes
D.Up to 1 minute
AnswerA

Cloud SQL HA uses synchronous replication to the standby, guaranteeing no data loss on failover, i.e., RPO=0.

Why this answer

Cloud SQL for PostgreSQL HA uses synchronous replication to a standby instance in a different zone within the same region. This ensures that every write transaction is committed on both the primary and standby before acknowledging the client, resulting in zero data loss upon failover. Therefore, the RPO is 0 (zero).

Exam trap

The trap here is that candidates confuse Cloud SQL HA's synchronous replication with typical asynchronous replication used in self-managed PostgreSQL streaming replication, leading them to incorrectly assume a non-zero RPO due to replication lag.

How to eliminate wrong answers

Option B is wrong because Cloud SQL HA uses synchronous replication, not asynchronous, so there is no replication lag; the RPO is fixed at zero. Option C is wrong because an RPO of up to 5 minutes would imply asynchronous replication with potential data loss, which is not the case for Cloud SQL HA. Option D is wrong because an RPO of up to 1 minute still suggests some data loss window, whereas Cloud SQL HA guarantees zero data loss through synchronous replication.

13
Multi-Selectmedium

A company is migrating an on-premises Oracle database to Google Cloud. They need a managed relational database with high availability, but they are not ready to redesign their schema for sharding. They also want to reduce licensing costs. Which TWO Google Cloud database services should they consider? (Choose 2)

Select 2 answers
A.Firestore
B.Cloud Spanner
C.Bigtable
D.Cloud SQL for SQL Server
E.AlloyDB
AnswersD, E

SQL Server is a direct lift-and-shift target with managed HA.

Why this answer

Cloud SQL supports managed MySQL, PostgreSQL, and SQL Server, suitable for lift-and-shift. AlloyDB is PostgreSQL-compatible and offers high performance with a columnar engine. Both are managed and reduce licensing costs compared to Oracle.

14
MCQhard

A company is designing a Bigtable schema for time-series data from millions of devices. Each device sends a reading every minute. The row key is currently 'device_id#timestamp'. The engineering team notices hot spots on a few popular devices. Which row key design change would BEST distribute writes across the cluster?

A.Promote device ID to column family
B.Use reversed domain for device IDs
C.Use only timestamp as row key
D.Append a random salt prefix to the row key
AnswerD

Salted keys randomize the start of the row key, distributing writes across nodes and avoiding hotspots.

Why this answer

Salted keys (prepending a hash prefix) distribute writes across tablet servers. Reversing the timestamp or field promotion alone may not solve hotspots from popular device IDs.

15
MCQeasy

A startup is building a mobile app that needs offline support and real-time synchronization across devices. The data is primarily user profiles and activity logs. Which Google Cloud database would best meet these requirements?

A.Cloud Spanner
B.Cloud SQL
C.Firestore
D.Cloud Bigtable
AnswerC

Firestore offers offline persistence and real-time sync, perfect for mobile and web apps.

Why this answer

Firestore provides offline data persistence and real-time sync, making it ideal for mobile apps. Cloud SQL and Spanner lack built-in offline support, and Bigtable is not suitable for complex document data.

16
Multi-Selecthard

You need to design a Firestore database for a mobile chat application that supports real-time updates and offline access. The app requires that users can only read and write their own messages. Which three configurations should you implement? (Choose three.)

Select 3 answers
A.Enable offline persistence in the client SDK
B.Use Firestore Native mode
C.Use Cloud SQL instead of Firestore for stronger consistency
D.Use Firestore Datastore mode
E.Define Security Rules that restrict read/write based on the authenticated user's UID
AnswersA, B, E

Offline persistence allows the app to work without connectivity and sync later.

Why this answer

Option A is correct because enabling offline persistence in the Firestore client SDK allows the mobile chat app to cache data locally, ensuring that users can read and write their own messages even when the device is temporarily offline. This is essential for a chat application that must support real-time updates and offline access, as Firestore automatically synchronizes local changes with the server when connectivity is restored.

Exam trap

Cisco often tests the distinction between Firestore Native mode and Datastore mode, where candidates mistakenly choose Datastore mode for real-time mobile apps, but Datastore mode lacks client-side real-time listeners and offline persistence, which are exclusive to Native mode.

17
MCQmedium

A company wants to lift-and-shift an existing on-premises MySQL OLTP application to Google Cloud with minimal changes. They need up to 64 TB of storage and 96 vCPUs. Which database service should they use?

A.Cloud Spanner
B.Cloud SQL for MySQL
C.BigQuery
D.AlloyDB
AnswerB

Cloud SQL for MySQL supports the required specs and is ideal for lift-and-shift.

Why this answer

Cloud SQL for MySQL supports up to 64 TB storage and 96 vCPU, and requires minimal changes for lift-and-shift. AlloyDB is PostgreSQL-compatible, not MySQL. Cloud Spanner is not a drop-in replacement for MySQL.

BigQuery is for analytics.

18
Multi-Selectmedium

A gaming company wants to store player profiles and game state data that require strong consistency and the ability to run SQL queries. They also need to support real-time leaderboards with high write throughput. Which two Google Cloud databases should they consider? (Choose 2)

Select 2 answers
A.Memorystore for Redis
B.Cloud Bigtable
C.AlloyDB
D.Firestore
E.Cloud Spanner
AnswersA, E

Redis is ideal for real-time leaderboards due to sorted sets and low latency.

Why this answer

Cloud Spanner provides strong consistency and SQL, while Memorystore for Redis can be used for real-time leaderboards with high throughput. Bigtable and Firestore do not have SQL, and AlloyDB is not ideal for high-throughput leaderboards.

19
MCQhard

Your Bigtable cluster is experiencing high latency for a table that stores IoT sensor data. The row key format is deviceID#timestamp. You discover that most reads query the last hour of data for a few devices. How can you optimize row key design to improve read performance?

A.Reverse the timestamp in the row key (e.g., deviceID#MAXTIME - timestamp)
B.Separate frequently accessed data into a different column family
C.Use a single table with a composite key including device type
D.Add a salt prefix to the row key
AnswerA

This places recent data near each other, making range scans faster.

Why this answer

Option A is correct because reversing the timestamp (e.g., deviceID#MAXTIME - timestamp) converts the row key from monotonically increasing to more evenly distributed. In Bigtable, rows are sorted lexicographically by row key; with deviceID#timestamp, all writes for a device go to the same tablet server, causing a hotspot. By reversing the timestamp, recent data for a device is spread across multiple tablets, reducing write contention and improving read latency for the last hour of data.

Exam trap

Cisco often tests the misconception that adding a salt prefix is always the best solution for hotspotting, but in this scenario, the salt would break the ability to efficiently query recent data for a specific device, making timestamp reversal the correct optimization.

How to eliminate wrong answers

Option B is wrong because separating data into a different column family does not address the root cause of hotspotting; column families affect storage and access patterns within a row, not row key distribution across tablets. Option C is wrong because using a composite key with device type does not solve the hotspotting issue; it still results in sequential writes for the same device, and device type adds no benefit for time-range queries. Option D is wrong because adding a salt prefix (e.g., a random hash) would scatter writes but would also scatter reads, making it impossible to efficiently query the last hour of data for a specific device without scanning all salts.

20
MCQmedium

You are designing a Cloud Spanner schema for a global user profile table. The primary key is a UUID generated client-side. Users report high write latency and hotspotting on a specific node. What is the most likely cause?

A.The primary key is monotonically increasing
B.The table is not interleaved
C.The number of Spanner nodes is insufficient
D.Secondary indexes are not defined
AnswerA

Monotonically increasing keys cause hotspots in Spanner because writes go to a single split.

Why this answer

UUIDs are randomly distributed, so they should not cause hotspots. However, if the UUIDs are monotonically increasing (e.g., time-based UUID version 1), they can cause hotspots. But the question says 'UUID generated client-side' – typical client-side UUIDs are random.

However, the correct answer is that a monotonically increasing key causes hotspots. The stem suggests a UUID, but the distractor 'The primary key is monotonically increasing' is the root cause. Actually, UUIDs are not monotonically increasing, but if they are time-based they can be.

The best answer is that the primary key causes hotspots because it is monotonically increasing (if it were a sequential integer). Wait, the stem says UUID. The correct answer should be 'The primary key is monotonically increasing' – but UUIDs are random.

Perhaps the intent is that they chose a sequential key. I'll adjust: The stem should specify a sequential key, not UUID. Let me re-read: 'primary key is a UUID generated client-side' – random UUIDs are good for Spanner.

So the correct answer is that they are using monotonically increasing keys. I'll change the stem to say 'primary key is a timestamp-based ID' or similar. Let me revise: 'primary key is a timestamp-based ID generated client-side'.

21
MCQmedium

You are designing a global user-facing application that requires strong consistency, horizontal scalability, and 99.999% availability across multiple continents. Which database service should you choose?

A.Cloud SQL
B.Firestore
C.Cloud Spanner
D.Bigtable
AnswerC

Correct: globally distributed, strong consistency, horizontal scaling, 99.999% SLA.

Why this answer

Cloud Spanner is the only Google Cloud database service that provides strong consistency, horizontal scalability, and 99.999% availability across multiple continents. It uses synchronous replication and the TrueTime API to deliver external consistency across globally distributed nodes, making it ideal for global user-facing applications that require ACID transactions at scale.

Exam trap

Cisco often tests the misconception that a NoSQL database like Bigtable or Firestore can provide strong consistency across multiple regions, but only Spanner combines horizontal scalability with ACID transactions and global strong consistency via synchronous replication.

How to eliminate wrong answers

Option A is wrong because Cloud SQL is a regional relational database that supports only up to 99.95% availability and cannot scale horizontally across multiple continents; it is designed for single-region deployments. Option B is wrong because Firestore offers strong consistency only within a single region and uses eventual consistency for multi-region configurations, failing the requirement for strong consistency across continents. Option D is wrong because Bigtable is a NoSQL wide-column database that provides only eventual consistency and is not designed for ACID transactions or relational queries, making it unsuitable for applications requiring strong consistency.

22
Multi-Selectmedium

A retail company is migrating its on-premises PostgreSQL OLTP database to Google Cloud. They require high availability with automatic failover and zero RPO. The application is latency-sensitive and must remain in a single region. Which TWO configurations should they choose? (Choose TWO.)

Select 2 answers
A.Deploy Cloud SQL for PostgreSQL with cross-region replication
B.Deploy Cloud Spanner multi-region configuration
C.Deploy Cloud SQL for PostgreSQL with HA configuration
D.Deploy AlloyDB for PostgreSQL with high availability
E.Use Memorystore for Redis as a primary database
AnswersC, D

Cloud SQL HA provides synchronous replication within the same region, automatic failover, and zero RPO.

Why this answer

Cloud SQL HA uses synchronous replication to a standby in a different zone within the same region, providing automatic failover and zero RPO. AlloyDB is PostgreSQL-compatible and offers HA with synchronous replication. Cloud SQL cross-region replication is asynchronous, not meeting zero RPO.

Spanner multi-region is overkill and introduces cross-region latency. Memorystore is not a relational database.

23
MCQhard

An engineer is configuring Cloud SQL for PostgreSQL with HA. They notice that after a failover, the original primary instance does not automatically resume as a standby. What is the likely cause?

A.The standby instance was not configured in a different zone
B.The HA instance is using local SSD which is not durable
C.The original primary instance is deleted after failover
D.The original primary instance's disk is now in read-only mode
AnswerD

After failover, the original primary's disk is remounted as read-only to avoid split-brain. The instance must be recreated as a standby.

Why this answer

In Cloud SQL HA, after a failover, the original primary becomes a new standby using the same underlying disk. It does not create a new instance automatically. The disk is preserved, and the standby is recreated.

24
MCQhard

You are designing a Cloud Spanner database for a global user application that must enforce strong consistency across regions. The primary key of the main table is a UUID. You notice that write latency is high and suspect hotspotting. Which design change is MOST likely to reduce hotspotting?

A.Use a monotonically increasing integer as the primary key
B.Use a composite primary key with a leading hash prefix of the UUID
C.Switch to regional Spanner instance instead of multi-region
D.Use a secondary index on the UUID column and keep the primary key as a UUID
AnswerB

A hash prefix (e.g., first 4 bytes of SHA256) distributes writes evenly across splits, reducing hotspotting.

Why this answer

Option B is correct because using a composite primary key with a leading hash prefix distributes writes evenly across all Cloud Spanner splits, preventing hotspotting. A UUID primary key alone can still cause hotspots if the UUID generation is not perfectly random or if the application uses sequential UUIDs; a hash prefix ensures uniform distribution regardless of the UUID's characteristics.

Exam trap

The trap here is that candidates assume UUIDs are always perfectly random and thus immune to hotspotting, but Cloud Spanner's split-by-key-range design means that any sequential or clustered key pattern—including certain UUID implementations—can cause hotspots, and a hash prefix is the standard solution.

How to eliminate wrong answers

Option A is wrong because a monotonically increasing integer primary key creates a hotspot on the last split, as all new writes go to the same tablet, causing high write latency. Option C is wrong because switching to a regional instance reduces availability and may increase latency for global users, and does not address the underlying hotspotting caused by the primary key design. Option D is wrong because a secondary index on the UUID column does not change the primary key's distribution; writes still target the same splits based on the primary key, so hotspotting persists.

25
MCQmedium

Your Bigtable instance is experiencing high latency on read queries that scan a large range of rows. The row keys are timestamps in descending order (e.g., '2024-01-01#user123'). What is the most likely cause?

A.Row keys are too short
B.Row keys cause hotspotting because of descending timestamps
C.There are too many column families
D.Column family design is incorrect
AnswerB

Correct: descending timestamps concentrate writes on a single tablet server, causing hotspots.

Why this answer

Descending timestamps as row keys cause hotspotting because new writes (which are always the most recent timestamp) are concentrated on a single tablet server node, creating a 'hot node' that also serves read queries for that range. Bigtable splits and load-balances by row key prefix, so sequential descending keys like '2024-01-01#...', '2024-01-02#...' are written to the same tablet, leading to uneven load and high read latency for scans over large ranges.

Exam trap

Cisco often tests the misconception that descending timestamps are a good way to keep recent data at the top of scans, but the trap is that this creates a hotspot on the last tablet, causing both write and read bottlenecks.

How to eliminate wrong answers

Option A is wrong because row key length does not directly cause hotspotting or high read latency; short keys are fine as long as they distribute writes evenly. Option C is wrong because the number of column families affects storage and schema design but does not cause hotspotting from write patterns or scan latency on large row ranges. Option D is wrong because column family design impacts data organization and compression, not the distribution of row keys across tablets; incorrect column family design would not create a hot node from timestamp-based keys.

26
MCQhard

You are tuning a Cloud Bigtable table used for analytics. One column family, 'data', contains both frequently accessed columns (e.g., 'price', 'volume') and rarely accessed columns (e.g., 'raw_json'). To optimize performance and cost, what column family design is recommended?

A.Use separate tables for each access pattern
B.Store rarely accessed columns as a JSON string in a single column
C.Create two column families: 'core' for frequently accessed columns and 'extended' for rarely accessed columns
D.Place all columns in a single column family for simplicity
AnswerC

This allows efficient reads by reading only the required column family.

Why this answer

Separating columns into different column families based on access patterns is a best practice. Frequently accessed columns should be in one column family (e.g., 'core'), and rarely accessed columns in another (e.g., 'extended'). This allows Bigtable to optimize storage and read performance.

27
MCQmedium

A global e-commerce company needs a database for its order processing system that can handle high write throughput across multiple regions, with strong consistency and 99.999% availability. The data model is relational with joins. Which database should they choose?

A.Cloud Spanner
B.Firestore
C.Cloud SQL (PostgreSQL)
D.Cloud Bigtable
AnswerA

Spanner provides strong ACID transactions across regions, high availability, and relational capabilities.

Why this answer

Cloud Spanner is the correct choice because it is a globally distributed, horizontally scalable relational database service that provides strong consistency across regions, 99.999% availability (five nines), and supports SQL joins. It uses synchronous replication and the TrueTime API to deliver ACID transactions at global scale, meeting the high write throughput and consistency requirements.

Exam trap

The trap here is that candidates often choose Cloud SQL (PostgreSQL) because it is relational and familiar, but they overlook the requirement for multi-region high write throughput and 99.999% availability, which Cloud SQL cannot provide due to its single-region architecture and lack of automatic global scaling.

How to eliminate wrong answers

Option B (Firestore) is wrong because it is a NoSQL document database that does not support relational joins and offers only eventual consistency in multi-region mode, not strong consistency. Option C (Cloud SQL) is wrong because it is a single-region relational database with limited scalability (read replicas only) and cannot achieve 99.999% availability across multiple regions or handle high global write throughput. Option D (Cloud Bigtable) is wrong because it is a NoSQL wide-column database that does not support relational joins or strong consistency (only single-row atomicity) and is designed for analytical workloads, not transactional order processing.

28
MCQmedium

A company is migrating an on-premises PostgreSQL database to Google Cloud. They need high availability with automatic failover and zero RPO. Which Cloud SQL configuration should they choose?

A.Cloud SQL with cross-region replication
B.Cloud SQL HA instance (regional)
C.Cloud SQL read replica in a different region
D.Single zone Cloud SQL instance with automated backups
AnswerB

An HA instance replicates synchronously to a standby in a different zone within the same region, ensuring automatic failover and zero RPO.

Why this answer

Cloud SQL HA instances use synchronous replication to a standby in the same region, providing automatic failover and zero RPO.

29
MCQmedium

A financial services company needs a globally distributed database that provides ACID transactions across regions with 99.999% availability SLA. The workload is transactional, with up to 10,000 transactions per second. Which database should they choose?

A.Cloud Spanner
B.Bigtable
C.Cloud SQL with cross-region replicas
D.Firestore in multi-region mode
AnswerA

Spanner meets all requirements: global distribution, ACID across regions, 99.999% SLA.

Why this answer

Cloud Spanner offers global distribution, ACID transactions, and 99.999% SLA, making it ideal for financial transactional workloads.

30
MCQmedium

You need to design a system that handles both high-frequency OLTP transactions and real-time analytical queries on the same dataset with low latency. Which Google Cloud database should you choose?

A.AlloyDB
B.BigQuery
C.Cloud SQL for PostgreSQL
D.Cloud Spanner
AnswerA

AlloyDB's columnar engine allows fast analytical queries on transactional data.

Why this answer

AlloyDB is PostgreSQL-compatible and includes a columnar engine for fast analytical queries on transactional data, enabling HTAP workloads. Cloud SQL does not have a columnar engine, BigQuery is for analytics only, and Spanner is OLTP-focused.

31
MCQmedium

You are designing a Cloud Spanner schema with a parent Orders table and an OrderItems child table. Queries frequently join Orders and OrderItems on OrderId. Which feature should you use to optimize read performance?

A.Denormalize OrderItems into the Orders table
B.Use a STORING clause on the index
C.Create a global secondary index on OrderItems(OrderId)
D.Use interleaved tables with OrderItems as child of Orders
AnswerD

Interleaving ensures child rows are stored with parent, making joins fast.

Why this answer

Interleaving stores child rows physically with the parent row, reducing latency for joins. Secondary indexes help lookups but not joins. Storing clause adds columns to index but does not improve join performance like interleaving.

32
MCQeasy

You need a fully managed, relational OLTP database that is PostgreSQL-compatible and can run analytical queries on the same data without extract-transform-load (ETL). Which Google Cloud database should you use?

A.Cloud Bigtable
B.Cloud SQL for PostgreSQL
C.AlloyDB
D.Cloud Spanner
AnswerC

AlloyDB is PostgreSQL-compatible and includes a columnar engine for fast analytics on transactional data.

Why this answer

AlloyDB is a fully managed, PostgreSQL-compatible database service designed for both transactional (OLTP) and analytical workloads on the same data without requiring ETL. It achieves this through its AlloyDB Columnar Engine, which automatically accelerates analytical queries by storing data in a columnar format while maintaining full PostgreSQL compatibility for OLTP operations.

Exam trap

The trap here is that candidates often confuse Cloud SQL for PostgreSQL as sufficient for mixed workloads, but it lacks native columnar analytics acceleration, requiring separate analytics infrastructure or ETL processes.

How to eliminate wrong answers

Option A is wrong because Cloud Bigtable is a NoSQL, wide-column database optimized for high-throughput, low-latency operational workloads, not a relational OLTP database, and it is not PostgreSQL-compatible. Option B is wrong because Cloud SQL for PostgreSQL is a fully managed relational OLTP database but lacks built-in support for running analytical queries on the same data without ETL; it requires separate analytics solutions like BigQuery or external ETL pipelines. Option D is wrong because Cloud Spanner is a globally distributed, strongly consistent relational database but is not PostgreSQL-compatible (it uses GoogleSQL or standard SQL with Spanner-specific extensions) and is designed for horizontal scaling across regions, not specifically for mixed OLTP/analytical workloads without ETL.

33
MCQeasy

An e-commerce company wants to use Cloud SQL for PostgreSQL with high availability (HA) in the same region. What is the RPO (Recovery Point Objective) of Cloud SQL HA configuration?

A.Up to 1 hour
B.Up to 5 minutes
C.Depends on the database size
D.0 (zero)
AnswerD

Synchronous replication guarantees zero data loss.

Why this answer

Cloud SQL uses synchronous replication to a standby instance in the same zone/region, ensuring zero data loss on failover.

34
MCQmedium

A financial services company is building a global payment system that requires strong ACID transactions across multiple regions, with 99.999% availability and automatic failover. Which Google Cloud database should they choose?

A.Cloud Spanner
B.AlloyDB with cross-region replicas
C.Cloud SQL with cross-region replicas
D.Firestore in Native mode
AnswerA

Spanner provides global ACID transactions, 99.999% SLA, and automatic failover across regions.

Why this answer

Cloud Spanner is the only Google Cloud database that provides strong ACID transactions across multiple regions with 99.999% availability and automatic failover. It uses a globally distributed architecture with synchronous replication and the TrueTime API to ensure external consistency, making it ideal for a global payment system that requires strict consistency and high availability.

Exam trap

Cisco often tests the misconception that cross-region replicas in relational databases like AlloyDB or Cloud SQL can provide strong ACID transactions and 99.999% availability, but these solutions use asynchronous replication and lack the global consistency and automatic failover capabilities of Cloud Spanner.

How to eliminate wrong answers

Option B is wrong because AlloyDB with cross-region replicas uses asynchronous replication, which cannot guarantee strong ACID transactions across regions and may lead to data inconsistency during failover. Option C is wrong because Cloud SQL with cross-region replicas also relies on asynchronous replication and does not provide automatic failover with 99.999% availability; it is designed for regional rather than global deployments. Option D is wrong because Firestore in Native mode is a NoSQL database that does not support strong ACID transactions across multiple regions; it offers eventual consistency for multi-region configurations, which is unsuitable for a payment system requiring strict transactional guarantees.

35
Multi-Selectmedium

A company is designing a Cloud Bigtable schema for a time-series application. The application writes data from millions of devices and reads recent data by device ID and time range. Which TWO design patterns should they implement to optimize performance? (Select TWO.)

Select 2 answers
A.Use a single table with a row key that combines device_id and reversed timestamp
B.Use a row key format that starts with device_id followed by a reversed timestamp
C.Use multiple tables, one per device
D.Use a salting prefix to distribute writes
E.Store frequently accessed columns in a separate column family from rarely accessed ones
AnswersA, B

Same as A; this is the recommended pattern.

Why this answer

To optimize reads by device ID and time range, promote device_id to the start of the row key for efficient scans. Reverse the timestamp to avoid hotspotting on recent writes. Column families separate access patterns but don't affect read efficiency directly.

A single table is fine.

36
MCQeasy

A mobile app developer wants a serverless NoSQL database that automatically syncs data offline and provides security rules for access control. Which Google Cloud database should they choose?

A.Firestore
B.Cloud Bigtable
C.Cloud Spanner
D.Memorystore for Redis
AnswerA

Firestore is serverless, document-oriented, offers offline persistence, and Security Rules for granular access control.

Why this answer

Firestore is the correct choice: it is serverless, document-based, provides offline sync for mobile apps, and has Security Rules for access control.

37
MCQmedium

You want to migrate an on-premises MySQL database to Cloud SQL with minimal downtime. The source database is 500 GB. Which approach is recommended?

A.Use BigQuery Data Transfer Service to migrate the data
B.Create a Cloud SQL read replica from the on-premises source using Database Migration Service
C.Copy the data files to a Cloud Storage bucket and use the Cloud SQL import
D.Export the database using mysqldump and import to Cloud SQL using gcloud sql import
AnswerB

DMS can perform continuous replication, then promote the replica to primary, minimizing downtime.

Why this answer

Database Migration Service (DMS) is specifically designed for minimal-downtime migrations from on-premises MySQL to Cloud SQL. It uses continuous replication (CDC) to keep the source and target synchronized, allowing a short cutover window after the initial 500 GB data load. This approach avoids the downtime required by export/import or file-copy methods.

Exam trap

Cisco often tests the distinction between offline migration methods (mysqldump, file copy) and online replication-based methods (DMS), expecting candidates to recognize that 'minimal downtime' requires continuous change data capture, not a single bulk transfer.

How to eliminate wrong answers

Option A is wrong because BigQuery Data Transfer Service is for loading data into BigQuery, not for migrating databases to Cloud SQL. Option C is wrong because copying data files to Cloud Storage and importing requires the source database to be stopped or made read-only to ensure consistency, causing significant downtime. Option D is wrong because mysqldump and gcloud sql import are offline methods that require the source database to be unavailable during the entire export and import process, which for 500 GB would result in hours of downtime.

38
MCQeasy

Which Google Cloud database service should be used to implement a low-latency session store for a web application that requires pub/sub capabilities and rate limiting?

A.Firestore
B.Cloud Spanner
C.Memorystore for Memcached
D.Memorystore for Redis
AnswerD

Redis supports session storage, pub/sub messaging, and rate limiting via sorted sets or patterns.

Why this answer

Memorystore for Redis provides low-latency in-memory data storage with support for pub/sub and rate limiting patterns. It is ideal for session stores.

39
Multi-Selecthard

A healthcare company uses Cloud SQL for PostgreSQL to store patient records. They need to implement a disaster recovery plan with cross-region failover capability and minimal data loss. Which TWO steps should they take? (Choose two)

Select 2 answers
A.Migrate to Cloud Spanner for multi-region support
B.Use Cloud SQL HA instance in the primary region
C.Enable cross-region replication using Cloud SQL's built-in feature
D.Enable automated backups and point-in-time recovery
E.Create a cross-region read replica
AnswersD, E

Backups allow recovery to a specific point in time, minimizing data loss after a disaster.

Why this answer

Cross-region read replicas can be promoted in a disaster, but they may have data loss. To minimize loss, use Cloud SQL HA in the primary region plus a cross-region read replica. Automated backups provide point-in-time recovery but not automatic failover.

40
Multi-Selecthard

You are designing a Bigtable data model for an ad-tech platform that tracks user impressions. Which TWO row key design practices should you implement to avoid hotspots and ensure even distribution?

Select 2 answers
A.Use monotonically increasing integers as the row key
B.Use field promotion to place high-cardinality fields first
C.Use a reversed timestamp as the first component
D.Use a hash prefix (salted key) to distribute writes
E.Use a low-cardinality field as the row key prefix
AnswersB, D

Field promotion ensures even distribution by using high-cardinality field as the first part of the row key.

Why this answer

Option B is correct because field promotion places the highest-cardinality field first in the row key, which spreads writes across many tablet servers. In Bigtable, rows are sorted lexicographically by row key, so a high-cardinality prefix ensures that successive writes do not concentrate on a single tablet, avoiding hotspots.

Exam trap

Cisco often tests the misconception that monotonically increasing keys are acceptable for Bigtable, when in fact they cause severe hotspots; candidates must remember that Bigtable's sorted storage requires random or high-cardinality prefixes for even distribution.

41
Multi-Selectmedium

A company is building a real-time leaderboard for an online game using Memorystore for Redis. They need to support millions of concurrent users, update scores frequently, and retrieve top 100 players. Which TWO features should they use? (Choose 2.)

Select 2 answers
A.Pub/sub channels for score updates
B.Keyspace notifications to detect score changes
C.Redis Sentinel for automatic failover
D.Sorted sets with ZADD and ZREVRANGE commands
E.Redis Cluster for sharding across nodes
AnswersD, E

Sorted sets store scores and support range queries for leaderboard.

Why this answer

Sorted sets are ideal for leaderboards. Redis Cluster provides horizontal scaling for high throughput. Pub/sub is for messaging, not leaderboard.

Replication provides HA but not scaling.

42
MCQeasy

A company needs a managed Redis instance for caching and pub/sub messaging in their application. Which Google Cloud service should they use?

A.Firestore
B.Memorystore for Redis
C.Cloud SQL
D.Memorystore for Memcached
AnswerB

Redis supports both caching and pub/sub, and Memorystore provides a managed service.

Why this answer

Memorystore for Redis is a managed Redis service that supports caching and pub/sub. Memorystore for Memcached only supports caching. Cloud SQL and Firestore are not caching services.

43
MCQmedium

A team is designing a Cloud Spanner schema for a global user directory. To avoid write hotspots, which key design strategy should they use?

A.Use a UUID as the primary key
B.Use a timestamp as the primary key
C.Use a monotonically increasing integer as the primary key
D.Use a composite primary key with a user ID and a hash prefix
AnswerD

A hash prefix distributes writes across splits, avoiding hotspots.

Why this answer

Monotonically increasing keys like UUIDs or timestamps cause hotspots. Using a composite key with a hash prefix or swapping columns to distribute writes is recommended.

44
MCQhard

A team is using Cloud Spanner and needs to query a secondary index with a STORING clause. What is the benefit of using STORING?

A.It creates a global index
B.It reduces storage costs
C.It allows the index to be used for ordering
D.It avoids an index join (back to the base table)
AnswerD

STORING stores column values in the index, so the query can be satisfied from the index alone.

Why this answer

STORING allows storing additional columns in the index, enabling index-only scans and avoiding a join back to the base table, improving query performance.

45
MCQeasy

Which Google Cloud database is serverless and automatically scales to zero when not in use, making it cost-effective for variable workloads?

A.Memorystore
B.BigQuery
C.Cloud Spanner
D.Cloud SQL
AnswerB

BigQuery is serverless; you pay only for queries and storage, and it scales automatically.

Why this answer

BigQuery is serverless and scales automatically; it charges per query / storage and can scale to zero (no compute when idle). Firestore is serverless but not exactly 'scales to zero' as it charges for data stored.

46
MCQmedium

An organization wants to cache frequently accessed session data for a web application to reduce database load. They require sub-millisecond latency and support for pub/sub messaging. Which Google Cloud service should they use?

A.Cloud SQL
B.Cloud Bigtable
C.Memorystore for Redis
D.Firestore
AnswerC

Redis provides in-memory caching with sub-millisecond latency and built-in pub/sub messaging.

Why this answer

Memorystore for Redis is the correct choice because it provides an in-memory data store with sub-millisecond latency, ideal for caching frequently accessed session data. It also natively supports pub/sub messaging via Redis's built-in PUBLISH/SUBSCRIBE commands, meeting both requirements precisely.

Exam trap

The trap here is that candidates often confuse Firestore's real-time listeners with pub/sub messaging, overlooking that Firestore lacks the dedicated pub/sub channel model and sub-millisecond cache performance required for session caching.

How to eliminate wrong answers

Option A is wrong because Cloud SQL is a relational database with disk-based storage, incurring higher latency (typically milliseconds) and lacking native pub/sub messaging support. Option B is wrong because Cloud Bigtable is a wide-column NoSQL database optimized for large-scale analytical workloads, not for sub-millisecond caching or pub/sub patterns. Option D is wrong because Firestore is a document-oriented NoSQL database with real-time listeners but does not provide sub-millisecond cache latency and lacks a dedicated pub/sub messaging system like Redis.

47
MCQhard

A team is designing a Firestore database for a global mobile game. They need to support offline play and sync data when the device is online. Which Firestore feature enables offline sync?

A.Security Rules
B.Real-time listeners
C.Datastore mode
D.Offline persistence
AnswerD

Firestore SDKs cache data locally and sync changes when online.

Why this answer

Firestore provides persistent offline data access for mobile/web apps via built-in offline support in the client SDKs, enabling sync when connectivity returns.

48
MCQhard

An engineer is designing a Cloud Spanner schema for a social media application. The Users table and the Posts table have a parent-child relationship. To optimize read performance for fetching all posts of a user, which schema design approach should be used?

A.Denormalize by storing post data as a repeated field in Users table
B.Use a local secondary index on user_id in the Posts table
C.Use interleaved tables with Users as parent and Posts as child
D.Create a global secondary index on user_id in the Posts table
AnswerC

Interleaving stores child rows with the parent row, minimizing cross-split reads and improving performance.

Why this answer

Interleaved tables store child rows (Posts) with their parent row (User) in the same split, enabling locality and faster joins. Global or local indexes are separate structures.

49
Multi-Selectmedium

A company uses Firestore in Native mode for a mobile app. They need to enforce security rules to allow users to read and write only their own data. Which TWO steps are required? (Select TWO.)

Select 2 answers
A.Write a security rule that checks if request.auth.uid == resource.data.user_id
B.Enable Datastore mode instead of Native mode
C.Assign the roles/datastore.user IAM role to each user
D.Ensure the app passes the user's UID in the document's user_id field
E.Create a composite index on user_id and timestamp
AnswersA, D

This rule ensures the authenticated user can only access documents where user_id matches their UID.

Why this answer

Firestore Security Rules use the request.auth object to identify the user. Use resource.data.user_id to match the document's owner field. The rules must check request.auth.uid against the document's field.

Configuring IAM roles at the project level is not granular enough. Enabling Datastore mode changes the API.

50
MCQmedium

A company wants to run HTAP workloads on a PostgreSQL-compatible database with a built-in columnar engine for faster analytics on transactional data. Which Google Cloud database should they choose?

A.Cloud Spanner
B.AlloyDB
C.Cloud SQL for PostgreSQL
D.BigQuery
AnswerB

AlloyDB is PostgreSQL-compatible with a columnar engine, ideal for HTAP workloads.

Why this answer

AlloyDB is a PostgreSQL-compatible database that includes a columnar engine for analytics, providing up to 4x faster OLTP than Cloud SQL PostgreSQL and is designed for hybrid HTAP workloads.

51
MCQhard

You want to configure Cloud SQL for MySQL with high availability (HA). The application requires that failover be automatic and that the failover replica is in a different zone within the same region. Which configuration should you use?

A.Use Cloud SQL with a cross-region replica and configure failover with gcloud
B.Enable the high availability option when creating the Cloud SQL instance
C.Set up a Cloud SQL instance with multiple read replicas and use failover via the Cloud SQL Proxy
D.Create a read replica in a different zone and configure automatic failover using a load balancer
AnswerB

Enabling HA when creating the instance automatically provisions a standby in a different zone and enables automatic failover.

Why this answer

Option B is correct because enabling the high availability (HA) option when creating a Cloud SQL for MySQL instance automatically provisions a standby replica in a different zone within the same region. This configuration provides automatic failover without manual intervention, meeting the requirement for HA with zone-level redundancy.

Exam trap

Cisco often tests the misconception that read replicas or cross-region replicas can be used for automatic failover, but only the dedicated HA option with a synchronous standby replica provides automatic, zone-isolated failover within the same region.

How to eliminate wrong answers

Option A is wrong because cross-region replicas are used for disaster recovery and read scaling, not for automatic failover within the same region; failover with gcloud would require manual steps and does not provide the automatic, zone-isolated HA required. Option C is wrong because multiple read replicas are for read scaling and do not support automatic failover; Cloud SQL Proxy is a connection proxy, not a failover mechanism. Option D is wrong because a read replica in a different zone cannot be promoted automatically for failover; Cloud SQL HA uses a synchronous standby replica, not a read replica, and a load balancer does not handle database-level failover.

52
MCQmedium

You manage a global ecommerce platform using Cloud Spanner. You need to support a query that joins two tables on a foreign key relationship. The tables are parent and child in an interleaved table hierarchy. Which statement about performance is TRUE?

A.Interleaved tables cannot be joined
B.The join will be fast because interleaving stores child rows with the parent row in the same split
C.The join will be slow because interleaving increases split overhead
D.The join is only fast if you use a global secondary index
AnswerB

Interleaving ensures co-location, making joins on the parent key efficient.

Why this answer

Option B is correct because Cloud Spanner interleaved tables physically co-locate child rows with their parent row within the same split (and often the same tablet). This means a join on the interleaved foreign key can be executed with minimal cross-node communication, as the data needed for the join is stored together, resulting in very fast query performance.

Exam trap

The trap here is that candidates may think interleaving is only for hierarchical data storage and not for query performance, or they may confuse interleaving with traditional foreign key relationships that require distributed joins.

How to eliminate wrong answers

Option A is wrong because interleaved tables can absolutely be joined; in fact, they are designed to optimize joins on the interleaved key. Option C is wrong because interleaving reduces split overhead by storing related rows together, not increasing it; splits are based on the parent key, and child rows are stored contiguously within the same split. Option D is wrong because the join is fast due to physical co-location, not because of a global secondary index; in fact, using a global secondary index could introduce additional latency if it requires cross-split lookups.

53
MCQmedium

A company is using Cloud Spanner for a global user database. They need to read recent orders for a user with strong consistency. The application currently uses stale reads with a max staleness of 10 seconds. Some users see inconsistent data. What is the BEST approach to guarantee strong consistency without significantly impacting latency?

A.Use global secondary indexes with STORING clause
B.Use strong reads with a read timestamp
C.Use mutations API instead of DML
D.Reduce max staleness to 1 second
AnswerB

Strong reads with a read timestamp provide consistent data at a point in time, guaranteeing strong consistency.

Why this answer

Strong reads with a read timestamp ensure the most recent data. Bounded staleness is a weaker consistency model. Using DML or mutations does not affect read consistency.

54
MCQeasy

A mobile application developer needs a serverless NoSQL database that supports offline data synchronization across devices and real-time updates. Which Google Cloud database service should they use?

A.Cloud Bigtable
B.Firestore
C.Cloud SQL
D.Cloud Spanner
AnswerB

Firestore is a serverless NoSQL document database with offline support, real-time listeners, and security rules, ideal for mobile apps.

Why this answer

Firestore is a serverless, NoSQL document database that provides built-in offline data synchronization across devices and real-time updates via snapshot listeners. It automatically handles conflict resolution and data replication, making it ideal for mobile applications that need to work offline and sync when connectivity is restored.

Exam trap

Cisco often tests the distinction between NoSQL databases optimized for real-time mobile sync (Firestore) versus those designed for high-throughput analytics (Bigtable) or global relational consistency (Spanner), leading candidates to choose a scalable but inappropriate service.

How to eliminate wrong answers

Option A is wrong because Cloud Bigtable is a wide-column NoSQL database designed for high-throughput analytical workloads, not for mobile apps requiring offline sync and real-time updates. Option C is wrong because Cloud SQL is a relational database service that does not support offline data synchronization or real-time updates natively. Option D is wrong because Cloud Spanner is a globally distributed relational database that provides strong consistency and horizontal scaling, but it does not offer built-in offline sync or real-time change listeners for mobile clients.

55
MCQhard

You are designing a Bigtable row key for an IoT telemetry application that writes one row per device per minute. Devices are identified by a 12-character device ID. To avoid write hotspots, which row key design is most appropriate?

A.Row key: timestamp + deviceID (e.g., '2024-03-15T10:30:00#abc123')
B.Row key: deviceID + timestamp (e.g., 'abc123#2024-03-15T10:30:00')
C.Row key: hash(deviceID) + deviceID + timestamp
D.Row key: reversed deviceID + timestamp (e.g., '321cba#2024-03-15T10:30:00')
AnswerD

Reversing the device ID randomizes the prefix, distributing writes across tablets. Timestamp suffix still allows range scans.

Why this answer

To distribute writes evenly across Bigtable tablets, the row key should have a non-monotonic prefix. Reversing the device ID (or salting) helps. Field promotion is not needed here.

56
Multi-Selecthard

A financial services company is migrating a globally distributed trading application to Cloud Spanner. They need strong consistency and low-latency reads across regions. Which THREE configurations should they choose? (Select THREE.)

Select 3 answers
A.Use stale reads with bounded staleness
B.Use interleaved tables for related data
C.Multi-region instance configuration
D.Use strong reads (read timestamp set to now)
E.Regional instance configuration to reduce latency
AnswersB, C, D

Interleaving reduces round-trips for parent-child queries, improving latency.

Why this answer

Interleaved tables physically co-locate parent and child rows in Cloud Spanner, enabling efficient joins and low-latency reads for related data. This is critical for a globally distributed trading application that requires strong consistency and fast access to hierarchical data, such as orders and their line items, without cross-node coordination.

Exam trap

Cisco often tests the misconception that stale reads can provide both strong consistency and low latency, but in Cloud Spanner, only strong reads (with timestamp set to now) guarantee strong consistency, while stale reads are designed for eventual consistency use cases.

57
MCQhard

You are designing a Cloud Spanner schema for a global user profile table. User IDs are integers from a sequence. You need to avoid hot spots during writes. Which primary key design is best?

A.Use a composite primary key: (HashPrefix(UserId), UserId) where HashPrefix is from a small set
B.Use a UUID as the primary key
C.Use the sequential integer user ID alone as the primary key
D.Use a timestamp as the primary key
AnswerA

Adding a hash prefix distributes writes across splits, reducing hot spots. This is a recommended pattern.

Why this answer

Using a composite key with a hash prefix spreads writes across splits evenly. Sequential integer keys cause hot spots on the last split.

58
MCQmedium

A company is using Cloud Bigtable for ad tech data. They have a single table with a column family containing frequently accessed columns and another with rarely accessed columns. To optimize performance, what column family design change should they implement?

A.Move rarely accessed columns to a different table
B.Combine all columns into one column family
C.Use a single column family and set garbage collection to delete rarely accessed columns
D.Move frequently accessed columns to a separate column family
AnswerD

This allows reading only the hot column family, reducing I/O and improving latency.

Why this answer

Separating frequently accessed columns into their own column family reduces the amount of data read per request, improving performance.

59
MCQmedium

A startup is building a social media application with a global user base. They need a database that can handle millions of concurrent users, provide strong consistency, and scale horizontally. They expect high write throughput and need to run complex SQL queries. Which database is most suitable?

A.Cloud Spanner
B.Cloud Bigtable
C.Firestore
D.AlloyDB
AnswerA

Spanner offers horizontal scaling, strong consistency, and full SQL support, suitable for global high-write applications.

Why this answer

Cloud Spanner is the only GCP database that provides horizontal scaling, strong consistency, and SQL capabilities for high write throughput globally.

60
MCQmedium

A company is using Cloud Bigtable for an ad-tech application with billions of ad impressions per day. They need to perform point reads on individual rows as well as scans over time ranges. Which column family design is recommended?

A.Separate frequently accessed columns into one column family and infrequently accessed into another
B.Use multiple tables for different access patterns
C.Store each column as a separate column family
D.Store all columns in a single column family for simplicity
AnswerA

This design optimizes scans and cache usage by reducing I/O.

Why this answer

To optimize performance, frequently accessed columns (e.g., for point reads) should be in a separate column family from infrequently accessed columns (e.g., audit data). This reduces the amount of data scanned during scans and improves cache efficiency.

61
Multi-Selectmedium

A financial services company uses BigQuery for analytics but needs to store transactional data with strong consistency and sub-millisecond latency. They are considering Cloud SQL, Cloud Spanner, and Firestore. Which two services meet all requirements? (Choose two.)

Select 1 answer
A.Cloud Spanner
B.Cloud SQL
C.Bigtable
D.Memorystore
E.Firestore
AnswersA

Cloud Spanner provides strong consistency and sub-millisecond latency for transactional workloads.

Why this answer

Cloud Spanner is correct because it provides strong consistency (external consistency with TrueTime) and sub-millisecond latency for transactional workloads, making it ideal for financial services that require ACID transactions across globally distributed data. It combines the benefits of relational database structure with horizontal scalability, meeting both consistency and latency requirements.

Exam trap

Cisco often tests the misconception that Cloud SQL can meet sub-millisecond latency at scale, but candidates forget that Cloud SQL is limited by single-region deployment and cannot horizontally scale writes, making it unsuitable for high-throughput transactional systems.

62
MCQmedium

You are designing a Bigtable schema for an ad-tech platform that tracks ad impressions. Each impression has a unique ID, timestamp, user ID, and campaign ID. Queries frequently filter by user ID and time range. Which row key design is MOST appropriate to avoid hotspots and support efficient range scans?

A.Use the user ID as the row key
B.Use a composite key: hashed user ID prefix + timestamp
C.Use a composite key: campaign ID + timestamp
D.Use the impression ID as the row key
AnswerB

A hash of user ID as prefix distributes writes; appending timestamp allows efficient time-range scans per user.

Why this answer

Option B is correct because using a hashed user ID prefix distributes writes across Bigtable tablets, preventing hotspots from sequential user IDs, while appending the timestamp enables efficient range scans within a user's data. Bigtable's lexicographic ordering on row keys means that the hashed prefix ensures load balancing, and the timestamp suffix allows scanning a specific time range for a given user without scanning irrelevant rows.

Exam trap

The trap here is that candidates often pick Option A, thinking user ID is a natural key for filtering, but fail to recognize that sequential or high-volume user IDs create hotspots in Bigtable's distributed architecture.

How to eliminate wrong answers

Option A is wrong because using the raw user ID as the row key can cause hotspots if user IDs are sequential or if a single user generates a high volume of impressions, leading to uneven load distribution across tablets. Option C is wrong because using campaign ID + timestamp scatters impressions for the same user across different row keys, making user-based time range scans inefficient and requiring multiple scans or filtering. Option D is wrong because using the impression ID as the row key results in a unique key per impression, which prevents any meaningful range scans by user or time and forces full table scans for common queries.

63
Multi-Selectmedium

You are configuring a Cloud Spanner database for a financial application. You need to ensure that queries on the 'Orders' table by 'customer_id' are efficient without performing a full table scan. You also want to avoid index joins when possible. Which TWO actions should you take?

Select 2 answers
A.Use the STORING clause to include frequently queried columns in the index
B.Create a global secondary index on 'order_id'
C.Partition the table by customer_id
D.Use the INTERLEAVE IN clause to create a local index
E.Create a secondary index on 'customer_id'
AnswersA, E

STORING clause avoids index join by storing additional columns in the index.

Why this answer

Option A is correct because the STORING clause in a Cloud Spanner secondary index allows you to include additional columns (e.g., frequently queried columns) directly in the index entries. This enables index-only scans, avoiding the need for an index join (back join) to fetch data from the base table, thus improving query efficiency. Option E is correct because creating a secondary index on 'customer_id' directly supports efficient point lookups and range scans on that column, preventing full table scans.

Exam trap

Cisco often tests the distinction between local (interleaved) and global secondary indexes, and candidates mistakenly assume that a local index on 'customer_id' (via INTERLEAVE IN) is optimal for single-table queries, but it actually requires the parent table to be the primary key and does not avoid index joins unless STORING is used.

64
Multi-Selectmedium

A gaming company uses Cloud Spanner for their global leaderboard. They want to reduce the number of stale reads and improve read performance while maintaining strong consistency for writes. Which TWO strategies should they implement? (Choose two)

Select 2 answers
A.Use interleaved tables to store child rows with parent rows
B.Increase the number of read replicas in each region
C.Create secondary indexes on frequently queried columns
D.Use strong reads for all queries
E.Use stale reads with a maximum staleness bound
AnswersC, E

Secondary indexes can dramatically improve query performance for non-key columns.

Why this answer

Option C is correct because secondary indexes in Cloud Spanner allow queries to access data directly from the index without scanning the entire base table, significantly improving read performance for frequently queried columns. Option E is correct because stale reads with a maximum staleness bound reduce contention and latency by allowing reads to return data that is slightly behind the current timestamp, which improves read throughput while still maintaining strong consistency for writes.

Exam trap

Cisco often tests the distinction between strong reads and stale reads, and the trap here is that candidates mistakenly think strong reads always improve performance, when in fact stale reads with a bound are the correct choice for reducing latency and stale reads in a globally distributed database like Cloud Spanner.

65
MCQmedium

A company runs an OLTP workload on Cloud SQL for PostgreSQL. They need to run complex analytical queries on the same data without impacting transaction performance. Which service should they add?

A.Set up a Cloud SQL read replica for analytics
B.Migrate to AlloyDB
C.Export data to BigQuery periodically
D.Use Cloud Spanner
AnswerB

Correct: AlloyDB is PostgreSQL-compatible with a columnar engine for HTAP, supporting both OLTP and analytics without performance impact.

Why this answer

AlloyDB is a PostgreSQL-compatible database designed for high-performance transactional and analytical workloads. It separates compute from storage and uses a columnar engine for analytics, allowing complex queries to run without degrading OLTP performance. This makes it the correct choice for running analytical queries on the same data without impacting transaction latency.

Exam trap

The trap here is that candidates often assume a read replica is sufficient for analytics, but Cisco tests the understanding that read replicas still use the same storage engine and can suffer from performance degradation under heavy analytical queries, whereas AlloyDB provides a dedicated analytical engine without data duplication.

How to eliminate wrong answers

Option A is wrong because a Cloud SQL read replica is a synchronous or asynchronous copy of the primary instance that still uses the same row-based storage engine; running complex analytical queries on it can still cause resource contention and degrade performance, as it does not provide a separate analytical processing engine. Option C is wrong because exporting data to BigQuery periodically introduces latency and data staleness, and does not allow real-time analytical queries on the live transactional data without impacting the OLTP workload. Option D is wrong because Cloud Spanner is a globally distributed, strongly consistent relational database service designed for horizontal scalability and high availability, not specifically optimized for complex analytical queries on the same data; it would require additional services like BigQuery for analytics.

66
MCQeasy

A company needs a globally distributed relational database that provides strong ACID transactions across regions and a 99.999% availability SLA. Which Google Cloud database service meets these requirements?

A.Cloud SQL
B.Cloud Bigtable
C.Cloud Spanner
D.AlloyDB
AnswerC

Cloud Spanner is a globally distributed, horizontally scalable relational database with strong consistency and 99.999% availability SLA.

Why this answer

Cloud Spanner is the only Google Cloud database that offers globally distributed ACID transactions and a 99.999% SLA. Cloud SQL and AlloyDB are regional, and Bigtable is not relational.

67
MCQhard

A Cloud SQL for MySQL instance configured with HA is experiencing a failover event. The application team reports that the database became unavailable for about 60 seconds during the failover. They want to minimize future downtime. What should they do?

A.Enable automated backups and point-in-time recovery
B.Increase the instance size to reduce failover time
C.Switch to a cross-region replica
D.Use Cloud SQL Proxy or configure the application to retry with a static IP
AnswerD

Cloud SQL Proxy provides a static IP, eliminating DNS propagation delays during failover.

Why this answer

Cloud SQL HA failover typically takes less than 60 seconds. The downtime could be due to DNS propagation or connection pooling issues. Using a proxy like Cloud SQL Auth proxy or a load balancer with a static IP can reduce failover time by avoiding DNS changes.

68
MCQeasy

You need a database that provides 99.999% availability SLA, global distribution, and supports ACID transactions across regions. Which Google Cloud database meets these requirements?

A.Bigtable
B.Cloud SQL
C.Firestore
D.Cloud Spanner
AnswerD

Spanner meets all requirements: 99.999% SLA, global, ACID.

Why this answer

Cloud Spanner is the only Google Cloud database that provides 99.999% availability SLA, global distribution via automatic synchronous replication across regions, and full ACID transactions across regions using TrueTime and Paxos-based consensus. It combines horizontal scalability with strong consistency, making it ideal for globally distributed applications requiring transactional integrity.

Exam trap

The trap here is that candidates often confuse Firestore's multi-region mode with true global ACID transactions, but Firestore only offers strong consistency within a single region and eventual consistency across regions, while Cloud Spanner is the only service that guarantees ACID across regions with a 99.999% SLA.

How to eliminate wrong answers

Option A is wrong because Bigtable is a NoSQL wide-column database that offers only eventual consistency (not ACID transactions) and does not support SQL queries or multi-region ACID transactions. Option B is wrong because Cloud SQL is a regional relational database with a 99.95% SLA (not 99.999%) and does not support global distribution or cross-region ACID transactions. Option C is wrong because Firestore is a NoSQL document database that provides strong consistency only within a single region (or multi-region with eventual consistency) and does not support ACID transactions across regions.

69
MCQeasy

Which Cloud Spanner configuration provides the highest availability and global read scalability?

A.Regional configuration with 1 read-write and 2 read-only replicas
B.Multi-region configuration
C.Regional configuration with 3 read-write replicas
D.Single-zone configuration
AnswerB

Multi-region provides global distribution, higher availability, and reads from closest replica.

Why this answer

Multi-region configurations replicate data across multiple regions, providing higher availability and global read scalability compared to regional configurations.

70
MCQmedium

A company needs to run a PostgreSQL-compatible database with 4x faster OLTP performance than standard PostgreSQL, and also wants to run analytical queries on the same data without extracting to a separate system. Which Google Cloud database should they choose?

A.Cloud Spanner
B.Cloud SQL for PostgreSQL
C.AlloyDB
D.BigQuery
AnswerC

AlloyDB provides 4x faster OLTP, PostgreSQL compatibility, and in-database analytics.

Why this answer

AlloyDB is a PostgreSQL-compatible database that delivers up to 4x faster OLTP performance than standard PostgreSQL through a combination of a columnar engine, adaptive indexing, and a disaggregated storage architecture. It also supports running analytical queries on the same data without extraction, using its built-in columnar engine for fast analytics on transactional data.

Exam trap

The trap here is that candidates may confuse Cloud SQL for PostgreSQL as the obvious choice for PostgreSQL compatibility, overlooking the specific performance requirement of 4x faster OLTP and the need for built-in analytical capabilities, which only AlloyDB satisfies.

How to eliminate wrong answers

Option A is wrong because Cloud Spanner is a globally distributed, strongly consistent relational database designed for horizontal scaling across regions, but it is not PostgreSQL-compatible and does not offer the specific 4x OLTP performance boost over PostgreSQL. Option B is wrong because Cloud SQL for PostgreSQL is a fully managed PostgreSQL service that provides standard PostgreSQL performance, not the 4x faster OLTP performance required, and it lacks a built-in columnar engine for running analytical queries on the same data without extraction. Option D is wrong because BigQuery is a serverless data warehouse designed for analytical queries, not OLTP workloads, and it is not PostgreSQL-compatible.

71
MCQeasy

You are designing a global e-commerce application with a product catalog that must be strongly consistent across continents and have 99.999% availability. Transactions must span multiple items and maintain ACID guarantees. Which Google Cloud database should you choose?

A.Cloud Spanner
B.Cloud Bigtable
C.Cloud SQL for PostgreSQL
D.Firestore Native mode
AnswerA

Spanner provides global distribution, strong consistency, and 99.999% SLA.

Why this answer

Cloud Spanner is the only Google Cloud database that offers globally distributed ACID transactions, strong consistency across regions, and a 99.999% SLA. Cloud SQL is regional only, Firestore is eventually consistent across regions, and Bigtable is eventually consistent across clusters.

72
MCQeasy

Your mobile app uses Firestore to store user profiles. You need to restrict access so that users can only read/write their own data. Which Firestore feature should you use?

A.Data Bundles
B.Security Rules
C.Composite indexes
D.IAM roles
AnswerB

Correct: Security Rules allow condition-based access at the document level.

Why this answer

Firestore Security Rules are the correct choice because they allow you to define granular access controls based on user identity. By using the `request.auth.uid` variable in your rules, you can restrict read and write operations to documents where the user's UID matches a field in the document (e.g., `resource.data.user_id == request.auth.uid`), ensuring users can only access their own data.

Exam trap

Cisco often tests the distinction between security controls (Security Rules) and performance optimizations (Composite indexes), so the trap here is confusing a feature that speeds up queries with one that enforces access restrictions.

How to eliminate wrong answers

Option A is wrong because Data Bundles are used to package Firestore data for offline or static export, not for access control. Option C is wrong because Composite indexes improve query performance by allowing efficient sorting and filtering on multiple fields, but they do not enforce security or authentication. Option D is wrong because IAM roles manage permissions at the Google Cloud project or resource level (e.g., granting a service account access to Firestore), not for per-user, document-level access control within an app.

73
MCQhard

Your application uses Cloud Spanner with strong reads, but you are experiencing high latency for read requests. You don't need absolute consistency for every read; stale data up to 5 seconds is acceptable. How can you reduce read latency?

A.Use the read timestamp to read the latest data
B.Use bounded staleness reads with a max staleness of 5 seconds
C.Create a global secondary index on frequently read columns
D.Use DML instead of mutations for writes
AnswerB

This allows reads from replicas without waiting for strong consistency, reducing latency.

Why this answer

Using bounded staleness allows reads to be served from replicas that may be slightly stale (up to 5 seconds), reducing latency. Read timestamps and DML are not relevant, and global indexes would not help.

74
MCQeasy

A mobile app needs to store user preferences and allow offline read-write sync when the device reconnects. The data is simple key-value pairs. Which Google Cloud database is MOST suitable?

A.Firestore
B.Memorystore for Redis
C.Cloud Bigtable
D.Cloud SQL
AnswerA

Firestore provides offline persistence and automatic synchronization for mobile apps.

Why this answer

Firestore provides offline persistence and automatic sync, making it ideal for mobile apps. Cloud SQL does not have built-in offline sync. Bigtable is not designed for mobile clients.

Memorystore is a cache, not a persistent database.

75
MCQmedium

A financial services company needs a globally distributed database with strong consistency across continents, 99.999% SLA, and support for ACID transactions. They expect millions of transactions per day. Which Google Cloud database should they use?

A.Cloud SQL
B.Cloud Spanner
C.Bigtable
D.Firestore
AnswerB

Cloud Spanner meets all requirements: global distribution, strong consistency, ACID transactions, and 99.999% SLA.

Why this answer

Cloud Spanner is the only Google Cloud database that offers global distribution with strong consistency, ACID transactions, and 99.999% SLA. It is designed for mission-critical workloads that require horizontal scaling and geo-replication.

Page 1 of 3 · 170 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Pcd Design Scalable questions.

CCNA Pcd Design Scalable Questions — Page 1 of 3 | Courseiva