Question

Difficulty: Very hardSelecting and Designing Compute and Application Platforms

An enterprise fintech firm is designing a real-time risk assessment engine on Google Cloud. The system comprises two distinct workloads: a stateless HTTP/REST fraud scoring API that experiences unpredictable traffic spikes ranging from 0 to 50,000 requests per second, and a long-running stateful session manager that maintains continuous bidirectional gRPC streams with partner banking gateways. The infrastructure team has strict operational constraints: operational management overhead must be minimized, baseline compute costs for idle periods must be zero where possible for stateless components, and custom TCP/gRPC connection handling must support fine-grained session persistence without managing underlying virtual machine operating systems. Which TWO compute solutions should the Cloud Architect select to satisfy these requirements optimally?

  1. Deploy the stateless fraud scoring API on Cloud Run configured with autoscaling concurrency limits.Answer
  2. B
    Deploy the stateful bidirectional session manager on Cloud Run Jobs configured for continuous background execution.
  3. Deploy the stateful bidirectional session manager on GKE Autopilot using StatefulSets and Session Affinity load balancing.Answer
  4. D
    Provision a custom Compute Engine Managed Instance Group (MIG) for the stateless fraud scoring API to eliminate cold-start latencies.
  5. E
    Deploy the stateless fraud scoring API using Cloud Functions (1st gen) behind an HTTP Load Balancer with CPU-based autoscaling rules.

Answer

The optimal architecture combines Cloud Run for the stateless fraud scoring API and GKE Autopilot with Session Affinity for the stateful continuous session manager.
For the stateless fraud scoring API with unpredictable traffic (0 to 50,000 RPS) and a zero baseline cost target, Cloud Run is the optimal platform because it scales container instances dynamically based on incoming HTTP requests down to zero. For the stateful bidirectional gRPC session manager requiring long-lived continuous connections and minimal OS management overhead, GKE Autopilot provides fully managed Kubernetes infrastructure supporting complex network protocols and session persistence without requiring manual cluster node provisioning.

Step-by-Step Solution

1
Analyze the stateless fraud scoring API requirements.
Identified high concurrency variability (0 to 50,000 RPS), stateless HTTP nature, and requirement for zero-scale baseline cost.
Cloud Run provides serverless container execution that scales to zero when idle and rapidly scales out to handle extreme HTTP request bursts without operational OS overhead.
2
Analyze the stateful bidirectional gRPC session manager requirements.
Identified long-running execution, stateful session maintenance, and custom connection handling needs while minimizing OS management.
GKE Autopilot abstracts node management while supporting full Kubernetes features like StatefulSets, persistent gRPC streams, and advanced load balancing with session affinity.
3
Evaluate and reject misallocated compute platforms.
Compute Engine introduces heavy OS maintenance overhead, Cloud Run Jobs are intended for short-lived batch jobs rather than continuous services, and manual CPU-based autoscaling is inappropriate for serverless functions.
Matching workload statefulness, protocol demands, and scaling behavior to appropriate GCP compute abstractions ensures cost efficiency and operational compliance.

Key Concept

Selecting GCP Compute Platforms based on Workload Statefulness, Scaling Profiles, and Operational Overhead Constraints
Rate this question