한국어English日本語简体中文繁體中文DeutschไทยTiếng ViệtРусскийPortuguês (Brasil)EspañolBahasa Indonesia

Game Lag White Paper › L2 Client OS and device

Wi-Fi ↔ LTE/5G switching Network switch changes IP

Cause ID co-netswitch · Primary owner Game team (Server development) · Also Game team (Client development), Infra team (Network infrastructure)

Open the interactive card with figures and simulations →

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

Symptoms
Freeze, Disconnect
Factors
Packet loss
Who’s affected
Just me
When
While moving or changing zones
Owner
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

  1. Read network state Android (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
  2. RFC 9000: QUIC: A UDP-Based Multiplexed and Secure Transport IETF
    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)
  3. RFC 9293: Transmission Control Protocol (TCP) IETF
    A TCP connection is identified by the pair of sockets (address and port) at its two ends

See also

Same layer: L2 Client OS and device

Same symptom (Freeze), other layers

View the interactive card with figures and simulations