You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, our application creates a new Minio client (miniogo.Client) for each request. This approach can lead to performance inefficiencies due to the overhead associated with repeatedly initializing new clients, especially under high load.
Proposed Change
Refactor the application to instantiate a single Minio client and reuse it across multiple requests. This change aims to reduce initialization overhead and improve overall performance by leveraging connection pooling and reducing setup times.
Benefits
Reduced Latency: Minimizes the time spent in client setup for each request.
Improved Resource Utilization: Lessens the burden on system resources by reducing the number of client instances.
Enhanced Performance: Potentially increases throughput by reusing existing HTTP connections.
Implementation Outline
Create a MinioService struct that includes a miniogo.Client as a field.
Instantiate MinioService at application startup with a single Minio client.
Refactor existing code to use the Minio client from MinioService instead of creating new instances.
Description
Currently, our application creates a new Minio client (
miniogo.Client
) for each request. This approach can lead to performance inefficiencies due to the overhead associated with repeatedly initializing new clients, especially under high load.Proposed Change
Refactor the application to instantiate a single Minio client and reuse it across multiple requests. This change aims to reduce initialization overhead and improve overall performance by leveraging connection pooling and reducing setup times.
Benefits
Implementation Outline
MinioService
struct that includes aminiogo.Client
as a field.MinioService
at application startup with a single Minio client.MinioService
instead of creating new instances.Code Snippet
The text was updated successfully, but these errors were encountered: