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

转载于:https://www.cnblogs.com/davidwang456/p/4347855.html

Making the impossible: 3 nodes intercontinental replication--转载相关推荐

  1. Introduction to replication 翻译

    翻译自用,还有很多谬误之处,敬请甄别,转载请注明出处 Introduction to replication (replication介绍) Replication is one of the mos ...

  2. action support分析

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

  3. 仲兆鹏 160809329 第5次

    ---恢复内容开始--- 第一题 #include<stdio.h>//输入三个数有小到大排序 int main() {int a;int b;int c;printf("输入三 ...

  4. puppet (三)

    八.Puppet搭建lnmp (有问题) 1.nginx 过程 过程见第四部分 2.mysql过程(在安装的过程中还要注意空间的大小) vim /etc/puppet/modules/mysql/fi ...

  5. HDU 4035 Maze(树形概率DP)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4035 题意:一棵树,从结点1出发,在每个结点 i 都有3种可能:(1)回到结点1 , 概率 Ki:(2 ...

  6. 【枚举】【二分答案】【分块答案】【BFS】【最大流】【Dinic】bzoj1189 [HNOI2007]紧急疏散evacuate...

    [法一]枚举Time(0~N*M): S->'.'(1); 'D'->T(Time); '.'->'D'(dis(用BFS预处理,注意一旦到达'D',BFS就不能继续扩展了,注意di ...

  7. Poj(2488),按照字典序深搜

    题目链接:http://poj.org/problem?id=2488 思路:按照一定的字典序深搜,当时我的想法是把所有的可行的路径都找出来,然后字典序排序. 后来,凡哥说可以在搜索路径的时候就按照字 ...

  8. leetcode 226. Invert Binary Tree

    Invert a binary tree. 4/ \2 7/ \ / \ 1 3 6 9 to 4/ \7 2/ \ / \ 9 6 3 1 解法1: 本质是输的先序遍历 # Definition f ...

  9. 数据仓库项目管理面试题整理(十一)

    数据质量 1.一个数据质量分析师正在试图分析一个数据仓库之中数据的质量状况.这个数据仓库的数据量非常的大,数据质量分析师准备用抽样的方式进行分析.但是他不知道需要抽样多少数据,如何抽样,以及如何向用户 ...

最新文章

  1. delphi 回调函数
  2. 新手学JAVA(六)----处理随机性的数据
  3. 使用 Azure PowerShell 管理 Azure 虚拟网络和 Windows 虚拟机
  4. 怎么将电脑的图片不用打开也能显示出来
  5. C/C++函数的本质以及多线程函数的调用过程
  6. Web前端开发规范之图片命名规范
  7. sa linux,sa | 搜索结果 | Linux运维部落
  8. try……catch的异常捕获机制
  9. Qt文档阅读笔记-QCustom3DLabel使用及Q3DSurface基本信号
  10. 物联网通信-期末复习
  11. 自控力:和压力做朋友(斯坦福大学实用的心理学课程) 读后感
  12. 锂电池充电——充电保护电路
  13. [LeetCode] Largest Perimeter Triangle
  14. PDF加密如何加密?分享两个方法给你
  15. 【MacM1+PyCharm+PyQt5】记录一次Pycharm有Pyqt5环境但无代码提示的解决流程
  16. 【微信小程序】生命周期
  17. C# 关于WinForm界面在触摸屏上显示点触型按钮会引发右键导航栏功能
  18. 类的继承和派生——求圆柱表面积
  19. python外星人入侵游戏图片_[Python]简单的外星人入侵游戏
  20. 操作系统原理模拟实验(基于C/C++模拟处理机调度、存储管理和文件系统)

热门文章

  1. lighttpd+fastcgi 返回500错误码_阿根廷著名电视减肥冠军去世 临终前体重达到500公斤...
  2. centos7已有数据硬盘挂载_CentOS7如何添加硬盘和挂载硬盘
  3. 分析linux系统的运行性能,Linux系统如何分析CPU的性能瓶颈
  4. java list布局_java – 使用2种不同的布局重用Android Listvi...
  5. c++ 命名空间 using namespace std 是什么意思?
  6. jetson nano 摄像头购买
  7. sql 字符串函数(一)
  8. sql数组转换为字符串
  9. python self
  10. js动态载入css文件,原生JS动态加载JS、CSS文件及代码脚本(示例代码)