nerdexam
Google

PROFESSIONAL-CLOUD-DATABASE-ENGINEER · Question #21

You need to redesign the architecture of an application that currently uses Cloud SQL for PostgreSQL. The users of the application complain about slow query response times. You want to enhance your…

The correct answer is D. Configure Memorystore, and modify your application to offload queries. Sub-millisecond query latency cannot be achieved with disk-based databases like Cloud SQL, even with read replicas, because disk I/O introduces latency beyond the sub-millisecond threshold. Memorystore (Google's managed Redis/Memcached service) stores data entirely in memory…

Ensuring reliability and performance of database solutions

Question

You need to redesign the architecture of an application that currently uses Cloud SQL for PostgreSQL. The users of the application complain about slow query response times. You want to enhance your application architecture to offer sub-millisecond query latency. What should you do?

Options

  • AConfigure Firestore, and modify your application to offload queries.
  • BConfigure Bigtable, and modify your application to offload queries.
  • CConfigure Cloud SQL for PostgreSQL read replicas to offload queries.
  • DConfigure Memorystore, and modify your application to offload queries.

How the community answered

(29 responses)
  • A
    7% (2)
  • B
    7% (2)
  • C
    3% (1)
  • D
    83% (24)

Explanation

Sub-millisecond query latency cannot be achieved with disk-based databases like Cloud SQL, even with read replicas, because disk I/O introduces latency beyond the sub-millisecond threshold. Memorystore (Google's managed Redis/Memcached service) stores data entirely in memory, enabling sub-millisecond read latency. The correct pattern is to modify the application to first check Memorystore for cached query results, falling back to Cloud SQL only on a cache miss. Option A (Firestore) is a document database and does not provide sub-millisecond latency for general queries. Option B (Bigtable) has low latency but is designed for different workloads and won't consistently hit sub-millisecond. Option C (read replicas) still relies on disk-based storage and cannot guarantee sub-millisecond latency.

Topics

#Database Caching#Memorystore#Cloud SQL#Performance Optimization

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DATABASE-ENGINEER Practice