How can a sleeping Minecraft server wake up without players timing out?

November 16, 2026 5 answers
Asked by Tivlora-9m

I want an empty server to sleep, but a cold boot can take longer than the client will wait. Is there a way to keep a join open until the server is ready?

Answers

9g!plaidratchet_316

Put a protocol-aware proxy in front of the server. When a join arrives, the proxy can start the wake-up and hold the connection while it sends periodic login queries to the client. The client responses stay at the proxy rather than going to the backend.

Once the server is ready, the proxy can replay the buffered client traffic and pass the connection through. Minecraft clients since 1.13 support the login query used in the described design. You still need to handle the login protocol carefully, including keeping the proxy's own queries and responses out of the replay.

Rovik.2f:

A suspended server may resume quickly, but a fresh boot can take much longer. The longer wait is the case worth designing and testing for.

Reply to this answer
Mavelo+3r

Watch the resource limits at the proxy, not just the sleeping server. Joins arriving together can share one wake request, but each waiting player still holds a socket and needs protocol handling. Refusing excess joins per server can keep a flood aimed at one backend from slowing everyone else.

CPU can become the limit before the number of open connections does. Load-test the actual proxy and distribute new joins across instances when one gets busy, rather than assuming a particular connection count will be safe.

Reply to this answer
4j~foldratchet_583

You can also use a server list ping as an early wake signal, before someone actually joins. Rate-limit that trigger, though, or routine scans could keep waking an otherwise empty server.

q.817+mapthistle:

A sleeping status in the server list can also make the delay less mysterious to players.

Reply to this answer
r.684~drummarker

Check the transport before picking your edge service. The Minecraft connection here is raw TCP, so a service that only accepts HTTP and WebSockets is not a direct substitute for the proxy. You would need something in front that accepts the client's TCP connection.

Reply to this answer
_b47~tramnotch.6

Routing changes deserve a test too. If updating the proxy configuration reloads all routes, players arriving during that reload might get dropped. Updating individual hostname routes through an API can avoid that particular disruption.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions