You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/about/faq.md
+55Lines changed: 55 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,58 @@ For convenience, we also [build container images with headscale](../setup/instal
44
44
we don't officially support deploying headscale using Docker**. On our [Discord server](https://discord.gg/c84AZQhmpx)
45
45
we have a "docker-issues" channel where you can ask for Docker-specific help to the community.
46
46
47
+
## Scaling / How many clients does Headscale support?
48
+
49
+
It depends. As often stated, Headscale is not enterprise software and our focus
50
+
is homelabbers and self-hosters. Of course, we do not prevent people from using
51
+
it in a commercial/professional setting and often get questions about scaling.
52
+
53
+
Please note that when Headscale is developed, performance is not part of the
54
+
consideration as the main audience is considered to be users with a moddest
55
+
amount of devices. We focus on correctness and feature parity with Tailscale
56
+
SaaS over time.
57
+
58
+
To understand if you might be able to use Headscale for your usecase, I will
59
+
describe two scenarios in an effort to explain what is the central bottleneck
60
+
of Headscale:
61
+
62
+
1. An environment with 1000 servers
63
+
64
+
- they rarely "move" (change their endpoints)
65
+
- new nodes are added rarely
66
+
67
+
2. An environment with 80 laptops/phones (end user devices)
68
+
69
+
- nodes move often, e.g. switching from home to office
70
+
71
+
Headscale calculates a map of all nodes that need to talk to each other,
72
+
creating this "world map" requires a lot of CPU time. When an event that
73
+
requires changes to this map happens, the whole "world" is recalculated, and a
74
+
new "world map" is created for every node in the network.
75
+
76
+
This means that under certain conditions, Headscale can likely handle 100s
77
+
of devices (maybe more), if there is _little to no change_ happening in the
78
+
network. For example, in Scenario 1, the process of computing the world map is
79
+
extremly demanding due to the size of the network, but when the map has been
80
+
created and the nodes are not changing, the Headscale instance will likely
81
+
return to a very low resource usage until the next time there is an event
82
+
requiring the new map.
83
+
84
+
In the case of Scenario 2, the process of computing the world map is less
85
+
demanding due to the smaller size of the network, however, the type of nodes
86
+
will likely change frequently, which would lead to a constant resource usage.
87
+
88
+
Headscale will start to struggle when the two scenarios overlap, e.g. many nodes
89
+
with frequent changes will cause the resource usage to remain constantly high.
90
+
In the worst case scenario, the queue of nodes waiting for their map will grow
91
+
to a point where Headscale never will be able to catch up, and nodes will never
92
+
learn about the current state of the world.
93
+
94
+
We expect that the performance will improve over time as we improve the code
95
+
base, but it is not a focus. In general, we will never make the tradeoff to make
96
+
things faster on the cost of less maintainable or readable code. We are a small
97
+
team and have to optimise for maintainabillity.
98
+
47
99
## Which database should I use?
48
100
49
101
We recommend the use of SQLite as database for headscale:
@@ -56,6 +108,9 @@ We recommend the use of SQLite as database for headscale:
56
108
The headscale project itself does not provide a tool to migrate from PostgreSQL to SQLite. Please have a look at [the
57
109
related tools documentation](../ref/integration/tools.md) for migration tooling provided by the community.
58
110
111
+
The choice of database has little to no impact on the performance of the server,
112
+
see [Scaling / How many clients does Headscale support?](#scaling-how-many-clients-does-headscale-support) for understanding how Headscale spends its resources.
113
+
59
114
## Why is my reverse proxy not working with headscale?
60
115
61
116
We don't know. We don't use reverse proxies with headscale ourselves, so we don't have any experience with them. We have
0 commit comments