2

I have an Active-Passive multi region architecture on AWS. We have cross-region replication for our RDS and DynamoDB; however, I'm not sure what to do with our messages in SQS when we failover. Based on the documentation there isn't a built-in feature for cross region replication.

Based on my research, the 2 solutions are;

  1. Use fan-out with SNS so messages will be sent to both regions.
  2. Have the secondary region applications get its messages from the primary region SQS queues.

The fan out pattern will not work for us because we need to come up with a way to determine if the message has already been processed by the primary region. We only have one active region at a time.

I was hoping for a more elegant solution than having the secondary region applications accessing the primary region messages. It's more expensive and introduce a little more complexity.

Is there a better way to accomplish having the secondary region continue to process messages where the primary region left off?

Jimmy Vo
  • 124
  • 2
  • 11
  • 2
    Does this answer your question? [How to setup AWS SNS and SQS for high availability?](https://stackoverflow.com/questions/39395259/how-to-setup-aws-sns-and-sqs-for-high-availability) – Karl Laurentius Roos Dec 17 '21 at 21:43
  • There is no "out of the box" way to replicate Amazon SQS across regions. You would need a rather complex mechanism to track messages that have been processed -- it would probably be easier to use a different product that provides the features you want, rather than using Amazon SQS in this way. – John Rotenstein Dec 18 '21 at 00:58

0 Answers0