Google Cloud Digital Leader — Question 38
You are a program manager for a team of developers who are building an event-driven application to allow users to follow one another's activities in the app. Each time a user adds himself as a follower of another user, a write occurs in the real-time database.
The developers will develop a lightweight piece of code that can respond to database writes and generate a notification to let the appropriate users know that they have gained new followers. The code should integrate with other cloud services such as Pub/Sub, Firebase, and Cloud APIs to streamline the orchestration process. The application requires a platform that automatically manages underlying infrastructure and scales to zero when there is no activity.
Which primary compute resource should your developers select, given these requirements?
Answer options
- A. Google Kubernetes Engine
- B. Cloud Functions
- C. App Engine flexible environment
- D. Compute Engine
Correct answer: B
Explanation
The correct answer is B, Cloud Functions, because it is designed for event-driven applications and automatically handles scaling based on demand. Other options like Google Kubernetes Engine and Compute Engine require more management and are not as suitable for applications that need to scale to zero during inactivity.