根据这个流程:Cassandra read_request_timeout_in_ms set up for external(Client) request,我知道在服务器端设置超时不仅仅是足够的,我们也需要在客户端设置。
在客户端和服务器端设置超时有什么区别?
示例:
Setting the request time out in server side in Cassandra (cassandra.yaml)
VS
Setting the request time out in client side in Cassandra driver
已编辑:
driver read timeout: the driver did not receive any response from the current coordinator within SocketOptions.setReadTimeoutMillis. It invokes onRequestError on the retry policy with an OperationTimedOutException to decide what to do.
server read timeout: the driver did receive a response, but that response indicates that the coordinator timed out while waiting for other replicas. It invokes onReadTimeout on the retry policy to decide what to do.
有人可以清楚地解释两者之间的目的和区别。
谢谢,
哈利
答案 0 :(得分:0)
在服务器端(即在cassandra.yaml中)设置超时与使用SocketOptions.setReadTimeoutMillis设置驱动程序(即客户端)超时不同。他们俩都单独工作。一个不会超越另一个。通常,您应该将驱动程序超时设置为略大于服务器端超时。