Soru

Zorluk: OrtaDeploying and Configuring Managed Database Instances

An enterprise application requires a fully managed relational database that provides strong consistency, horizontal scaling, and multi-region transactional replication across multiple continents. A cloud engineer needs to deploy this database instance named `global-orders-db` with 3 nodes using a multi-region configuration (`nam-eur-asia1`). Which command should the cloud engineer run to provision this database instance?

  1. gcloud spanner instances create global-orders-db --config=nam-eur-asia1 --description="Global Orders Database" --nodes=3Cevap
  2. B
    gcloud sql instances create global-orders-db --database-version=POSTGRES_15 --tier=db-custom-4-16384 --region=us-central1
  3. C
    gcloud bigtable instances create global-orders-db --cluster=orders-c1 --cluster-zone=us-central1-a --display-name="Global Orders"
  4. D
    gcloud spanner instances create global-orders-db --zone=us-central1-a --nodes=3 --description="Global Orders Database"

Cevap

The command 'gcloud spanner instances create global-orders-db --config=nam-eur-asia1 --description="Global Orders Database" --nodes=3' correctly provisions the required multi-region Cloud Spanner instance.
Cloud Spanner is Google Cloud's managed relational database service designed for mission-critical transactional workloads requiring high availability and multi-region, strong consistency. The `gcloud spanner instances create` command uses the `--config` flag to specify regional or multi-region instance configurations (such as `nam-eur-asia1`) and the `--nodes` flag to allocate compute capacity.

Adım Adım Çözüm

1
Identify the database engine requirement based on workload needs.
Cloud Spanner is selected because the workload requires a relational database with global horizontal scalability, strong consistency, and multi-region transactional support.
Neither Cloud SQL nor Cloud Bigtable satisfies the combined requirements of relational SQL query support and multi-region active-active transactional replication.
2
Determine the correct `gcloud` CLI command group and required flags for Cloud Spanner deployment.
Use `gcloud spanner instances create` with `--config` for instance location topology and `--nodes` for compute allocation.
Cloud Spanner topology is specified using predefined instance configurations (e.g., `nam-eur-asia1`) via `--config` rather than single-zone flags like `--zone`.

Anahtar Kavram

Cloud Spanner Instance Deployment and CLI Syntax
Bu soruyu puanla