Skip to main content

One post tagged with "migration"

User migration, seamless switching, dynamic routing, and reconnect strategy in SaaS environments.

View all tags

Headscale SaaS Seamless User Switching Between Cluster Nodes

· 5 min read
Larktun Contributor

Once you operate a sharded Headscale SaaS cluster, horizontal scaling is only half the operational story. Sooner or later you will need to rebalance a hot shard, drain a node for maintenance, or move an enterprise tenant onto a dedicated shard—without forcing every user to log in again.

This guide documents a production-tested pattern for near-seamless tenant migration across Headscale shards: scoped database migration + hot-reloaded Traefik routing + surgical TCP disconnect + automatic client reconnection.