How a drain moves your applications
See how Tenkai moves each web application and each worker off a node before maintenance or removal, and what cannot move.
Drain a node before you work on it for a long time, for example to replace it. To reboot a server, reboot it from its upkeep tab instead: Tenkai moves its applications away first, even on a node that holds a stateful resource and cannot drain. A drain moves each web application and each worker off the node, then keeps the node empty until you resume it.
How a drain moves your applications
Choose Drain on the card of the node. Tenkai moves its applications one at a time, each with a deployment of its active release on another node: same image, same configuration, nothing to build. A web application switches its traffic as any deployment does. A worker runs on both nodes for a moment, as in a deployment of a worker.
On a manager of a cluster where every manager receives traffic, the drain first takes the node out of the edge hostname, and moves nothing until DNS caches dropped it, about two minutes later. The node receives traffic again once you resume it.
If a move fails, the drain stops. The applications already moved stay on their new nodes. Read the details of the failure, then drain the node again.
What cannot move
- A managed service, or a web application that keeps files. Its data stays on its node, so Tenkai refuses to drain that node and names the resource. For a MySQL or a PostgreSQL with high availability, replace its instance on another node first, for a MySQL or a PostgreSQL.
- The cluster storage. Its node does not drain either.
- The edge node. It never drains. On the edge node and other managers, Stop accepting workloads moves your applications away the same way.
The other nodes need enough free CPU and memory for the arriving replicas. A node offers no Drain while no other node accepts workloads, as on a cluster of one server.
A scheduled job needs no move, but a run in progress on the node stops when the node drains.
Resume a node
Choose Resume on the card of the node. Tenkai does not move your applications back: only new deployments place replicas on the node again.
Drain before you remove a node
Remove from cluster starts with the same drain. See Remove a worker node.
Read next
- Manage the nodes of a clusterAdd a node, make a cluster highly available, drain or resume a node, remove a worker node, and choose whether new servers get the Tenkai Agent.
- Clusters and the roles of their nodesUnderstand the edge node, manager nodes, worker nodes and data nodes, how many failures a cluster survives, and how to keep replicas on separate nodes.