Skip to content

v1.8.0 - Connection Pooling for Upstream TCP/TLS

Choose a tag to compare

@33xception 33xception released this 26 Apr 05:15
· 15 commits to master since this release

🔗 Connection Pooling for Upstream TCP/TLS

TCP and TLS upstream connections are now pooled and reused, eliminating the overhead of a new TCP/TLS handshake for every single query. This significantly improves performance and reduces latency, especially when using DoT or TCP-based upstreams.


✨ Added

  • Connection pooling – new [advanced] configuration options: pool_max_size and pool_idle_timeout. The resolver reuses established connections to the same upstream host/port for TCP and DoT, with automatic idle cleanup. Configured with sensible defaults (max 5 connections, 60‑second idle timeout). Hot‑reloadable via SIGHUP.
  • New tests – 7 tests cover connection pool logic (get/put, max size, closed connections, independent keys) and end‑to‑end TCP pooling with connection reuse. Total test suite: 111 tests.

🛠️ Changed

  • _forward_tcp and _forward_tls now borrow connections from the pool and return them after successful use. Failed connections are discarded.
  • Configuration template updated with the new pooling options.

📦 Upgrading

  • Update: ./installer.sh --update then systemctl restart phantomd
  • Fresh install: ./installer.sh

Full Changelog: v1.7.0...v1.8.0