Making the impossible: 3 nodes intercontinental replication--转载
原文: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--转载的更多相关文章
- [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 ...
- Redis入门高级部分
Redis: redis批量删除 redis数据备份和恢复 redis安全 redis性能测试 Redis 客户端连接 redis管道技术 redis分区 java操作redis redis批量删除 ...
- action support分析
Action这一部分主要是数据(索引)的操作和部分集群信息操作. 所有的请求通过client转发到对应的action上然后再由对应的TransportAction来执行相关请求.如果请求能在本机上执行 ...
- 转载---SQL Server XML基础学习之<6>--XQuery的 value() 方法、 exist() 方法 和 nodes() 方法
/*------------------------------------------------------------------------------+ #| = : = : = : = : ...
- [转载] cassandra Unable to complete request: one or more nodes were unavailable
今天碰到的问题跟这个一模一样,特地转过来记录一下 https://support.datastax.com/hc/en-us/articles/204893189-CQL-query-results- ...
- 【转载】MySQL Replication 环境安装与配置
安装[root@msr01 ~]# yum install mysql-serverInstalled:mysql-server.x86_64 0:5.1.73-3.el6_5 Dependency ...
- 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_ ...
- MySQL crash-safe replication【转载】
本文来自david大神的博客,innodb技术内幕的作者. http://insidemysql.blog.163.com/blog/static/202834042201385190333/ MyS ...
- redis学习六 集群的原理(转载)
转载自 http://shift-alt-ctrl.iteye.com/blog/2285470 一.Redis Cluster主要特性和设计 集群目标 1)高性能和线性扩展,最大可以支撑到1 ...
随机推荐
- Linux 下操作gpio(两种方法,驱动和mmap)
目前我所知道的在linux下操作GPIO有两种方法: 1. 编写驱动,这当然要熟悉linux下驱动的编写方法和技巧,在驱动里可以使用ioremap函数获得GPIO物理基地址指针,然后使用这个指针根据 ...
- C# 等待另外一个窗体关闭,再进行主线程的代码
方法1 用Form类或其子类的showDialog方法. 比如你在form1里有一个按扭,然后你在Form1的点击事件里写上显示form2的代码: Form2 frm=new Form2(); frm ...
- 17、手势(Gesture)
课程目标: 学习Android必不可少的手势的功能 了解手势识别原理 , 掌握制作,加载以及识别手势 写出自己的手势Demo 重点难点:手势机制的了解 手势库的制作 考核目标:请说一下手势库的 ...
- tcxtreelist 展示图片 图像
procedure TfrmstPostImageCollate.LoadCollateImage(AOrderID: integer);var mySql: string; node: TcxTre ...
- POJ 1655-Balancing Act(树形dp)
题意: 求n个节点的树中哪个节点删除以后得到的最大连通分量最小. 分析:同上题 #include <map> #include <set> #include <list& ...
- [Irving]SqlServer 标量函数 详解【转】
--创建用户定义函数.这是一个已保存 Transact-SQL 或公共语言运行时 (CLR) 例程,--该例程可返回一个值.用户定义函数不能用于执行修改数据库状态的操作.--与系统函数一样,用户定义函 ...
- highcharts图表的图例legend怎么改变显示位置
一.将图例Legend放于图表右侧1.设置chart的marginRight属性值:chart: { marginRight: 120}2.设置legend图例属性值如下 legend: { alig ...
- leetcode@ [322] Coin Change (Dynamic Programming)
https://leetcode.com/problems/coin-change/ You are given coins of different denominations and a tota ...
- Unity3D实现简单的抽奖程序
下面是具体的代码,注意,我这里用到了NGUI这个插件.大概的原理很简单,就用了2张图片Sprite,同时向下移动,当上面一张图片移动到下面一张图片原来的位置时,就把这2张图片向上移到初始的位置.这时, ...
- Unity3D知识点
世界空间(World):整个虚拟世界的3d空间,在Unity3d中以米作为单位,如长100米宽100米高100米的立体空间. 屏幕空间(Screen):屏幕2d空间,大小就是屏幕的大小,以像素作为单位 ...