Server balancing
Let the panel suggest, plan and run account moves between your servers when one gets too full or too busy.
Server balancing watches the servers joined to this panel. When one passes a limit — disk space, memory, load or number of accounts — it suggests which accounts to move to a server with room. Approved moves run one at a time in your maintenance window, using Move accounts, with a backup first, a check after and a rollback if the check fails. It is off until you switch it on.
Where: Server Admin › Accounts › Server balancing
Note: this menu entry appears only when at least one other server is joined under Servers.
Set the policy
In Policy:
-
Tick Balancing is on (checks every hour and runs approved moves).
-
Set the Limits. A limit of 0 is off.
Field What it does Disk used, % (0 = off) the share of the server's disk in use Memory used, % (0 = off) the share of the server's memory in use Load per CPU core (0 = off) the load average divided by the number of CPU cores Accounts per server (0 = unlimited) hosting accounts on the server -
Set the Maintenance window (UTC): From and To hours and the Days. The same hour in both means any time of day; a window can run over midnight, for example 22:00 to 04:00.
-
Set Email the customer this many hours before (0 = no notice), Moves suggested per check and, if you want, Never move accounts bigger than, MB (0 = any size).
-
Optionally tick Automatic mode: approve suggested moves without asking.
-
Leave Dry run: plan and log each step, but move, back up and email nothing ticked until you are happy with what it suggests. It is ticked for a new panel.
-
Click Save.
How moves are chosen
Each hour the panel reads every server's disk, memory and load (and counts its accounts). For a server past a limit it looks at the worst limit first and picks the accounts that weigh most on it — the biggest for disk space, the most memory or CPU for memory and load (their average over the last day), the smallest for the number of accounts — and sends each to the server with the most room where it keeps that server under every limit. Servers that do not answer, or that do not take new accounts (Servers), are never chosen. Moves already suggested or planned are counted, so the same account is not suggested twice.
Servers shows the last reading: each server's accounts, disk, memory and load, and Within limits, the limits it is past, or Not answering. Click Check now to read the servers and make suggestions straight away; this works while balancing is off too.
Approve or skip
Suggested and planned moves lists the moves waiting, planned and running, with the account, Move (from → to), the Reason, its Size and Status.
- Approve plans the move for the first maintenance window that starts at least the notice time from now, and emails the customer when it will happen.
- Skip sets it aside. It stays in History.
- Log shows what happened so far, with a link to the move itself.
Suggestions nobody decides on expire after 14 days.
What happens in the window
The moves run one at a time, never while another account move is running:
- Backing up — a full backup of the account is made on its current server.
- Moving — the account moves as in Move accounts: websites, email, databases and passwords, then DNS points at the new server. The old copy is kept for now.
- Checking — the panel checks that the new server has the account and that its main website answers on the new server's IP address.
- Done — the old copy is removed and the customer is told the move is finished.
If the check fails, the move is Rolled back: the account and its DNS point at the old server again, the copy on the new server is removed, and the customer is told that nothing changed. A move that cannot start, or fails on the way, leaves the account where it was (Failed). Administrators get a notification for each finished or failed move.
In dry-run mode the window only logs each step it would take, and the status is Dry run.
| Status | Meaning |
|---|---|
| Waiting for a decision | suggested; approve or skip it |
| Planned | approved; runs in the window shown under Runs |
| Backing up, Moving, Checking | running |
| Done, Failed, Rolled back, Skipped, Dry run, Expired | finished; listed in History |
For scripts
Administrator tokens can list, check, approve and skip suggestions: see API: the server.
Every finished move — and every rollback — raises the account.moved event: see Event hooks.