Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Pub/Sub Disaster Recovery

Hello!

I have a question on how Pub/Sub works in case of disaster recovery.

As a example let say that I have all my services distributed in 2 different regions in US with not cross-region dependency  (us-west1 and us-east1). In both region I'm sending messages to the global PubSub endpoint.

If my primary region is us-west1, that means that all the messages sent to PubSub topic will be stored in the us-west1 region right? If I'm not wrong PubSub by default store messages regionally with zonal replication (not sure if this is a bucket or something like that).

  1. What happens to those messages in case of an outage of the region us-west1 ?
  2. Those message will be lost?
  3. If the region become healthy again, will the messages be sent to the subscribers?

In case of outage us-west1 I'm going to use my secondary region us-east1 sending messages to the same PubSub Topic (Global endpoint)

  1. in this case all the message will be stored in the us-east1 region across al the zones in us-east1 right?

According to this documentation https://cloud.google.com/pubsub/docs/reference/service_apis_overview#service_endpoints If I'm using the global PubSub endpoint in us-west1 and PubSub becomes unavailble in us-west1.

  1. Will my services in us-west1 fail when they try to send the message to the global PubSub endpoint?
  2. Is there an automatic way to make the global endpoint sent messages to us-east1 PubSub region if PubSub becomes unavailable in us-west1 region?

Regards!

2 4 3,022
4 REPLIES 4