如何将大量数据从一台服务器发送到另一台服务器?

发布于 2025-01-07 18:33:22 字数 336 浏览 2 评论 0原文

有两台 LAMP 服务器 A 和 B,位于不同的国家。 每天 A 获得一组更新的数据后,就会在 B 上进行处理。 在他们之间建立沟通的最佳方式是什么?

更新的估计压缩大小为 20Mb。

我想到的选项是:

  1. curl POST 请求,上传 JSON 压缩数据;
  2. tmp 表的 SQL 转储,压缩,然后 rsync 到 B.B 监视特定文件夹以进行更新。然后导入表并处理;
  3. 使用 RabbitMQ 或 Amazon Simple Queue 进行消息队列;
  4. ..其他选择?

如果您有类似任务的经验,请分享您的想法。

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:

  1. curl POST request, uploading compressed data in JSON;
  2. SQL dump of a tmp table, compressed, then rsync'ed to B. B watching specific folder for update. Then importing the table and processing;
  3. Message Queuing with RabbitMQ or Amazon Simple Queue;
  4. ..other option?

Should you have any experience with a similar tasks, please share your thoughts.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

疯了 2025-01-14 18:33:22

选项 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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文