Professional Data EngineerDesigning data processing systemsMedium

A data science team is developing a recommendation engine that needs to perform real-time feature lookups for user personalization. The engine requires serving features (e.g., user preferences, interaction history) with single-digit millisecond latency to support live inference. The data volume for these features can grow substantially, and the system needs to be highly available and scalable. Which Google Cloud database is the most suitable for this real-time feature serving requirement?

  1. AFirestore
  2. BCloud SQL
  3. CBigQuery
  4. DCloud Storage
Show answer & explanation

Correct answer: A. Firestore

Firestore is a NoSQL document database designed for high-performance, low-latency data access, making it ideal for real-time feature serving in machine learning applications. It offers strong consistency, automatic scaling, and real-time synchronization, which are crucial for dynamic personalization.

Why the other options are wrong

  • B. Cloud SQL is a relational database with higher latency than NoSQL options for this specific use case and might not scale as efficiently for high-volume, low-latency lookups.
  • C. BigQuery is optimized for analytical queries on large datasets, not for low-latency, single-row lookups required for real-time feature serving.
  • D. Cloud Storage is an object storage service, not a database, and cannot provide the low-latency query capabilities needed for real-time feature serving.

Firestore for Real-time Feature Serving

A flexible, scalable NoSQL document database used to store and serve features for machine learning models with low-latency access for real-time inference.

  • Low-latency reads/writes.
  • Automatic scaling.
  • Strong consistency.
  • Ideal for user profiles, preferences, and interaction history.

Memory trick: Firestore: Features served fast, making your ML model last!

More Designing data processing systems questions