Support Center

Contact Us

Load balancing

There are several ways that you can load balance your servers, typically they are

At DocEvent we use DNS weighted records in Amazon Route53 to load balance our servers.


Let's say we have 2 DocEvent servers that we have in our network, we want our customers to connect to the instances and ensure that if one server becomes unavailable the service continues to work.


It is recommended servers will require their own routable public IP address.

If you wish to use a load balancer and instances do not have a routable IP address, then you must use a sticky IP session management on your router in order to ensure connections route to the same instance.

DNS round robin

This is by far the easiest method. Simply adding 2 A records to the same DNS entry e.g., and pointing them to the public IP address of the instances ensures will ensure that users can access the servers randomly.


Server1 started with flag -publicip
Server2 started with flag -publicip

dns records: A A

Ensuring availability

It is recommended to have a healthcheck on the service to ensure DNS entry is removed if the instance becomes unavailable.

DNS weighted records

This DNS record works similarly to the DNS round robin, except that it only serves one IP address to the client, rather than both IPs at the same time.

Load balancer with public IP per instance

In this example we have 2 instances with 2 public IPs attached, as below:

Server1 started with flag -publicip
Server2 started with flag -publicip

We have a load balancer that accepts connections on 21, 22 and 990. It then routes traffic to each of these instances. The load balancer IP is

Customers will connect using FTP to port, they are then routed to one of the available servers in the backend.

When a client sends a passive FTP command the server will respond with their public IP address (e.g. - At this point the client will connect to and continue the passive FTP connection.

Load balancer with no public IP per instance

In this example we have 2 instances, but their public IPs are set to the load balancer as below:

Server1 started with flag -publicip
Server2 started with flag -publicip

The load balancer accepts connections on 21, 22, 990, and it also accepts connections on the passive FTP ports (as defined in the options).

For each connection the load balancer must use Sticky IP in order to ensure the client always connects to the same backend server.

When a new passive FTP connection arrives the server will respond with the load balancers IP address for passive connections (

What is the recommend method?

At DocEvent we use weighted load balanced DNS, and are running instances in Alpine Docker using ECS in AWS auto scaling groups.

We use the -shutdownwindow along with sidecar containers that manage DNS when scaling down to ensure that no new connections are created on our FTP servers while they wait for existing connections to terminate.

Our customers tend to use weighted DNS as the preferred solution because it is simple, they do not run in autoscaling groups because they have consistent traffic, and their IP addresses do not change.

In the end it depends, and if you are unsure be sure you can contact us to discuss what the best solution might be.