Stopping and restarting an L7 load balancer
Stopping a load balancer
The Stop command shuts down an L7 load balancer. Once shut down, the load balancer status changes to STOPPED
. As long as the load balancer is stopped, you are not charged for its use.
You can restart a load balancer at any time to continue using it. All the data and changes you have made are saved.
To stop an L7 load balancer:
-
In the management console
, select the folder where the load balancer was created. -
Select Application Load Balancer.
-
Click
next to the load balancer name and select Stop.To apply this action to multiple load balancers, select the appropriate load balancers in the list, click Stop at the bottom of the screen, and then click Stop in the window that opens.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
Review the description of the CLI load balancer stop command:
yc application-load-balancer load-balancer stop --help
-
Get a list of all load balancers in the default folder:
yc application-load-balancer load-balancer list --format yaml
Result:
- id: ds79cfnvmti3******** name: test-load-balancer folder_id: b1gv87ssvu49******** status: ACTIVE network_id: enp45glgitd6******** listeners: - name: test-listener endpoints: - addresses: - external_ipv4_address: address: 51.250.35.12 ports: - "80" http: handler: http_router_id: ds7bharmjfs3******** allocation_policy: locations: - zone_id: ru-central1-a subnet_id: e9bn57jvjnbu******** log_group_id: ckgph76s449v******** created_at: "2022-02-11T09:00:31.911019416Z" - id: ds7o71924t0h******** name: balancer2 folder_id: b1gv87ssvu49******** status: ACTIVE network_id: enp45glgitd******** allocation_policy: locations: - zone_id: ru-central1-a subnet_id: e9bn57jvjnbu******** log_group_id: ckgjhe81a23v******** created_at: "2022-02-11T09:01:46.724279145Z"
-
Stop the load balancer by including its ID or name in the command below:
yc application-load-balancer load-balancer stop <load_balancer_name>
For more information about the
application-load-balancer load-balancer stop
command, see the CLI reference.
Use the stop REST API method for the LoadBalancer resource or the LoadBalancerService/Stop gRPC API call.
Start a load balancer
The Start command starts a stopped L7 load balancer. Once started, a load balancer changes its status to ACTIVE
. From this point on, you will be charged for using the load balancer.
To start a load balancer:
-
In the management console
, select the folder where the load balancer was created. -
Select Application Load Balancer.
-
Click
next to the load balancer name and select Start.To apply this action to multiple load balancers, select the appropriate load balancers in the list, click Start at the bottom of the screen, and then click Start in the window that opens.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
See the description of the CLI load balancer start command:
yc application-load-balancer load-balancer start --help
-
Get a list of all load balancers in the default folder:
yc application-load-balancer load-balancer list --format yaml
Result:
- id: ds79cfnvmti3******** name: test-load-balancer folder_id: b1gv87ssvu49******** status: ACTIVE network_id: enp45glgitd6******** listeners: - name: test-listener endpoints: - addresses: - external_ipv4_address: address: 51.250.35.12 ports: - "80" http: handler: http_router_id: ds7bharmjfs3******** allocation_policy: locations: - zone_id: ru-central1-a subnet_id: e9bn57jvjnbu******** log_group_id: ckgph76s449v******** created_at: "2022-02-11T09:00:31.911019416Z" - id: ds7o71924t0h******** name: balancer2 folder_id: b1gv87ssvu49******** status: STOPPED network_id: enp45glgitd******** allocation_policy: locations: - zone_id: ru-central1-a subnet_id: e9bn57jvjnbu******** log_group_id: ckgjhe81a23v******** created_at: "2022-02-11T09:01:46.724279145Z"
-
Start the load balancer by including its ID or name in the command below:
yc application-load-balancer load-balancer start <load_balancer_name>
For more information about the
application-load-balancer load-balancer start
command, see the CLI reference.
Use the start REST API method for the LoadBalancer resource or the LoadBalancerService/Start gRPC API call.