原文:http://www.percona.com/blog/2012/01/11/making-the-impossible-3-nodes-intercontinental-replication/

In this post I want to show new possibilities which open with Percona XtraDB Cluster.
We will create 3 nodes Cluster with nodes on different continents (Europe, USA, Japan) and each node will accept write queries.
Well, you theoretically could create 3 node traditional MySQL ring replication, but this is not what you want to use day-to-day.

To show how it works I will use Amazon m1.xlarge instances, by one in Tokyo, Ireland and North California, running RedHat Entreprise 6.2 64bit.

In fact to create instances is most time consuming task. After that using my script you will have cluster running in 5 min or less.

There however some precautions needed if you run Amazon instances.
First, you need to open ports in the firewall. For the communication the nodes need, by default, 4444, 4567, 4568 ports
(see our FAQ why)

Second, please take into account that the communication is done using open channels, and you may want to establish an encrypted connection, using it in real life.

Now, as we have running instances, you can install Cluster packages from RPM repositories.
You can follow steps from documentation.

Or I prepared simple script which does all the work: http://percona.com/downloads/Percona-XtraDB-Cluster/scripts/intercont.tar.gz,
you also can follow steps from the script to adjust it for your environment.

You just need to change nodes host names and your keys in the file: install.nodes.sh

When all nodes start, we have running 3 nodes EU<->USA<->JAPAN, and each node is ready to execute both read and write queries.

Of course you may wonder what is query response time in such environment. We can check it.

Simple table: CREATE TABLE t (ID INT) and simple query: INSERT INTO t VALUES (1)

Response time on single node in EU (no cluster setup): 0.005100 sec
Response time on two-nodes (EU<->JAP) cluster: 0.275642 sec
Response time on three-nodes (EU<->JAP<->USA) cluster: 0.294754 sec

Well, one may argue that 0.27 sec for single query is kind of big, but this is the physic law, you cannot
go faster than speed of light, and the round trip between Europe and Japan takes time (or at least until scientists figure out how to attach transaction to Faster than light neutrino).
Also note, that XtraDB Cluster can apply events in parallel and throughput should be less affected by big distance.

Making the impossible: 3 nodes intercontinental replication--转载的更多相关文章

  1. [zz] pgpool-II load balancing from FAQ

    It seems my pgpool-II does not do load balancing. Why? First of all, pgpool-II' load balancing is &q ...

  2. Redis入门高级部分

    Redis: redis批量删除 redis数据备份和恢复 redis安全 redis性能测试 Redis 客户端连接 redis管道技术 redis分区 java操作redis redis批量删除 ...

  3. action support分析

    Action这一部分主要是数据(索引)的操作和部分集群信息操作. 所有的请求通过client转发到对应的action上然后再由对应的TransportAction来执行相关请求.如果请求能在本机上执行 ...

  4. 转载---SQL Server XML基础学习之<6>--XQuery的 value() 方法、 exist() 方法 和 nodes() 方法

    /*------------------------------------------------------------------------------+ #| = : = : = : = : ...

  5. [转载] cassandra Unable to complete request: one or more nodes were unavailable

    今天碰到的问题跟这个一模一样,特地转过来记录一下 https://support.datastax.com/hc/en-us/articles/204893189-CQL-query-results- ...

  6. 【转载】MySQL Replication 环境安装与配置

    安装[root@msr01 ~]# yum install mysql-serverInstalled:mysql-server.x86_64 0:5.1.73-3.el6_5 Dependency ...

  7. Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position

    在source那边,执行: flush logs;show master status; 记下File, Position. 在target端,执行: CHANGE MASTER TO MASTER_ ...

  8. MySQL crash-safe replication【转载】

    本文来自david大神的博客,innodb技术内幕的作者. http://insidemysql.blog.163.com/blog/static/202834042201385190333/ MyS ...

  9. redis学习六 集群的原理(转载)

    转载自 http://shift-alt-ctrl.iteye.com/blog/2285470 一.Redis Cluster主要特性和设计     集群目标 1)高性能和线性扩展,最大可以支撑到1 ...

随机推荐

  1. 【转】Android.mk文件语法规范(Android.mk File)

    原文网址:http://blog.csdn.net/smfwuxiao/article/details/8530742 1.Android.mk文件概述 Android.mk文件用来告诉NDK编译系统 ...

  2. C# 实例化顺序

    static class Program { static void Main() { BaseB baseb = new BaseB(); baseb.MyFun(); Console.ReadKe ...

  3. Eclipse中出现Select at least one project解决办法

    今天遇到个问这个问题的,顺便帮解决了,是在导入工程的时候出现的,这是因为有同名的工程的,进入windows->show view->project explorer 这里找出来删掉再导入工 ...

  4. 静态Web开发 HTML

    静态Web开发 一章 HTML(Hyper Text Markup Language) 1节html入门 HTML超文本标记语言由浏览器解释执行开发人员编写的超文本文档就是网页 XHTMLHTML升级 ...

  5. dll打包进需要发布的exe z

    http://www.cnblogs.com/Jarvin/p/3721195.html 我们需要发布的exe文件很多时候都可能会依赖于一堆松散的dll,如果想在发布 的时候只提供exe文件,而不想把 ...

  6. Failed to lunch test error when run with Appium (已解决)

    [2015-08-10 15:09:07 - androidtest1] Performing android.test.InstrumentationTestRunner JUnit launch[ ...

  7. 如何获取android app的Activity

    方法一 如有你有待测项目的源码,那么直接查看源码就好.如果没有,那么请联系有源码的同学,这是推荐方法.   方法二 直接把apk后缀改为zip格式,打开压缩包后再打开AndroidManifest.x ...

  8. Javascript时间操作小结

    来源:http://www.ido321.com/847.html 在项目需要一个计时器,效果如下: js代码 1: /*获取当前时间*/ 2: function getCurrentDate() 3 ...

  9. shell管道和重定向

    看了前面一节:linux shell数据重定向(输入重定向与输出重定向)详细分析 估计还有一些朋友是头晕晕的,好复杂的重定向了.这次我们看下管道命令了.shell管道,可以说用法就简单多了. 管道命令 ...

  10. DP——最优三角形剖分

    [动态规划]凸多边形最优三角剖分 枚举三角行,再递归三角形旁边的两个多边形.