用 maven 重新编译工程,让后用 rsync 将 jar 同步到线上的服务器是,发现速度异常的快。
做了下列测试:
猜测,rsync 针对 jar 这种压缩文件的传输做了优化,仅仅会同步 jar 包中有更新的文件。
1
oott123 2018-03-30 18:42:35 +08:00 1
是的,rsync 的手册上写道:
rsync is a program that behaves in much the same way that rcp does, but has many more options and uses the rsync remote-update protocol to greatly speed up file transfers when the destination file is being updated. The rsync remote-update protocol allows rsync to transfer just the dif- ferences between two sets of files across the network connection, using an efficient checksum-search algorithm described in the technical report that accompanies this package. 参考: https://rsync.samba.org/tech_report/tech_report.html |
2
oott123 2018-03-30 18:44:22 +08:00 1
事实上,rsync 对任何只变化了一小部分的文件同步都是十分效率的。
|
3
julyclyde 2018-03-30 21:22:23 +08:00
没有说明发送方向,只说“将服务器上 jar 删除”、“将本地 jar 删除”
简直是自言自语 |