Closed admh closed 4 years ago
msg[EOF] 这个看起来是目的端断开连接了,你看看网络状态。可能跟你这个网络状况有关系。 你这个跨的地域比较长了,导致同步的性能比较低,建议把shake放在跟目的端同机房,可以提高一定的性能,
msg[EOF] 这个看起来是目的端断开连接了,你看看网络状态。可能跟你这个网络状况有关系。 你这个跨的地域比较长了,导致同步的性能比较低,建议把shake放在跟目的端同机房,可以提高一定的性能,
这个在源库看来只是用shark从推的方式改成拉的方式,主要还是网络问题是硬伤吧。
我有个补救的想法就是写个脚本去读输出到错误日志中的_id,然后在源库找到记录再upsert目标库去。
你这种跨国的确会有这个问题,一般来说放目的端会好一些,因为写入的性能低于读取,放目的端可以降低写入的开销。 如果你只是用于一次性迁移,那你这个补救方式理论上可以,不过会比较复杂,而且有些key可能_id存在,但是内容不一致。
shake放目的端如果连源库网络不好的情况下会重拉吗?要是放在目的端,shake只能是用阿里云给的mongodb公网地址连接了,深圳直连印度网络还是挺差的,现在用推的方式还能在中间加个代理减少些网络延时。
以前云上也有做全球同步的,是collector和receiver分离的,开源的时候为了易部署性考虑,两个并到一块了。不过目前还是有提供一个receiver,只是实现了对接collector的功能,没有做写入的功能,你可以在这个上面进行开发,不过需要消耗一些人力。
好的。我这边想把shake用打包成docker镜像,我需要注意什么吗?
注意点都在wiki里面了,不过没有单独说明关于docker的,基本是一样的。
环境: mongoshake版本为v2.4.8二进制版,源库为印度区阿里云4.0版本副本集,目标库为深圳ECS自建4.2版本副本集,中间有经过新加坡节点Nginx4层代理提升网络质量。现在看log日志有几条CRIT级别的报错
这条记录在目标库查询status字段是没有更新的,跟源库不一致。
配置文件:
另外,在重放的时候同步挺慢的。刚跑的时候lsn_ckpt.time是 2020-08-04 02:00:00,程序跑了2、3小时lsn_ckpt.time才变成 2020-08-04 04:00:00
log输出