Gremlin and GCP Pub/Sub

Test how your application handles a Pub/Sub outage. Run Gremlin network experiments and reliability tests to validate publisher and subscriber resilience.

Why Pub/Sub reliability is important

Messaging services are supposed to decouple your services, and Google Cloud Pub/Sub does that well...until delivery stops behaving the way your code assumes.

Pub/Sub guarantees at-least-once delivery, which means duplicate messages are a normal operating condition rather than an exception. Google covers the redelivery semantics in its exactly-once delivery documentation:

"A subscriber that misses its acknowledgment deadline receives the same message again while it is still processing the first copy. If that handler was never made idempotent, one delayed message becomes two charges, two shipments, or two notifications to the same customer."

These failures are silent. Nothing errors, no alarm fires, and the damage surfaces days later during reconciliation. Backlogs behave the same way: a stalled subscriber collects messages faster than it can process them, and the recovery takes far longer than the disruption that caused it.

Gremlin helps you find these problems while the stakes are low. Disrupt the network path between your service and the topic while messages are flowing, and you learn exactly how your publishers and subscribers respond. A blackhole experiment makes the endpoint unreachable, letting you test your retention settings. A latency experiment pushes subscribers past their acknowledgment deadline so you can intentionally test redelivery and ensure your subscribers process their backlogs reliably. Then, automate these experiments as Reliability Tests so every consumer stays scored and validated, even as your system scales.

Keep your event-driven architecture reliable with Gremlin.

Building resilience on Pub/Sub with Gremlin

Pub/Sub is a dependency: a managed service that your service connects to. You can run tests by deploying the Gremlin agent or Failure Flags sidecar to a service that consumes Pub/Sub*. Using the experiments shown to the right, you can prepare your service for Pub/Sub failure modes, including:

  • Network outages making Pub/Sub unavailable
  • Slow performance due to network latency
  • Expiring TLS certificates
You can also run these expert-built workflows designed to replicate real-world failure modes on Pub/Sub:

* Testing a dependency doesn't require installing anything on it. Gremlin runs the experiment from the service that calls it, so compatibility depends on that host rather than on the dependency itself. Check our compatibility documentation for supported operating systems and platforms, or get in touch if you don't see yours.

resources

Learn more about Gremlin and Pub/Sub

All product names, logos, and brands are property of their respective owners. AWS is a trademark of Amazon.com, Inc.; Azure is a trademark of Microsoft Corporation; Google Cloud is a trademark of Google LLC. Use of these names is for identification purposes only and does not imply endorsement or affiliation unless otherwise stated.

Avoid downtime. Use Gremlin to turn failure into resilience.

Gremlin empowers you to proactively root out failure before it causes downtime. See how you can harness chaos to build resilient systems by requesting a demo of Gremlin.

Product Hero ImageShape