Move work between servers, remove a server, delete a cluster

Put an app or database on one server of a cluster, take a server out of a cluster without downtime, or delete the cluster and keep everything running.

Moving an app or database is for anyone who can configure it. Removing a server and deleting a cluster are for instance admins, on the cluster's folder under Settings -> Servers.

You want toDo this
Run an app or database on one server of a clusterMove it there
Take a server out of a clusterRemove it
Take a cluster apart and keep everything runningDelete it

Move to one server of a cluster

Settings -> General, then Move on the Server card of the app or database. The list has your servers first, then a group per cluster:

In the group Cluster euWhat it does
Any serverThe cluster picks the server. Not shown when it already runs on eu
server-a, server-bIt moves to that server and stays on the cluster
Runs here nowThe server it is on. Cannot be picked
  • It is an ordinary move: deployed on the new server, then its data is copied from the old one. An app with a Volume, or a database, is offline during the copy.
  • A failover still moves it. When its server stops, the cluster puts it on another one, and it stays there when the server comes back.
  • A server that cannot take it is greyed out, with the reason:
    • "server-b is offline, so web cannot move there now."
    • "server-b has 180 MB free and web needs 256 MB."
    • "web runs on ARM servers only, and server-b is not one."
    • "server-b is being removed from cluster eu."
    • "web runs 2 replicas, and cluster eu spreads them over its servers." An app with replicas only offers Any server.

Room is the memory limit (256 MB when none is set) against what the server's other apps and databases need.

Remove a server

Open the cluster, then Remove from cluster in the server's menu. Or drag the server onto Servers in the top line: "Release to remove it from the cluster". The dialog, Remove this server, says: "server-a leaves eu and stays one of your servers." With two servers it warns: "With one server left, eu stops failing over."

A server that runs nothing leaves at once. One that still runs apps or databases asks what happens to them:

ChoiceWhat happens
Move its Apps to the other servers (default)They move one at a time, then the server leaves. See below
Keep its Apps on this serverIt leaves at once. Its apps and databases keep running there as ordinary ones that nothing fails over

Either way the server stays in Deplo: it only leaves the cluster.

  • Leaving cuts it off at once. The cluster stops naming it and its server agent is told to leave. A renewed or re-issued server certificate cuts the old one off the same way.
  • An offline server that runs nothing can be removed. Deplo tells it that it left as soon as it answers again. One that still runs work and does not answer is refused: "server-a does not answer, and 1 App still runs on it. Bring it back online before removing it from eu."
  • A server that runs the cluster's leader cannot be removed from Deplo: "Move the leader of cluster eu to another server first." See The leader.

While it is being removed

With Move its Apps to the other servers:

  • Order: databases first, then apps, oldest first. The cluster picks where each one lands.
  • Nothing new is placed on the server in the meantime.
  • An app without stored data is up on the new server before the old copy is removed. An app with a Volume, or a database, is stopped for the length of the copy, so the server must be online.
  • It starts within about 15 seconds of the click and goes on if Deplo restarts. While Deplo is being moved to another machine nothing moves; it goes on afterwards.

Refused before anything moves when the other servers cannot take everything:

  • "No server in cluster eu has 512 MB free. Add a server to it or lower web's memory."
  • "No server in cluster eu is online and ready right now, so web has nowhere to run. Bring a server back or add one."
The server showsMeaning
Removing, "2 of 5 moved, moving web"It is going. The page refreshes on its own
Removal stopped, with a reasonSomething could not move. Nothing is retried on its own. Its menu has Continue removal and Cancel removal

The reasons it can stop with:

  • one of the two room sentences above
  • "web could not be moved, so it is still on this server. Its last deployment says why."
  • "web did not finish moving to its new server. Its last deployment says why."
  • the cluster's leader not answering

Continue removal tries again from where it stopped. Cancel removal works at any time: the server stays in the cluster and takes work again, whatever is moving right now finishes its move, and what already moved stays where it is.

Activity records the start ("Started removing server server-a from cluster eu: 3 to move first"), every move ("Moved web to server-b: server-a is being removed from cluster eu", in the team that owns the app) and the end ("Removed server server-a from cluster eu: everything it ran moved to the other servers").

Keeping its apps

With Keep its Apps on this server, Activity says: Removed server server-a from cluster eu, keeping 1 App and 1 database on it.

  • An app with replicas on other servers too cannot stay behind alone: "web also runs replicas on other servers of eu, so it cannot stay on server-a alone. Choose "Move its Apps", or lower its replicas to 1 first."
  • The last server of a cluster can only keep them: there is nowhere to move them. The cluster stays, empty.

Delete a cluster

Delete is in the cluster's menu, on its folder or inside it. The dialog, Delete eu, says: "Its servers stay connected and everything keeps running where it is."

Nothing is stopped, redeployed or deleted. Every app and database stays on the server it runs on, as an ordinary one that nothing moves when a server stops.

The dialog lists what is on the cluster:

  • your team's apps and databases by name: "web stays on server-a"
  • every other team's as a count: "2 Apps and 1 database of Acme". An admin never reads another team's app names there
  • with failover on (two servers or more, and not turned off), a warning: "These stop failing over, and an App stops reaching a database on another server by name. If a server stops, what runs on it stays down."
  • an empty cluster: "Nothing runs on it."

What changes for what ran on it:

It wasAfterwards
An app spread over several serversStays on its first server, and its copies on the others stop: "web stays on server-a, stops on server-b"
An app waiting for roomListed as "not running, stays on server-a". Start it by hand afterwards
A domain on the app's own Cloudflare TunnelPoints back at the server the app runs on, and the tunnel is deleted
A Failover backup scheduleKept as an ordinary schedule: still on, still every 15 minutes, with every backup it took. Edit or delete it under Backups
A leader on another serverRemoved from it, unless it leads another cluster. If that server is offline, it is removed once the server answers

Deplo never deletes a backup or a schedule because a cluster went away. The same holds for a last server kept with its apps.

Refused while a server that still runs work does not answer: "server-a does not answer, and 1 App still runs on it. Bring it back online before deleting eu."

Activity: Deleted cluster eu: this team's 1 App and 1 database stay where they run and no longer fail over. Every other team with work on the cluster gets the same line with its own count.

Over the API

moveAppToCluster(id, clusterId, serverId) and moveDatabaseToCluster(id, clusterId, serverId) (leave serverId out to let the cluster pick), removeClusterMember(clusterId, serverId, keepWorkloads) (also continues a removal that stopped), cancelClusterMemberRemoval, deleteCluster(id) and clusterDeletion(id) for the list. Removing and deleting need an instance admin. Over MCP, move_app_to_cluster and move_database_to_cluster take a serverId, and get_cluster shows how far a removal has got.

Did this page help you?

On this page