protected HttpClient createHttpClient() {
    HttpClientBuilder clientBuilder = getHttpClientBuilder()
                                        .setDefaultRequestConfig(buildRequestConfig())
                                        .setDefaultSocketConfig(buildSocketConfig());

    clientBuilder.setMaxConnTotal(maxConnections);
    clientBuilder.setMaxConnPerRoute(maxConnections);
    if(! doHandleCompression) {
      clientBuilder.disableContentCompression();
    }

    if (useSystemProperties)
      clientBuilder = clientBuilder.useSystemProperties();
    return buildHttpClient(clientBuilder);
  }
Called from {@link #init(jakarta.servlet.ServletConfig)}.
HttpClient offers many opportunities for customization.
In any case, it should be thread-safe.
src/main/java/org/mitre/dsmiley/httpproxy/ProxyServlet.java