使用 http 远程处理 C# 时吞吐量较低

发布于 2024-07-10 15:40:36 字数 257 浏览 5 评论 0原文

我在 C# 中使用 http 远程处理在两个应用程序之间进行通信。 早些时候,当我在一台机器/两台机器上运行这两个应用程序时,速度非常慢。 我们有一个代理服务器来连接到互联网。 我们在 IE 中设置“绕过本地地址的代理服务器”,现在当我在一台计算机上运行这两个应用程序时,通信速度非常快。 (几乎是 10 倍)

但是,如果我在不同的计算机上运行每个应用程序,那么它仍然很慢,就像设置“绕过代理服务器...”之前的情况一样,

任何见解都会有所帮助。

I am using http remoting in C# to talk between two applications.
Earlier when I was running both applications on a single machine/two machines, it was very slow.
We have a proxy server to connect to the internet. We set "Bypass proxy server for local addresses" in IE and now when I run both applications on one machine the communication is happening quite fast. (by a factor of 10 nearly)

But if I run each application on a different machine then it is still slow, like it was the case before setting the "Bypass proxy server..."

Any insight will be helpful.

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

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

发布评论

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

评论(2

短叹 2024-07-17 15:40:36

您发送什么类型的数据以及以什么速率发送? 您是否使用了大量对远程 (MarshalByRefObject) 对象的调用?

实际上,通过远程处理很难完全控制数据。 就我个人而言,我会推荐基于消息的东西,例如 WCF。 这使得系统之间的接口更加明确和可预测。

如果代理是一个关键点,您仍然可以通过 proxycfg.exe 绕过远程地址

What sort of data are you sending, and at what rate? And are you using lots of calls to remote (MarshalByRefObject) objects?

In reality, it is hard to fully control the data with remoting. Personally, I would recommend something message-based, for example WCF. This makes the interfaces between systems much more explicit and predictable.

If the proxy is being a pinch-point, you can still bypass this for remote addresses via proxycfg.exe

莳間冲淡了誓言ζ 2024-07-17 15:40:36

正如担心的那样,并没有很多远程调用。
一次远程调用在不同机器上需要 10 秒,而在单台机器上只需 350 毫秒。

当我运行 proxycfg.exe 时,它​​显示“直接访问(无代理服务器)”

There aren't a lot of remote calls, as feared.
A single remote call takes 10 secs on different machines while it takes only 350ms when on a single machine.

when I run proxycfg.exe, it shows "Direct Access (no proxy server)"

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