AutoHost logoAutoHost

Command Palette

Search for a command to run...

Tutorials

Multi-Node Deployment

Deploy services across multiple nodes for high availability.

Learn how to deploy services across multiple nodes for high availability and load distribution.

Setting Up Nodes

First, ensure you have multiple nodes registered with AutoHost:

bash
# List all registered nodes
autohost nodes list

# Add labels to nodes for placement
autohost nodes label node-01 region=us-east zone=a
autohost nodes label node-02 region=us-east zone=b

Configure Services

autohost.yaml
name: ha-deployment
version: "1.0"

services:
  api:
    image: myapp/api:latest
    replicas: 3
    placement:
      constraints:
        - node.labels.region == us-east
      preferences:
        - spread: node.labels.zone
    ports:
      - "8080:8080"

Load Balancing

AutoHost automatically configures load balancing across replicas. Traffic is distributed using round-robin by default.