You are designing an application that will subscribe to and receive messages from a single Pub/Sub topic and insert corresponding rows into a database. Your application runs on Linux and leverages preemptible virtual machines to reduce costs. You need to create a shutdown script that will initiate a graceful shutdown. What should you do?
Suggested Answer: D
Get Premium Professional Cloud Developer Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
9 comments · newest first
IE
Iesha
3 days ago
I’m surprised they didn’t mention using a health check!
MI
Ming
8 days ago
B is unnecessary; users should save work anyway.
ET
Ettie
13 days ago
Wait, can the app really read messages that quickly?
LO
Lonny
18 days ago
I think D is better since it uses Pub/Sub effectively.
EL
Eladia
23 days ago
Option A seems the most efficient for a graceful shutdown.
MA
Marshall
29 days ago
I feel like option B is more about user notifications rather than the application itself, which makes me lean towards D for a cleaner shutdown process.
JU
Jutta
1 month ago
I’m a bit confused about option C. Polling every five minutes seems inefficient, but I can't recall if that's a common pattern.
PH
Phil
1 month ago
I think option D sounds familiar; it might be similar to a practice question we did about notifying services through Pub/Sub.
KR
Kristine
1 month ago
I remember we discussed using inter-process signals for graceful shutdowns in class, but I'm not sure if that's the best approach here.