LeetQuiz Logo
Privacy Policy•contact@leetquiz.com
© 2025 LeetQuiz All rights reserved.
Google Professional Cloud Developer

Google Professional Cloud Developer

Get started today

Ultimate access to all questions.


You are developing an application deployed on Cloud Run that utilizes Cloud Functions. With each new feature addition, new Cloud Functions and Cloud Run services are deployed. Environment variables are currently used to track services and enable interservice communication, but maintaining these variables has become cumbersome. How can you implement a scalable dynamic discovery mechanism to address this issue?

Exam-Like



Explanation:

The problem requires dynamic service discovery in a scalable way. Option B (Service Directory) is the correct choice because it provides a managed solution for service registration and discovery. By creating a Service Directory namespace and registering services during deployment, interservice communication can dynamically query the directory at runtime. This eliminates manual ENV variable maintenance.

  • Option A involves querying Cloud Run/Cloud Functions APIs directly, which introduces latency, permission complexities, and lacks scalability.
  • Option C relies on naming conventions, which are fragile and error-prone.
  • Option D proposes Hashicorp Consul on a single VM, which is not scalable (single point of failure) and adds operational overhead. Service Directory (B) is the most scalable, managed, and integrated solution for Google Cloud environments.
Powered ByGPT-5