Event-Driven Application: By Example
A representative example of an event-driven application on Google Cloud Platform.

The example is an application that automates the creation / deletions of A records in a Google Cloud DNS internal Zone based on Google Compute Engine Instance insert, start, stop, and delete events.
The following diagram illustrates the Google Cloud Platform resources used.

Things to observe:
- The Log Router Sink is built using Cloud Audit Logs; these logs help one answer the questions of “who did what, where, and when?” within your Google Cloud resources
- The Pub / Sub Subscription is configured with a 30 second (minimum) backoff duration with 5 delivery attempts; this to ensure the application accounts for the delay between the insert event and the Google Compute Instance being created
- The second Pub / Sub Topic and Subscription is the “dead letter”, i.e., for handling message failures
- The Cloud Run Service runs a Go application configured with container arguments providing the Project ID, Cloud DNS Zone name, and Cloud DNS Zone dns name
Nothing fancy here; that is about it.