SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
shared http client
Chris Lub380b9e5d76c
diff --git a/other/java/client/src/main/java/seaweedfs/client/SeaweedUtil.java b/other/java/client/src/main/java/seaweedfs/client/SeaweedUtil.javaindex e2835b718f..c465d935fc 100644--- a/other/java/client/src/main/java/seaweedfs/client/SeaweedUtil.java+++ b/other/java/client/src/main/java/seaweedfs/client/SeaweedUtil.java@@ -9,19 +9,22 @@ import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;public class SeaweedUtil {static PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager();+ static CloseableHttpClient httpClient;static {// Increase max total connection to 200cm.setMaxTotal(200);// Increase default max connection per route to 20cm.setDefaultMaxPerRoute(20);- }- public static CloseableHttpClient getClosableHttpClient() {- return HttpClientBuilder.create()+ httpClient = HttpClientBuilder.create().setConnectionManager(cm).setConnectionReuseStrategy(DefaultConnectionReuseStrategy.INSTANCE).setKeepAliveStrategy(DefaultConnectionKeepAliveStrategy.INSTANCE).build();}++ public static CloseableHttpClient getClosableHttpClient() {+ return httpClient;+ }}