Add internal/httpclient package as a singleton RoundTripper used by all outbound engine requests (search, engines, autocomplete, upstream). Key Transport settings: - MaxIdleConnsPerHost = 20 (up from Go default of 2) - MaxIdleConns = 100 - IdleConnTimeout = 90s - DialContext timeout = 5s Previously, the default transport limited each host to 2 idle connections, forcing a new TCP+TLS handshake on every search for each engine. With 12 engines hitting the same upstream hosts in parallel, connections were constantly recycled. Now warm connections are reused across all goroutines and requests. |
||
|---|---|---|
| .. | ||
| autocomplete | ||
| cache | ||
| config | ||
| contracts | ||
| engines | ||
| httpapi | ||
| httpclient | ||
| middleware | ||
| search | ||
| upstream | ||
| util | ||
| views | ||