Configure Load Balancing
MinIO AIStor’s distributed architecture allows any node to handle any request. While clients can connect directly to individual nodes, a load balancer provides a single endpoint that simplifies client configuration and automatically routes traffic to healthy nodes.
Load balancers also centralize SSL/TLS certificate management and can terminate encryption at the network edge, reducing computational overhead on MinIO AIStor nodes.
Prerequisites
Your load balancer configuration must support these MinIO AIStor requirements:
- Dual-service routing: Configure separate routes for the S3 API (port 9000) and Console UI (port 9001).
- Streaming uploads: Allow unlimited request body size and disable request buffering to support uploading objects of any size.
- Streaming downloads: Disable response buffering to support downloading large objects.
Example configurations
These examples show how to implement the prerequisites for common reverse proxies.
Add these directives to your NGINX server block:
# Allow unlimited upload size
client_max_body_size 0;
# Disable buffering for streaming
proxy_buffering off;
proxy_request_buffering off;For additional NGINX proxy configuration options, see the NGINX Proxy Module Documentation.
Add these settings to your HAProxy configuration:
defaults
# Extended timeouts for large operations
timeout client 300s
timeout server 300sHAProxy does not buffer request bodies by default.
No directive is needed to stream large uploads, matching the NGINX proxy_request_buffering off setting above.
For additional HAProxy configuration options, see the HAProxy Configuration Manual.
Configuration requirements
Configure MinIO AIStor with the appropriate environment variable and DNS settings to ensure proper communication through your load balancer.
Domain-based routing uses separate hostnames for the S3 API and Console UI (recommended for production deployments).
-
Configure your load balancer to route traffic based on hostname:
aistor.example.com→ Backend port 9000console.aistor.example.com→ Backend port 9001
-
Set
MINIO_BROWSER_REDIRECT_URLto your Console UI domain:MINIO_BROWSER_REDIRECT_URL="https://console.aistor.example.com"Add this variable to
/etc/default/miniothen restart the MinIO AIStor service:sudo systemctl restart minio
Path-based routing uses a single hostname with different paths for the S3 API and Console UI.
-
Configure your load balancer to route traffic based on URL path:
/(root path) → Backend port 9000 (S3 API)/console→ Backend port 9001 (Console UI)
-
Set
MINIO_BROWSER_REDIRECT_URLto your Console UI path:MINIO_BROWSER_REDIRECT_URL="https://aistor.example.com/console"Add this variable to
/etc/default/miniothen restart the MinIO AIStor service:sudo systemctl restart minio
For detailed information about the MINIO_BROWSER_REDIRECT_URL environment variable and additional console configuration options, see Console Environment Variables.
Verify your configuration
After configuring your load balancer, verify it works correctly using the load balancer’s client-facing IP or hostname before updating production DNS.
-
Test the health endpoint through your load balancer:
curl https://LOAD_BALANCER_IP_OR_HOSTNAME/minio/health/liveExpected response:
200 OKwith bodyOKReplace
LOAD_BALANCER_IP_OR_HOSTNAMEwith your load balancer’s client-facing IP or hostname.For comprehensive health check documentation, see Health Check Probes.
-
Configure and test the AIStor Client connection using your load balancer’s client-facing IP or hostname:
mc alias set myaistor https://LOAD_BALANCER_IP_OR_HOSTNAME ACCESS_KEY SECRET_KEY mc ping myaistor mc ready myaistorReplace
LOAD_BALANCER_IP_OR_HOSTNAMEwith your load balancer’s client-facing IP or hostname, andACCESS_KEYandSECRET_KEYwith appropriate credentials. -
Verify Console UI access by opening
https://LOAD_BALANCER_IP_OR_HOSTNAMEin your web browser, logging in, and browsing objects.Replace
LOAD_BALANCER_IP_OR_HOSTNAMEwith your load balancer’s client-facing IP or hostname.
Update DNS for production
After successfully verifying your load balancer configuration, update your DNS records to point your production endpoints to the load balancer.
Create DNS A or CNAME records pointing to your load balancer’s client-facing IP or hostname:
aistor.example.com→ Load balancer IP/hostname (S3 API)console.aistor.example.com→ Load balancer IP/hostname (Console UI)
Create a DNS A or CNAME record pointing to your load balancer’s client-facing IP or hostname:
aistor.example.com→ Load balancer IP/hostname
Once DNS propagates, clients can access MinIO AIStor through the configured domain names.