是否可以对两个单独的服务器执行后期操作

发布于 2024-08-23 03:28:46 字数 103 浏览 11 评论 0原文

我正在经营一家网上商店,我正在尝试将“购买”(这是一种形式的“发布”操作)发布到两个单独的服务器(一个本地服务器和一个远程服务器)......我认为这可能是不可能的,但是我正在寻找明确的答案。

I'm running an online shop and I'm trying to have the "purchase" (which is a form "post" action) post to two separate servers (one local and one remote) ... I think this might be impossible but I'm looking for a definitive answer.

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

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

发布评论

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

评论(2

荒人说梦 2024-08-30 03:28:46

您可以将 HTTP POST 定向到“代理”,该代理立即执行您想要的两个单独的帖子(可能看起来有点复杂,让本地服务器在收到本地帖子后执行远程帖子,但它的优点是您不需要不需要触及服务器代码中的一点点——每个服务器都不需要知道其“兄弟”服务器也接收相同的 POST)。 HTTP 始终基于每个事务“一个客户端,一个服务器”,但是像这样的类似代理的实体可以用来放宽这一限制。

You could direct the HTTP POST to a "proxy" which immediately does the two separate posts you want (may seem a bit convoluted, wrt having the local server perform the remote post upon receiving the local post, but it has the advantage that you don't need to touch one bit in the servers' code -- each of them need have no knowledge about its "sibling" server also receiving the same POST). HTTP is always based on "one client, one server" per transaction, but proxy-like entities like this one may be used to relax this restriction.

牵你的手,一向走下去 2024-08-30 03:28:46

假设您正在从浏览器进行发布,并且浏览器可以运行 javascript,那么您肯定可以将相同的表单发布到多个服务器。如果不可能在浏览器上使用 javascript,那么您将无法仅使用浏览器发布到多个服务器。

Assuming you are doing the post from a browser and assuming that the browser can run javascript, then you could definitely post the same form to more than one server. If using javascript on the browser is not a possibility, then you won't be able to post to more than one sever using just the browser.

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