An enterprise cloud engineering team is designing a serverless architecture on Google Cloud for two distinct microservices:
1. Microservice A: A web backend that requires long-lived WebSocket connections and needs to process multiple concurrent requests on a single instance to optimize cost efficiency.
2. Microservice B: A lightweight, event-driven Node.js service that processes image metadata whenever a new file is created in a Cloud Storage bucket.
Which TWO deployment options should the team choose to meet these requirements with minimal operational overhead?
- Deploy Microservice A to Cloud Run, because Cloud Run supports WebSockets and allows configuring container concurrency to handle multiple requests simultaneously on a single instance.Cevap
- Deploy Microservice B to Cloud Functions (2nd gen), because it seamlessly integrates with Cloud Storage Eventarc triggers to execute lightweight code on object creation.Cevap
- CDeploy Microservice A to Cloud Functions (1st gen), because Cloud Functions is the required GCP serverless runtime for handling persistent WebSocket streams.
- DDeploy Microservice B to an unmanaged Compute Engine VM instance group configured to continuously poll the Cloud Storage bucket for updates.
Cevap
Deploy Microservice A to Cloud Run to support WebSockets and multi-concurrency per instance, and deploy Microservice B to Cloud Functions (2nd gen) to leverage event-driven Cloud Storage triggers.
Cloud Run is designed for stateless container workloads supporting WebSockets and multi-concurrency (handling multiple simultaneous requests per container instance), making it the optimal choice for Microservice A. Cloud Functions (2nd gen) provides native integration with Cloud Storage event triggers via Eventarc for lightweight event processing, making it the ideal choice for Microservice B.
Adım Adım Çözüm
Anahtar Kavram
Selecting Cloud Run vs. Cloud Functions based on container concurrency, WebSocket support, and event triggers.