分布式负载转发

huangapple go评论81阅读模式
英文:

Distributed payload forwarding

问题

我正在尝试设计一个分布式应用程序,将部署在AWS的不同区域。想法是,用户距离部署区域越近,延迟越低。

我的问题是,是否有任何论文、设计模式或算法可以可靠地将从区域A发出的请求转发到区域B,当预期的接收者位于区域B时。也就是说,区域A的用户只会触发请求,但实际的交易将由区域B的用户发送到部署在那里的应用程序。

因此,有效载荷将被路由,其余的处理将在接收者端进行。

希望我表达清楚,但如果有帮助的话,可以考虑一个我心中的例子,即语音录音。与其将流从区域A直接传输到区域B,最好先将其复制到区域B,然后再从那里流向用户。

英文:

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

得分: 1

  1. 如果你打算使用地理DNS(我认为AWS支持),这种情况发生的可能性非常低。

  2. 为什么不直接使用HTTP重定向呢?或者,如果不行的话,可以使用一个简单的HTTP代理。Go的HTTP库可以很容易地实现这一点。

  3. 如果你有能力,我建议在数据区域之间复制数据,使其对称化,这样如果一个数据中心出现故障,你可以通过地理DNS将用户路由到任何其他数据中心,而不会有任何服务中断或数据丢失。

你可以使用Cassandra的多数据中心复制策略,让每个AWS边缘节点上的写操作自动复制到其他节点。这可能会导致它们之间的大量流量,但它会起作用。

英文:
  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.

huangapple
  • 本文由 发表于 2014年4月19日 23:05:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/23171654.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定