How to configure ZeroRPC and timeouts

I am trying to do some simple load tests using the ZeroRPC python server and node.js client. I notice that if the request takes more than 10 seconds, I do not return data. I tried to set up no heartbeat in python code:

s = zerorpc.Server(Test(), heartbeat=None)

as well as to configure the node.js client:

new zerorpc.Client({ timeout: 60, heartbeatInterval: 60000 }),

but still see the same behavior.

How can I get queries that take more than 10 seconds to return results?

+4
source share
1 answer

The latest available release of zerorpc-node (0.9.3) uses the HEARBEAT timer timeout.

https://github.com/dotcloud/zerorpc-node/blob/0.9.3/lib/channel.js:

//Heartbeat rate in milliseconds
var HEARTBEAT = 5000;
...
//Resets the heartbeat expiration time
Channel.prototype._resetHeartbeat = function() {
    this._heartbeatExpirationTime = util.curTime() + HEARTBEAT * 2;
};

- listenbeatInterval contructor.

npm install git+https://github.com/dotcloud/zerorpc-node.git

....

0

Source: https://habr.com/ru/post/1537407/


All Articles