An architecture team is evaluating Google Cloud serverless compute options for a real-time notification dashboard. The workload requires handling persistent WebSocket connections from web clients and deploying a specialized custom runtime binary that listens on an assigned container port without adapting the code to a cloud function signature.
Which TWO features or constraints mandate choosing Cloud Run instead of Cloud Functions for this service? (Select TWO.)
- Native support for persistent WebSocket connections and bidirectional streamingCevap
- Ability to package and deploy any custom container image listening on an environment-defined port without framework wrappingCevap
- CAutomatic scale-to-zero capability during periods of inactivity
- DDirect native event triggering from Cloud Storage object creation without external event routing infrastructure
Cevap
The two correct choices are native support for persistent WebSocket connections and bidirectional streaming, and the ability to package and deploy any custom container image listening on an environment-defined port without framework wrapping.
Cloud Run accepts arbitrary OCI container images listening on the PORT environment variable, supporting full HTTP/2, WebSockets, and custom runtimes. Cloud Functions is constrained to supported function runtimes and request-response HTTP or event invocation patterns.
Adım Adım Çözüm
Anahtar Kavram
Selecting Cloud Run versus Cloud Functions based on container runtime freedom, WebSockets support, and event integration patterns.