如何将大量数据从一台服务器发送到另一台服务器?
有两台 LAMP 服务器 A 和 B,位于不同的国家。 每天 A 获得一组更新的数据后,就会在 B 上进行处理。 在他们之间建立沟通的最佳方式是什么?
更新的估计压缩大小为 20Mb。
我想到的选项是:
- curl POST 请求,上传 JSON 压缩数据;
- tmp 表的 SQL 转储,压缩,然后 rsync 到 B.B 监视特定文件夹以进行更新。然后导入表并处理;
- 使用 RabbitMQ 或 Amazon Simple Queue 进行消息队列;
- ..其他选择?
如果您有类似任务的经验,请分享您的想法。
There are two LAMP servers, A and B, in different countries.
Once a day A has an updated set of data, that is to be processed on B.
What would be the best way to set a communication between them?
Estimated size of an update is 20Mb compressed.
Options that comes to my mind are:
- curl POST request, uploading compressed data in JSON;
- SQL dump of a tmp table, compressed, then rsync'ed to B. B watching specific folder for update. Then importing the table and processing;
- Message Queuing with RabbitMQ or Amazon Simple Queue;
- ..other option?
Should you have any experience with a similar tasks, please share your thoughts.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
选项 2,如果它们位于网络上或者甚至使用 ftp,您可以使用 cronjobs 在计划时间(可能在夜间)运行任务。
option 2, either if they are on a network or even using ftp, you can use cronjobs to run tasks at scheduled hours (probably during the night).