Bird
Raised Fist0
GCPcloud~20 mins

Cloud SQL pricing in GCP - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Cloud SQL Pricing Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Cloud SQL Instance Pricing Components

Which of the following components directly affect the cost of a Cloud SQL instance in Google Cloud?

ANumber of tables, number of indexes, and database engine type
BCPU count, memory size, storage capacity, and network egress
CNumber of users connected, database schema size, and query complexity
DOperating system version, database engine version, and backup frequency
Attempts:
2 left
💡 Hint

Think about what resources you pay for when running a virtual machine and storage in the cloud.

❓ service_behavior
intermediate
2:00remaining
Effect of Storage Type on Cloud SQL Pricing

You choose between SSD and HDD storage for your Cloud SQL instance. How does this choice affect your monthly bill?

ASSD storage costs more per GB than HDD storage, increasing your monthly bill
BHDD storage costs more per GB than SSD storage, increasing your monthly bill
CBoth SSD and HDD storage cost the same per GB, so no price difference
DStorage type does not affect pricing; only storage size matters
Attempts:
2 left
💡 Hint

Think about performance differences and typical cloud storage pricing.

❓ Architecture
advanced
2:00remaining
Cost Impact of High Availability Configuration in Cloud SQL

You enable High Availability (HA) for your Cloud SQL instance. What is the expected effect on your monthly cost?

AMonthly cost increases by 10% due to backup overhead
BMonthly cost decreases due to optimized resource usage
CMonthly cost stays the same because HA is free
DMonthly cost roughly doubles because a standby instance runs in another zone
Attempts:
2 left
💡 Hint

Consider what happens behind the scenes when HA is enabled.

❓ security
advanced
2:00remaining
Cost Considerations for Automated Backups in Cloud SQL

How do automated backups affect your Cloud SQL monthly bill?

ABackups reduce your monthly bill by compressing data
BBackups are included free with the instance storage
CBackup storage beyond the instance's allocated storage is billed separately
DBackup costs are fixed and do not depend on backup size
Attempts:
2 left
💡 Hint

Think about where backups are stored and how storage is billed.

✅ Best Practice
expert
2:00remaining
Optimizing Cloud SQL Costs for Variable Workloads

You have a Cloud SQL instance with variable workload peaks during the day and low usage at night. Which approach best optimizes cost without losing availability?

AUse Cloud SQL instance resizing to scale CPU and memory up during peaks and down at night
BKeep a large instance running 24/7 to handle peak loads without changes
CDelete the instance at night and recreate it in the morning
DUse only HDD storage to reduce costs regardless of workload
Attempts:
2 left
💡 Hint

Think about how to match resource allocation to demand dynamically.

Practice

(1/5)
1. Which factor does NOT directly affect the pricing of a Cloud SQL instance?
easy
A. The amount of network egress traffic
B. The amount of storage used
C. The size of the instance (CPU and RAM)
D. The number of users accessing the database

Solution

  1. Step 1: Identify pricing factors for Cloud SQL

    Cloud SQL pricing depends on instance size, storage, backups, and network usage.
  2. Step 2: Analyze the impact of users

    The number of users does not directly affect pricing; costs are based on resources used, not user count.
  3. Final Answer:

    The number of users accessing the database -> Option D
  4. Quick Check:

    Users do not affect pricing directly [OK]
Hint: Focus on resource usage, not user count, for pricing [OK]
Common Mistakes:
  • Thinking more users always increase cost directly
  • Confusing network traffic with user count
  • Ignoring storage and instance size impact
2. Which of the following is the correct way to describe Cloud SQL pricing components?
easy
A. Pricing depends only on the number of database queries.
B. Pricing is fixed monthly regardless of usage.
C. Pricing is based on instance size, storage, backups, and network usage.
D. Pricing is based solely on the number of database users.

Solution

  1. Step 1: Recall Cloud SQL pricing components

    Cloud SQL pricing includes instance size, storage, backups, and network usage.
  2. Step 2: Compare options to pricing facts

    Only Pricing is based on instance size, storage, backups, and network usage. correctly lists the main pricing factors; others are incorrect or incomplete.
  3. Final Answer:

    Pricing is based on instance size, storage, backups, and network usage. -> Option C
  4. Quick Check:

    Pricing components = instance size, storage, backups, network [OK]
Hint: Remember pricing depends on resources, not fixed or query count [OK]
Common Mistakes:
  • Assuming pricing is fixed monthly
  • Confusing query count with pricing
  • Ignoring backups and network costs
3. A Cloud SQL instance uses 4 vCPUs and 15 GB RAM, with 100 GB storage and 10 GB network egress. Which cost factor will likely be the highest contributor to the monthly bill?
medium
A. Instance size (CPU and RAM)
B. Storage
C. Network egress
D. Backups

Solution

  1. Step 1: Analyze resource usage

    Instance size with 4 vCPUs and 15 GB RAM is a significant resource, usually costing more than storage or network for moderate usage.
  2. Step 2: Compare other factors

    Storage of 100 GB and network egress of 10 GB are moderate; backups cost depends on backup size but usually less than instance size.
  3. Final Answer:

    Instance size (CPU and RAM) -> Option A
  4. Quick Check:

    Instance size usually costs most [OK]
Hint: Instance size usually dominates cost over storage and network [OK]
Common Mistakes:
  • Overestimating network egress cost
  • Ignoring instance size impact
  • Assuming backups cost more than instance
4. You configured a Cloud SQL instance with 2 vCPUs and 7.5 GB RAM, but your monthly bill is unexpectedly high. Which of the following could be a likely cause?
medium
A. You set the instance size to 1 vCPU instead of 2.
B. You enabled automated backups with large backup storage.
C. You reduced network egress to zero.
D. You deleted all storage volumes.

Solution

  1. Step 1: Identify possible cost causes

    Automated backups can increase storage costs significantly if backup size is large.
  2. Step 2: Evaluate other options

    Setting instance size smaller reduces cost, reducing network egress lowers cost, deleting storage is not possible without data loss and would not increase cost.
  3. Final Answer:

    You enabled automated backups with large backup storage. -> Option B
  4. Quick Check:

    Backups can increase cost unexpectedly [OK]
Hint: Check backup storage size if bill is high unexpectedly [OK]
Common Mistakes:
  • Assuming smaller instance size increases cost
  • Ignoring backup storage impact
  • Thinking deleting storage increases cost
5. You want to minimize your Cloud SQL monthly cost while maintaining performance. Which combination of actions is best?
hard
A. Choose an appropriate instance size, use balanced storage type, and schedule backups during off-peak hours.
B. Choose a larger instance size, use HDD storage, and disable backups.
C. Choose the smallest instance size, disable backups, and ignore network usage.
D. Choose a smaller instance size, use SSD storage, and enable automated backups.

Solution

  1. Step 1: Balance instance size and storage

    Choosing an appropriate instance size and balanced storage optimizes cost and performance.
  2. Step 2: Manage backups smartly

    Scheduling backups during off-peak hours reduces performance impact and controls costs without disabling backups.
  3. Final Answer:

    Choose an appropriate instance size, use balanced storage type, and schedule backups during off-peak hours. -> Option A
  4. Quick Check:

    Balance resources and backup timing for cost and performance [OK]
Hint: Balance size, storage, and backup timing for best cost [OK]
Common Mistakes:
  • Choosing smallest instance ignoring performance
  • Disabling backups risking data loss
  • Ignoring storage type impact
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard