ASSOCIATE-CLOUD-ENGINEER · Question #317
You are building a backend service for an ecommerce platform that will persist transaction data from mobile and web clients. After the platform is launched, you expect a large volume of global…
The correct answer is A. Create a multi-region Cloud Spanner instance with an optimized schema. For an ecommerce platform with global, high-volume transactions requiring SQL queries, high availability, and scalability, Cloud Spanner is the optimal choice due to its distributed, strongly consistent, and horizontally scalable relational database capabilities.
Question
Options
- ACreate a multi-region Cloud Spanner instance with an optimized schema.
- BCreate a multi-region Firestore database with aggregation query enabled.
- CCreate a multi-region Cloud SQL for PostgreSQL database with optimized indexes.
- DCreate a multi-region BigQuery dataset with optimized tables.
How the community answered
(16 responses)- A69% (11)
- B6% (1)
- C6% (1)
- D19% (3)
Why each option
For an ecommerce platform with global, high-volume transactions requiring SQL queries, high availability, and scalability, Cloud Spanner is the optimal choice due to its distributed, strongly consistent, and horizontally scalable relational database capabilities.
Cloud Spanner is a globally distributed, strongly consistent, and horizontally scalable relational database service that supports SQL queries. Its multi-region configuration ensures high availability and resilience, making it ideal for high-volume, global transaction data like those in an e-commerce platform that requires strong consistency and SQL analytical capabilities.
Firestore is a NoSQL document database, not a relational database, and while it offers scalability and global presence, its primary querying mechanism is not SQL, and aggregation queries have limitations compared to a full SQL engine, making it less suitable for complex SQL analytics.
Cloud SQL for PostgreSQL, while a relational database supporting SQL, is typically scaled vertically or with read replicas for reads, but writes are limited by a single primary instance, making it less suitable for extreme global write scalability compared to Cloud Spanner. Multi-region support in Cloud SQL refers to disaster recovery, not active-active multi-region writes.
BigQuery is an analytical data warehouse designed for large-scale data analysis and is excellent for SQL queries over massive datasets, but it is not optimized for transactional workloads or storing individual real-time events that require atomic updates, as it is primarily an OLAP rather than an OLTP system.
Concept tested: Choosing a database for global OLTP with SQL
Source: https://cloud.google.com/spanner/docs/overview
Topics
Community Discussion
No community discussion yet for this question.