Load Balancer Service (LBS)

EPAM Cloud Orchestrator provides the users with a Nginx-based Load Balancing Service that allows the user to arrange load balancing quickly and easily with just a set of CLI commands.

Have a Question?

The current page gives the general information on the service and the main workflows. However, while working with the services, our users encounter new questions they need assistance with. The most frequently asked questions on EPAM Cloud Services are gathered on the Cloud Services FAQ page.
Visit the page to check whether we have a ready answer for your question.

Related CLI Commands

The table below provides the list of service-related commands and their descriptions:

Command Short Command Description
or2-manage-service ...
-s load-balancer -a
or2ms ... -s load-balancer -a Starts the service in the specified project and region
or2-load-balancer-config or2lbconf Configures load balancing
or2-describe-load-balancing or2dlb Returns the list of the hosts manipulated by the Load Balancer and the information on their availability

Further on this page, you can find the examples of the commands usage for Load Balancer Service manipulation.

Starting the Load Balancer

To start the Load Balancer Service, use the or2-manage-service command with the following parameters:

or2ms -p project -r region -s load-balancer --activate

Here, the -s parameter specifies the name of the service to manage (load-balancer), and the --activate parameter indicates that the service should be activated (to stop the service, use --deactivate).

Only one Load Balancer can be created for a project. If your project already has a Load Balancer, the command will return a corresponding error message.

To stop the Load Balancer Service and to remove the Load Balancer Server, perform the following command:

or2ms -p project -r region -s load-balancer --deactivate

This command does not remove any resources created during the service performance.

Configuring the Load Balancer

All the Load Balancer configuration actions are performed with or2-load-balancer-config (or2lbconf) command. The command deals with four configuration areas, each having its own set of properties or properties behaviour:

  • Balancing - this area deals with Load Balancer Server, balancing members, the details on the balancer connections.
  • Limits - this area deals with the user connections and requests limits
  • Bans - this area allows to ban specific URLs or user IPs
  • Cache - this are allows to set up Load Balancer caching

When used with --project and --region parameters only, the command displays the list of the configuration settings applied to the Load Balancer.

CLI Parameters
Parameter Name Description
General -p, --project Project ID
-r, --region Virtualization region
-P, --plain-output Use plain output view
--full Show full command output
--help Display command help
Balancing -b, --balancing Specifies the configuration area as "balancing"
--balancerName FQDN for the Load Balancer
-i, --instance The ID of the instance to be added or removed
from the balancing members list
--port The port to route to. Default: 80
--permanent Enable/Disable "keep alive" feature: Nginx will
open the specified number of connections
with each host [0?]. Default 0.
--iphash Enable/disable "sticky session" [on/off] Default: on
-d, --remove Remove a host from the balancing members list
-d, --removeAll Remove all hosts from the balancing members list
Limits -l, --limit Specifies the configuration area as "limit"
--connections Specifies that the number of allowed simultaneous
user connections should be set
--requests Specifies that the limit of requests per second
should be set
--perIp Sets the connections or requests limit for a
given IP (set 0 to remove the limit)
--total Sets the connections or requests limit for the
whole balancer
Bans --ban Specifies the configuration area to "ban"
--ip Adds IP address to the ban list.
Format: xxx.xxx.xxx.xxx
--url Sets the URL to return failure status code
--status Set status code for URL to return
(Default: 403 Forbidden)
-d, --remove Removes ban from IP or URL
-d, --removeAll Removes all bans
Cache --cache Specifies the configuration area to "cache"
--url Sets the URL to cache
--extension Sets the extensions of files to be cached
--expiration Sets the cache expiration time (in minutes)
-d, --remove Removes caching files or URLs
-d, --removeAll Disables caching

To get the list of the hosts manipulated by the Load Balancer and see their availability, use the or2-describe-load-balancing command:

or2dlb -p project -r region

Below, you can see some examples of Load Balancer configuration commands:

  • Add an instance to the balancing group:

    or2lbconf -b -i instance_id
  • Changes the port of instance1 to 2752:

    or2lbconf -b -i instance_id --port 2752
  • Sets maximum connections from a unique IP to 10 and the overall maximum connections to balancer - to 50:

    or2lbconf -b --instance instance1
  • Sets /maestro/ to return 404 Not found:

    or2lbconf --ban --url /maestro/ --status 404
  • Enables caching on /images/ with 10 minutes expiration:

    or2lbconf --cache --url /images/ --expiration 10

Web UI

Load Balancer service does not have any web UI. All the manipulations are to be performed via CLI.


The service usage price is defined by the price of the Load Balancer Server VM.

The default parameters of a Load Balancer Server VM are:

  • Shape: MEDIUM
  • Image: Ubuntu12.04_64-bit

Therefore, the approximate monthly cost of a Load Balancer Server usage in case of 100% and 24/7 $58.59 in EPAM-BY1 region (as to 11/09/2015). The price can vary depending on the region.
To get more detailed estimations, please, use our Cost Estimator tool.


More information on the Load Balancer Service can be found in the EPAM Cloud Services Guide. For detailed description of the Maestro CLI commands used to manage the Load Balancer Service, refer to the Maestro CLI User Guide.