Self-HostedHigh availabilityNetworking

Clustering recommendations

How to choose a clustering implementation for self-hosted instances - by protocol, with the trade-offs of DNS round robin and the network load balancer variants.
Updated August 27, 2026

There are many ways to run a cluster of self-hosted instances. This page is the decision guide: which implementations fit which protocols, and what each one trades away. The examples reference AWS services, but every other cloud has equivalents.

Two things this page does not cover:

  • How to configure each setup - the -publicip flag, DNS records and sticky sessions are covered step by step in Load balancing.
  • Network appliances (F5, NetScaler and friends) that ship their own FTP-aware proxying - if you have one, use its tooling.

Start with the protocol decision

A self-hosted instance is three servers bundled into one process:

  1. SFTP server (port 22)
  2. FTP + explicit FTPS server (port 21)
  3. Implicit FTPS server (port 990)

Decide first whether your users need SFTP only, FTP/FTPS only, or both - some implementations work well for SFTP but cannot carry FTP at all.

The difference comes from the protocols themselves. SFTP runs over a single SSH connection, which any TCP load balancer can carry. FTP uses multiple connections per session: the client authenticates on the control connection, and each listing or transfer opens a new data connection to a passive port - and both must reach the same server. (More background: Passive vs active FTP.)

What you are trading off

No implementation wins everywhere. Weigh each against:

  1. Downtime window when an instance fails
  2. Load-balancing precision - how evenly load actually spreads
  3. SFTP client support
  4. FTP client support
  5. Implementation cost
  6. Scalability - how easily the cluster grows and shrinks

Which implementations fit your protocols

You needWorkable implementations
SFTP only (port 22)DNS round robin · network load balancer (plain)
FTP/FTPS only (ports 21/990)DNS round robin · NLB for initial connections · NLB with sticky IPs
BothThe FTP row - each of those carries SFTP too; just open port 22 alongside the FTP ports

The one combination to avoid: a plain network load balancer (no sticky IPs) in front of FTP - data connections land on the wrong server and transfers fail.

DNS round robin
ClientServer 1static IPServer 2static IPall connectionsDNS answers rotate across the servers; ahealthcheck pulls a failed server out of DNS.
Network load balancer
ClientNLBone static IPServer 1Server 2Every connection flows through the balancer -precise balancing, but plain FTP needs sticky IPs.
NLB for initial connections
ClientNLBone static IPServer 1own public IPcontrolpassive data - directLogin goes through the balancer; the server thenhands out its own IP for passive data connections.

DNS round robin with healthchecks

Run each instance with its own static IP address and put them all in one DNS record with a low TTL (10-60 seconds). A DNS healthcheck (Route 53 or similar, TCP probing each instance) removes a failed instance's record so new clients stop landing on it.

Clients resolve the name and talk directly to one server for every connection - which is exactly why this works for FTP: control and data connections naturally reach the same instance.

OutcomeRating
Downtime window on failureMedium to low - clients ride out the DNS TTL before reaching a healthy server
Load-balancing precisionMedium to low - DNS answers are random, not load-aware
SFTP client supportHigh
FTP client supportHigh
Implementation costLow
ScalabilityHigh to medium - works in an auto-scaling group with some scripting to manage the records

Network load balancer (plain)

An HTTP load balancer will not carry raw TCP, but a network load balancer will. It gives your users one stable IP; every connection is routed to a backend instance and all data flows through that long-lived connection.

SFTP only. Without sticky sessions an FTP data connection can land on a different instance than its control connection.

OutcomeRating
Downtime window on failureLow - the NLB stops routing to a dead instance immediately
Load-balancing precisionHigh
SFTP client supportHigh
FTP client supportNot supported
Implementation costLow to medium
ScalabilityHigh - auto-scaling groups plug straight in

Network load balancer with sticky IPs

The same NLB, with stickiness by client IP: one client always reaches the same backend instance, so FTP control and data connections line up.

OutcomeRating
Downtime window on failureLow to medium - routing heals immediately, but in-flight FTP sessions on the dead instance must reconnect
Load-balancing precisionMedium to low - sticky IPs mean some instances accumulate more load over time
SFTP client supportHigh
FTP client supportHigh
Implementation costLow to medium
ScalabilityHigh

Network load balancer for initial connections

The NLB carries only the control connection; passive data connections go directly to the instance's own public IP. The instance advertises its own address in the passive response (the -publicip flag - see Load balancing):

1.1.1.1 (load balancer IP)
   /                     \
2.2.2.1 (server 1)   2.2.2.2 (server 2)

The client connects and authenticates via 1.1.1.1, requests a file, and the server answers "connect to 2.2.2.1:50001 for the data" - the client fetches the file directly from the instance that holds its session.

OutcomeRating
Downtime window on failureLow - the NLB stops routing to a dead instance immediately
Load-balancing precisionHigh
SFTP client supportHigh
FTP client supportHigh to medium - a few clients refuse a data IP that differs from the control IP
Implementation costLow to medium
ScalabilityHigh

That last row is the trade: it is the most precise FTP-capable setup, but ageing FTP clients that insist the data connection go to the same address as the control connection cannot use it.

What DocEvent itself runs

Our cloud clusters run Dockerized in AWS ECS behind a mix of NLB for initial connections and DNS round robin:

  • The NLB gives customers a stable static IP for connections and lets us scale out as demand rises; passive data connections go directly to the instances' own addresses.
  • For customers whose older FTP clients cannot handle separate connection and data addresses, we also publish a round-robin DNS hostname that goes straight to the instances.

That split is visible in the static IP addresses page: the "connection" addresses are the balancer, the "data" addresses are the instances.

Unsure which fits your network? Ask us - this is a conversation we have often.