On the server side, a leasing mechanism is used. This is described in the section
Connection Leasing in the
Terracotta Server Administration Guide. When the client initially connects, a timed "lease" is granted by the server to that client. The lifetime of this lease is controlled by the
/tc-config/plugins/service/connection-leasing server configuration property. An active client is expected to renew this lease with the server before the lease expires. For TCStore clients, this happens without application involvement. If the lease is successfully renewed, normal operations continue for that client. If the client fails to renew the lease before it expires, the server considers the client dead and closes the sever side of the connection - undelivered responses for that client are discarded and client state is removed from the server. The client will eventually observe that the connection closed.