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
This PR sets a preferredDuringSchedulingIgnoredDuringExecution PodAffinity
with a HostName topology.
This does a pretty decent job of grouping together GameServer Pods. It does
tend to distribute more widely when large groups of GameServer Pods get created,
but it's worth experimenting with the first, before going the more risky
route of a custom scheduler (in which we've already found some issues).
We may also find as GameServers shut down at the end of sessions, they start
to group together when they reschedule, as at lower load, the scheduler tends
to do a better job of packing.
Working towards agones-dev#368
Copy file name to clipboardExpand all lines: docs/scheduling_autoscaling.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@
4
4
5
5
> Autoscaling is currently ongoing work within Agones. The work you see here is just the beginning.
6
6
7
-
8
7
Table of Contents
9
8
=================
10
9
@@ -37,6 +36,12 @@ To facilitate autoscaling, we need to combine several piece of concepts and func
37
36
Allocation scheduling refers to the order in which `GameServers`, and specifically their backing `Pods` are chosen
38
37
from across the Kubernetes cluster within a given `Fleet` when [allocation](./create_fleet.md#4-allocate-a-game-server-from-the-fleet) occurs.
39
38
39
+
### Pod Scheduling
40
+
41
+
Each `GameServer` is backed by a Kubernetes [`Pod`](https://kubernetes.io/docs/concepts/workloads/pods/pod/). Pod scheduling
42
+
refers to the strategy that is in place that determines which node in the Kubernetes cluster the Pod is assigned to,
43
+
when it is created.
44
+
40
45
## Fleet Scheduling
41
46
42
47
There are two scheduling strategies for Fleets - each designed for different types of Kubernetes Environments.
@@ -77,6 +82,15 @@ also affect `GameServer` `Pod` scheduling, and `Fleet` scale down scheduling as
77
82
Under the "Packed" strategy, allocation will prioritise allocating `GameServers` to nodes that are running on
78
83
Nodes that already have allocated `GameServers` running on them.
79
84
85
+
#### Pod Scheduling Strategy
86
+
87
+
Under the "Packed" strategy, Pods will be scheduled using the [`PodAffinity`](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature)
88
+
with a `preferredDuringSchedulingIgnoredDuringExecution` affinity with [hostname](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#interlude-built-in-node-labels)
89
+
topology. This attempts to group together `GameServer` Pods within as few nodes in the cluster as it can.
90
+
91
+
> The default Kubernetes scheduler doesn't do a perfect job of packing, but it's a good enough job for what we need -
92
+
at least at this stage.
93
+
80
94
### Distributed
81
95
82
96
```yaml
@@ -111,3 +125,8 @@ also affect `GameServer` `Pod` scheduling, and `Fleet` scaledown scheduling as w
111
125
112
126
Under the "Distributed" strategy, allocation will prioritise allocating `GameSerers` to nodes that have the least
113
127
number of allocated `GameServers` on them.
128
+
129
+
#### Pod Scheduling Strategy
130
+
131
+
Under the "Distributed" strategy, `Pod` scheduling is provided by the default Kubernetes scheduler, which will attempt
132
+
to distribute the `GameServer` `Pods` across as many nodes as possible.
0 commit comments