分布式有效载荷转发

I'm trying to design a distributed application that will be deployed on AWS's different regions. The idea is that the closer the user to the deployed region, the lower the latency would be.

My question is that, is there any paper, design patterns or algorithm to reliable forward requests made from a region A to region B when the intended recipient is located in region B. Meaning that the user in region A will just trigger the request but the actual transaction would be from the user in region B to the application deployed there.

So the payload would be routed, and the rest of the processing will happen on the recipient's end.

Hope i'm making sense, but if it helps think an example I have in mind is voice recordings. Instead of directing streaming from region A to B, it'll be copied to region B first then stream from there to user.

  1. If you're going to use geo-dns (I think AWS supports it), the likelihood of this happening is pretty low.

  2. Why not just use http redirection? Or if not, a simple http proxy. Go's http library can do it pretty easily.

  3. If you can afford it, I'd replicate data across data regions to be symmetrical, so that if one data center goes down, you can just route your users via geo-dns to any other, without any service disruption or data loss.

You can use Cassnandra with multiple datacenter replication strategy, and have writes on each AWS edge automatically replicate to the others. It might cause big traffic between them, but it will work.