PROFESSIONAL-CLOUD-DEVELOPER · Question #384
You are developing a custom job scheduler that must have a persistent cache containing entries of all Compute Engine VMs that are in a running state (not deleted, stopped, or suspended). The job sched
The correct answer is B. Set up a Cloud Asset Inventory real-time feed of insert and delete events with the asset types. The requirement is a real-time, non-stale cache of running Compute Engine VMs. Cloud Asset Inventory real-time feeds push notifications instantly when asset state changes (e.g., a VM starts, stops, or is deleted), making it the best fit for keeping the cache current. Option A and
Question
You are developing a custom job scheduler that must have a persistent cache containing entries of all Compute Engine VMs that are in a running state (not deleted, stopped, or suspended). The job scheduler checks this cache and only sends jobs to the available Compute Engine VMs in the cache. You need to ensure that the available Compute Engine instance cache is not stale. What should you do?
Options
- ASet up an organization-level Cloud Storage log sink with a filter to capture the audit log events for
- BSet up a Cloud Asset Inventory real-time feed of insert and delete events with the asset types
- CSet up an organization-level Pub/Sub log sink with a filter to capture the audit log events for
- DSet up an organization-level BigQuery log sink. Configure the application to query this BigQuery
How the community answered
(49 responses)- A4% (2)
- B71% (35)
- C8% (4)
- D16% (8)
Explanation
The requirement is a real-time, non-stale cache of running Compute Engine VMs. Cloud Asset Inventory real-time feeds push notifications instantly when asset state changes (e.g., a VM starts, stops, or is deleted), making it the best fit for keeping the cache current. Option A and C (log sinks to Cloud Storage or Pub/Sub filtering audit logs) would capture audit log events, but audit log delivery can have latency and requires additional filtering logic to extract VM state changes. Option D (BigQuery log sink) introduces even more latency and requires polling queries, making the cache potentially stale between query intervals. Cloud Asset Inventory feeds are purpose-built for tracking resource state changes in near-real-time, directly addressing the staleness concern.
Topics
Community Discussion
No community discussion yet for this question.