Commit 5e923f3
committed
Improve cloud variable backoff logic
Our cloud variable server refuses connections when there are too many people in
the same room. The client does have backoff logic, however that backoff counter
is being reset when the connection is initially opened, even if the connection
is immediately closed for being over capacity.
These way these interact gives a spectacular failure case. Say that there's
2000 people playing a project with cloud variables. Let's say that about 100 of
them are let in. The other 1900 clients will be constantly opening connections,
trying to get in. Those numbers are made up but it should illustrate the
problem.
To fix this we'll wait a bit before resetting the backoff counter, to make sure
that the server didn't refuse the connection. There are cleaner ways to fix
this problem, but this solution doesn't require protocol changes.1 parent 857dc10 commit 5e923f3
1 file changed
+15
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
85 | | - | |
86 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
| |||
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
100 | 108 | | |
101 | 109 | | |
102 | 110 | | |
| |||
251 | 259 | | |
252 | 260 | | |
253 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
254 | 266 | | |
255 | 267 | | |
256 | 268 | | |
| |||
0 commit comments