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

Behavior Value
Idle pool Up to 8 connections, reused only if idle for less than 5 s
Call deadline ctx deadline, or 10 s when ctx has none; cancelling ctx closes the connection
Retry A reused connection that fails with EOF, EPIPE, or ECONNRESET is discarded and the call is retried on fresh dials: up to 3 attempts with 5 ms and 10 ms backoff
Non-retried errors Remote error responses and decode failures return immediately
Server deadlines 30 s read and 30 s write per frame; an idle connection is closed after 30 s
中文