粘滞连接
为有状态服务配置粘滞连接
此文档已经不再维护。您当前查看的是快照版本。如果想要查看最新版本的文档,请参阅最新版本。
粘滞连接用于有状态服务,尽可能让客户端总是向同一提供者发起调用,除非该提供者挂了,再连另一台。
粘滞连接将自动开启延迟连接,以减少长连接数。
<dubbo:reference id="xxxService" interface="com.xxx.XxxService" sticky="true" />
Dubbo 支持方法级别的粘滞连接,如果你想进行更细粒度的控制,还可以这样配置。
<dubbo:reference id="xxxService" interface="com.xxx.XxxService">
<dubbo:method name="sayHello" sticky="true" />
</dubbo:reference>
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
最后修改 July 24, 2022: Add some migration notification for docs (#1284) (edfee01a11)