RPC 调用、按需连接还是持续连接?常见的模式是什么?
我想这个问题有一段时间了,并曾尝试用谷歌搜索但没有得到答案。也许我的关键词不准确。
RPC 库(如 XML-RPC)中的连接是按需连接还是恒定连接?如果它是恒定的,它如何维持大量的连接?例如,如果我有 100,000 个代理需要控制。如果是按需,如何克服频繁通话时建立连接的成本?例如,每秒 1000 次调用。
我最好的猜测是有一个连接池缓存最近的连接并设置超时。但不确定常见的实现是什么。
I was thinking this question for a while, and ever tried to google but no answer got. Maybe my keyword was not accurate.
Is the connection in RPC library like XML-RPC on demand or constant? if it's constant, how it maintains huge numbers of connections? for example, if I have 100,000 agents to control. If it's on demand, how it overcomes the cost of establishing connection in frequent call? for instance, 1000 calls per second.
My best guess is there is a connection pool caching recent connections with a timeout. But not sure what's the common implementation.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最后我研究了Apache XMLRPC库,它基于httpcall,所以它是按需连接
Finally I looked into Apache XMLRPC library, it's based on httpcall, so it's connection on demand