Skip to content

Commit 5040512

Browse files
committed
docs: add section about player sync
1 parent 1478139 commit 5040512

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

docs/src/guide/architecture.md

+28-4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ player connected to the Network while having an almost-zero performance impact.
5656

5757
## Keeping the proxies up-to-date
5858

59+
### Have an up-to-date list of servers
60+
5961
One of the core requirements of Shulker is to keep the proxies up-to-date about all
6062
the creation and deletion of servers. This is usually done manually using the following
6163
flow:
@@ -79,11 +81,33 @@ availability. Supported by a plugin agent to be installed on every proxy, the pr
7981
will have their server list updated immediately upon every event occurring in the
8082
Kubernetes Cluster.
8183

82-
:::warning
84+
### Have a shared list of connected players
85+
86+
If you want to work with multiple proxies, mostly to ensure high availability of
87+
the cluster, you'll face the challenges of state sharing. Every proxy is
88+
fundamentally independant, and thus, is not aware that:
89+
90+
1. It way not be the only proxy in the cluster
91+
2. Players may be connected to other proxies
92+
93+
This could create weird situations where a player may want to communicate with
94+
another player in a different proxy, but these two proxies being unable to
95+
proceed because they are not aware that the other player is actually connected
96+
to the cluster.
97+
98+
To solve this problem, Shulker has a built-in proxy synchronization layer based
99+
on Redis that is enabled automatically. This will provide some administrative
100+
commands to the proxy to ease player management (TODO ADD PAGE ABOUT COMMANDS),
101+
but also some useful details like showing the total amount of players in all
102+
proxies when pinging your cluster.
103+
104+
:::tip
83105

84-
While servers are synchronized on each proxies, players are not. This means that,
85-
from one proxy, you will **not** know that another player is connected to the network
86-
if it is not connected to the same proxy. **This feature is considered high priority.**
106+
While Shulker provides a managed single-node Redis by default when creating a
107+
cluster, it is not advised to use it in production as there will be no high
108+
availability nor any availability guarantee. It is only meant to be used when
109+
testing Shulker or at least on staging infrastructure where availability is
110+
not a critical requirement.
87111

88112
:::
89113

packages/shulker-operator/src/reconcilers/minecraft_server/gameserver.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ impl GameServerBuilder {
154154
"sh".to_string(),
155155
format!("{}/init-fs.sh", MINECRAFT_SERVER_SHULKER_CONFIG_DIR),
156156
]),
157-
env: Some(Self::get_init_env(resourceref_resolver, &minecraft_server).await?),
157+
env: Some(Self::get_init_env(resourceref_resolver, minecraft_server).await?),
158158
security_context: Some(PROXY_SECURITY_CONTEXT.clone()),
159159
volume_mounts: Some(vec![
160160
VolumeMount {

0 commit comments

Comments
 (0)