Load Balancers
Load balancers distribute incoming traffic across multiple instances to improve availability and performance. AceCloud supports Application Load Balancers (ALB) for HTTP/HTTPS traffic and Network Load Balancers (NLB) for TCP/UDP traffic.
Command: ace load-balancer Alias: ace lb
Architecture
A load balancer has three layers:
Load Balancer
└── Listener (protocol + port)
└── Pool (backend group + algorithm)
└── Members (instances)Load Balancer -- the top-level resource with a VIP address on a subnet.
Listener -- accepts traffic on a protocol and port (e.g. HTTP:80).
Pool -- a group of backend instances with a load-balancing algorithm.
Load Balancer Management
Create a Load Balancer
ace lb create --name <name> --subnet <subnet-id> [flags]Flags
--name
Yes
Load balancer name
--subnet
Yes
VIP subnet UUID
--type
No
ALB
Load balancer type: ALB or NLB
--description
No
Description (max 255 characters)
Examples
Create an Application Load Balancer:
Create a Network Load Balancer:
Sample Output
The load balancer starts in PENDING_CREATE status and transitions to ACTIVE once provisioning completes. This typically takes 1--2 minutes.
List Load Balancers
Alias: ace lb ls
Sample Output
Get Load Balancer Details
Sample Output
Update a Load Balancer
Flags
--name
No
New name
--description
No
New description
At least one flag must be specified.
Example
Delete Load Balancers
Alias: ace lb rm
Flags
--cascade
No
false
Delete all child resources (listeners, pools, members)
Without --cascade, the load balancer must have no listeners or pools. Use --cascade to delete everything in one step.
Examples
Listener Management
Listeners define the protocol and port on which the load balancer accepts incoming connections.
Create a Listener
Flags
--name
Yes
Listener name
--lb
Yes
Load balancer UUID
--protocol
No
HTTP
Protocol: HTTP, HTTPS, TCP, UDP, TERMINATED_HTTPS
--port
No
80
Protocol port (1--65535)
Examples
HTTP listener on port 80:
HTTPS listener on port 443:
TCP listener for a database proxy:
Sample Output
List Listeners
Alias: ace lb listener ls
Flags
--lb
No
Filter by load balancer ID
Examples
List all listeners:
List listeners for a specific load balancer:
Sample Output
Get Listener Details
Sample Output
Delete Listeners
Alias: ace lb listener rm
Example
Pool Management
Pools define the group of backend instances and the algorithm used to distribute traffic.
Create a Pool
Flags
--name
Yes
Pool name
--protocol
No
HTTP
Protocol: HTTP, HTTPS, TCP, UDP, PROXY, PROXYV2
--algorithm
No
ROUND_ROBIN
Algorithm: ROUND_ROBIN, LEAST_CONNECTIONS, SOURCE_IP
--listener
No
Listener UUID (provide --listener or --lb)
--lb
No
Load balancer UUID (provide --lb or --listener)
You must specify either --listener or --lb (or both). When attached to a listener, the pool becomes that listener's default pool.
Load-Balancing Algorithms
ROUND_ROBIN
Distributes requests evenly across all members
LEAST_CONNECTIONS
Sends new connections to the member with fewest active connections
SOURCE_IP
Routes requests from the same source IP to the same member
Examples
Create a pool attached to a listener:
Create a pool attached directly to a load balancer:
Sample Output
List Pools
Alias: ace lb pool ls
Sample Output
Get Pool Details
Sample Output
Delete Pools
Alias: ace lb pool rm
Example
End-to-End Example
Set up a complete HTTP load balancer for a web application:
Command Summary
ace lb create
Create a load balancer
ace lb list
List all load balancers
ace lb get <id>
Get load balancer details
ace lb update <id>
Update a load balancer
ace lb delete <id>
Delete load balancer(s)
ace lb listener create
Create a listener
ace lb listener list
List listeners
ace lb listener get <id>
Get listener details
ace lb listener delete <id>
Delete listener(s)
ace lb pool create
Create a pool
ace lb pool list
List pools
ace lb pool get <id>
Get pool details
ace lb pool delete <id>
Delete pool(s)
Last updated
Was this helpful?