远程数据库延时

25 views
Skip to first unread message

Bin Sun Sunny

unread,
May 19, 2013, 4:41:09 AM5/19/13
to sh...@googlegroups.com
公司需要兼顾欧洲和中国市场, 现在用的是亚马逊AWS.

远程数据库延时很大, 怎么办? 

多数据库同步还是其他方案?

Gene Wu

unread,
May 19, 2013, 8:45:37 AM5/19/13
to sh...@googlegroups.com, sh...@googlegroups.com
难道不是每个dc都有一套完整的系统么?

Sent from mobile

在 May 19, 2013,4:41 PM,Bin Sun Sunny <sunny...@gmail.com> 写道:

公司需要兼顾欧洲和中国市场, 现在用的是亚马逊AWS.

远程数据库延时很大, 怎么办? 

多数据库同步还是其他方案?

--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 shlug+un...@googlegroups.com
要查看更多选项,请访问 https://groups.google.com/groups/opt_out。
 
 

Liang Guo

unread,
May 19, 2013, 8:56:18 AM5/19/13
to sh...@googlegroups.com
如果主要是网络延迟,就找一个所有地方访问都比较快的服务提供商,
如果主要是数据库内部造成的延迟,就需要考虑优化数据库和应用。


On Sunday, May 19, 2013, Bin Sun Sunny wrote:
公司需要兼顾欧洲和中国市场, 现在用的是亚马逊AWS.

远程数据库延时很大, 怎么办? 

多数据库同步还是其他方案?

--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 shlug+un...@googlegroups.com
要查看更多选项,请访问 https://groups.google.com/groups/opt_out。
 
 


--
Liang Guo
http://bluestone.cublog.cn

Bin Sun

unread,
May 19, 2013, 9:46:36 AM5/19/13
to sh...@googlegroups.com
网络延时, 放爱尔兰, 国内慢, 放新加坡, 欧洲卡, 放米国, 两边都受不了 ....


2013/5/19 Liang Guo <bluesto...@gmail.com>
您收到此邮件是因为您订阅了 Google 网上论坛“Shanghai Linux User Group”中的主题。
要退订此主题,请访问 https://groups.google.com/d/topic/shlug/9Cek_iCUlBc/unsubscribe?hl=zh-CN。
要退订此论坛及其所有主题,请发送电子邮件到 shlug+un...@googlegroups.com
要查看更多选项,请访问 https://groups.google.com/groups/opt_out。
 
 



--

Bin Sun
MScEE with emphasis on Telecommunication Systems
Blekinge Institute of Technology


Bin Sun

unread,
May 19, 2013, 9:48:58 AM5/19/13
to sh...@googlegroups.com
你是指每个data-center 都放一个系统, 用数据库同步方案? 亚马逊有没有这种或者其他的解决方案? 目前用的是apache+mysql, 没有用亚马逊的database.



2013/5/19 Gene Wu <gene....@gmail.com>
您收到此邮件是因为您订阅了 Google 网上论坛“Shanghai Linux User Group”中的主题。
要退订此主题,请访问 https://groups.google.com/d/topic/shlug/9Cek_iCUlBc/unsubscribe?hl=zh-CN。
要退订此论坛及其所有主题,请发送电子邮件到 shlug+un...@googlegroups.com
要查看更多选项,请访问 https://groups.google.com/groups/opt_out。
 
 


Robber Phex

unread,
May 19, 2013, 12:10:12 PM5/19/13
to sh...@googlegroups.com
本人愚见:
看下亚马逊有没有这样的服务?如果没有,两个mysql数据同步应该不难吧?
上面是从底层解决问题。
还可以从业务方面考虑,比如预加载数据、缓存数据、分区域存储数据等。

当然,也可以找一个所有地方访问都比较快的服务提供商

2013/5/19 Bin Sun <BinSu...@gmail.com>



--
Regards,
RobberPhex

About me: http://about.me/RobberPhex

Yiling Cao

unread,
May 19, 2013, 10:15:47 PM5/19/13
to sh...@googlegroups.com
用master-master replication 或者看看couchDB本身就支持distributed db之类的。 

我7年前搞过, 不过最好还是 自己把一些表分出来,自己后台同步。 因为db sync 出错时很烦。


2013/5/20 Robber Phex <robbe...@gmail.com>

Wales Wang

unread,
May 19, 2013, 10:58:31 PM5/19/13
to sh...@googlegroups.com, sh...@googlegroups.com
master-master双向复制,不靠谱。尽量不要用。

Wales Wang

Bin Sun Sunny

unread,
May 25, 2013, 5:05:24 AM5/25/13
to sh...@googlegroups.com
亚马逊给的回复是, 因为写请求远少于读, 而且公司数据不多, 可以每天同步一次, 再加上CDN.

ps: 这个thread最后一次更新是19号, 为啥直到今天才在见到 ....

Rise

unread,
May 25, 2013, 12:00:56 PM5/25/13
to sh...@googlegroups.com
之前公司采用的方案是,基于应用层的同步。同步范围仅限于需要同步的表。
位于不同DC的库中的表的主键配置有不相同的前缀,看主键的值就可以知道数据来源,万一遇到问题方便排查。
由于位于不同DC的服务器侧重的业务不同,在甲DC中添加的数据在乙DC中可能只是用来显示,用这套方案还不错。

Sunny

unread,
May 25, 2013, 12:16:39 PM5/25/13
to sh...@googlegroups.com
主键加前缀, 这想法不错, 遇到的问题也相似~
谢了~ +1024



2013/5/25 Rise <rise...@gmail.com>



--

Sunny

机械唯物主义 : linjunhalida

unread,
May 27, 2013, 7:15:11 AM5/27/13
to sh...@googlegroups.com
我觉得考虑换一个地方的机房,放美国离欧洲和中国都远啊。
还有就是用户的数据是否可以切割?如果可以的话,可以拆分成2个数据库分别放。
应用层放多个都可以。

2013/5/19 Bin Sun Sunny <sunny...@gmail.com>:
> 公司需要兼顾欧洲和中国市场, 现在用的是亚马逊AWS.
>
> 远程数据库延时很大, 怎么办?
>
> 多数据库同步还是其他方案?




--
GuruDigger- We help internet products find technical partners who
share the same dream!

- http://gurudigger.com
Reply all
Reply to author
Forward
0 new messages