When you walk out of the house and your phone drops Wi-Fi for LTE or 5G, your IP address changes and the existing connection stops working.
Why The Wi-Fi signal weakens and the phone switches to the mobile network → Effect Your IP address changes, so the connection made from the old address can’t carry any more data → On screen A brief freeze, then a disconnect or a reconnect
Primary owner Game team (Server development) · Also Game team (Client development), Infra team (Network infrastructure)
Game team action items
Server: resume the same player by session token even when the address changes, clean up the old address’s connection right away, consider a protocol that survives address changes (such as QUIC connection migration). Client: when a network switch is detected, reconnect right away with the session token without waiting for a heartbeat timeout.
Infra team action items
When using QUIC connection migration, configure the load balancer to choose the server by connection ID (choosing by address and port sends packets from a changed address to a different server).
On the graph
Mass disconnect · Disconnects and reconnects, IP changes on reconnect
Where to look
Look in the server connection log for the same session token reconnecting from a different IP, and match the times against the client’s default network change callback (registerDefaultNetworkCallback)
Confirmed if
Right after the disconnect, the reconnecting IP moves from the Wi-Fi (home connection) range to a mobile carrier range or the other way around, and a network switch callback arrives just before
Ruled out if
Disconnected while the IP stayed the same: “Cell tower handover (while moving)” or “Weak mobile signal and dead zones”
Check with
Game server or client logs and metrics
Sources
Read network stateAndroid (Google) When the default network changes, new connections go over the new network and connections on the old network are eventually forced closed; registerDefaultNetworkCallback detects the switch
RFC 9000: QUIC: A UDP-Based Multiplexed and Secure TransportIETF Connection IDs keep a connection alive even when the IP address or port changes (Section 9); a load balancer that distributes by address and port alone may send packets from a changed address to a different server (Section 5.2.3)