v0.7.0

Client Connections

Last updated


This page explains how a ToriiDB daemon client pools connections, applies deadlines, and retries dropped connections.

Client Connection Handling


BehaviorValue
Idle poolUp to 8 connections, reused only if idle for less than 5 s
Call deadlinectx deadline, or 10 s when ctx has none; cancelling ctx closes the connection
RetryA reused connection that fails with EOF, EPIPE, or ECONNRESET is discarded. The call then makes up to 3 fresh attempts with 5 ms and 10 ms backoff; an attempt is retried when the dial fails or the fresh connection drops with one of those errors, and the last error is returned
Non-retried errorsRemote error responses and decode failures return immediately
Server deadlines30 s read and 30 s write per frame; an idle connection is closed after 30 s


中文