copycat icon indicating copy to clipboard operation
copycat copied to clipboard

Only submit keep alive requests during periods of inactivity

Open kuujo opened this issue 8 years ago • 0 comments

Currently, clients submit keep alive requests at an interval that is a fixed fraction of the session timeout. This places an unnecessary burden on the cluster, particularly if many clients are connected and frequently submitting commands. Command entries have all the necessary information (namely session ID and timestamp) to double as keep alive entries. Clients should only submit keep alive requests if they haven't submitted a command for some fraction of the session timeout.

Chubby takes an interesting approach to reducing the frequency of keep alive requests. Rather than committing and immediately responding to session keep alives, Chubby waits until near the end of the required interval to respond to the client, and the client immediately sends another keep alive request. So, I suppose these are two different approaches that could be taken.

kuujo avatar Oct 26 '15 07:10 kuujo