Discussion of bug #27673 brought light to an important source of inefficiency in the debuginfod protocol for applications that make repeated queries. The basic problem is that each time we nuke and recreate a curl handle, any cached information such as an active keep-alive http connection, or crypto session keys, are thrown away. Each new connection can take time & CPU, bleeding latency.
If we retain the curl-easy handles across debuginfod-client calls, rather than creating/destroying them during Every Call, then much of that setup work is eliminated, and anti-DoS web firewall concerns also eased. Some estimates here indicate savings of hundreds of milliseconds per call are available, and even more if DoS penalties are applied.
debuginfod would itself be a good client to use this tactic to maintain persistent connections to its federation partners.
Author: Frank Ch. Eigler <email@example.com>
Date: Fri Apr 23 13:04:26 2021 -0400
PR27701: debuginfod client: encourage reused debuginfod_client objects