You are preparing to scale a Vertex AI endpoint that serves a real-time recommendation model. The endpoint currently processes 1,000 requests per second with an average latency of 150 ms, but traffic is expected to spike to 5,000 requests per second during peak shopping hours. Your model uses a single GPU and batch processing is not viable. Which two actions should you take to handle this scale?
- A. Switch to batch prediction mode and queue requests in Pub/Sub to be processed asynchronously
- B. Increase the request timeout threshold to allow more time for processing during peak hours
- C. Deploy multiple replicas across different machine types and configure autoscaling based on CPU and memory utilization✓ Correct
- D. Deploy the model on Cloud Run instead of Vertex AI to automatically scale with containerized workloads
- E. Implement model quantization to reduce model size and increase throughput on the existing hardware
- F. Enable autoscaling on the Vertex AI endpoint and increase the machine type to accommodate more GPU memory✓ Correct
Explanation
The correct answers are enabling autoscaling (0) and deploying multiple replicas with autoscaling (4). These directly address the need to handle a 5x traffic increase for real-time serving. Autoscaling allows the endpoint to dynamically add/remove replicas based on metrics like CPU, GPU utilization, and request queue depth, which is essential for handling traffic spikes. Deploying multiple replicas across different machine types provides redundancy and better resource utilization. (1) is incorrect because Cloud Run is better for request-driven workloads but may not be ideal for sustained GPU-based inference at this scale. (2) Quantization can help with latency but alone won't solve capacity issues. (3) Batch prediction contradicts the real-time requirement. (5) Increasing timeout doesn't address the root capacity problem.