简体   繁体   English

中国到AWS多主复制

[英]China to AWS Multi-Master Replication

I am currently supporting a system that sits inside a data center in China, but has terrible performance outside of China due to the firewall. 我目前正在支持一个位于中国数据中心内部的系统,但是由于防火墙的原因,该系统在中国境外的性能非常糟糕。 We are in the process of setting up a data center in AWS, and need to replicate the data. 我们正在AWS中建立数据中心,需要复制数据。 Our application is for travelers, so a user could easily access the system once inside China and once outside China within hours. 我们的应用程序是针对旅行者的,因此用户可以在几个小时内轻松地在中国境内和境外访问该系统。 The requirements: 要求:

  • Near-realtime (but not realtime) data consistency 近实时(而非实时)数据一致性
  • ability to handle partitions, where the network may be down for minutes at a time 处理分区的能力,网络一次可能断开几分钟
  • ability to handle high latency, eg 300-500ms 处理高延迟(例如300-500ms)的能力
  • ability to handle failed requests, where a percentage of requests will hang or be dropped 处理失败请求的能力,其中一定比例的请求将被挂起或丢弃
  • Free or nearly free in cost 免费或几乎免费
  • ability to make relatively flexible queries (eg sorting by different fields, partial keywords search such as the LIKE clause, etc) 能够进行相对灵活的查询(例如,按不同字段排序,部分关键字搜索(例如LIKE子句等))

We are currently on Cassandra, and it will handle everything but the last item on this list. 我们目前在Cassandra上,它将处理除此列表中的最后一项以外的所有内容。 A lot of our data isn't suited to Cassandra's format, but was built this way before we fully understood Cassandra's data model. 我们的许多数据都不适合Cassandra的格式,但是是在我们完全理解Cassandra的数据模型之前以这种方式构建的。 So in order to support the last requirement, we have two ideas: 因此,为了支持最后一个要求,我们有两个想法:

  1. Add MySQL servers at each data center that sync with Cassandra data using some queueing mechanism, and data consumers only do read-only queries to these servers. 在每个数据中心添加使用某种排队机制与Cassandra数据同步的MySQL服务器,数据使用者仅对这些服务器进行只读查询。
  2. Migrate the data to MySQL or PostGres and set up a Multi-Master asynchronous cluster across data centers. 将数据迁移到MySQL或PostGres,并跨数据中心设置多主机异步集群。

I have two questions: 我有两个问题:

  1. For those of you with experience setting up multi master replication across low quality WANs, which of these is the better approach? 对于那些在低质量的WAN上建立多主复制的经验的人中,哪种方法更好? If neither, how did you solve your problem? 如果两者都不是,您如何解决您的问题?
  2. Do MySQL, PostGres, MariaDB, or any other free DBs or 3rd party extensions support this scenario well? MySQL,PostGres,MariaDB或任何其他免费的DB或第三方扩展是否很好地支持这种情况?

我有第三个选择:为DataStax Enterprise及其在Cassandra上的集成Solr搜索付费。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM