For operations managers of real-time competitive, MMO, or card games, the most feared thing during a DDoS attack is not hearing "latency is a bit high," but the sudden eruption in the operations group: "everyone at 460 ping, mass disconnections, card game rollbacks."
When a website is attacked, users can refresh the page and perhaps continue browsing; but for games that rely on long connections to maintain match state, once disconnected, not only is the current match invalidated, but thousands of players clicking "reconnect" at the same second will instantly create a secondary surge on login and gateway servers, directly overwhelming backend databases and authentication interfaces that were not originally breached.
Why do games still easily disconnect under attack even with basic protection or single-point high defense? How does the Game Shield, specifically designed for non-HTTP protocols, achieve "switching without disconnection" when a node is under attack? This article will dissect this issue from two perspectives: protocol mechanisms and forwarding architecture.
I. Why do games easily suffer "mass disconnections" when attacked?
Recent attack and defense monitoring data from security agencies show that in targeted strikes against games and overseas businesses, instantaneous large traffic bursts and multi-vector mixed attacks have become the norm. Attackers frequently switch tactics within a single attack, specifically targeting TCP/UDP protocol stack vulnerabilities.
If you have previously learned about whether non-website businesses can use high-defense CDN, you would know that ordinary websites use HTTP/HTTPS short connections or stateless requests, while the core combat and room synchronization of most games use custom TCP or UDP protocols. The two behave very differently when under attack:
- Highly sensitive session state: Card game settlement, skill release, and position synchronization are all bound to the current connection session. Once the intermediate link jitter exceeds the client heartbeat threshold, or the Layer 4 connection table is flooded with SYN Flood or ACK Flood, the connection will be directly reset.
- Single-point entry prone to congestion or blackholing: If all players connect directly to the same entry IP, when tens of Gbps or even hundreds of Gbps of UDP reflection amplification traffic hits this IP, even if the data center does not block it, the physical network card and routing queues will instantly congest. Normal players' heartbeat packets cannot get through, and the server directly determines the player is offline.
- Traditional DNS change switching inevitably disconnects: When an entry is knocked out, the traditional approach is to change DNS resolution or manually switch to a backup IP (for specific time differences, refer to how long does high-defense line switching take to take effect). However, for clients that have already established TCP long connections, changing DNS has no effect on existing connections—the old IP is unreachable, and existing players must first disconnect, return to the login screen to fetch the new IP, and then re-enter the game.
II. Three core mechanisms of Game Shield to prevent disconnections
To solve the deadlock of "disconnect upon attack, re-login upon switch," the protection layer cannot just be a passive cleaning gateway; it must intervene in connection distribution and protocol transmission. In RockCloud's Game Shield solution, the core relies on the following three mechanisms to ensure connection continuity:

1. Private protocol encapsulation for non-HTTP protocols
Standard TCP/UDP game ports exposed on the public internet are easily identified by hackers using port scanning tools to recognize business characteristics, and then construct highly simulated protocol-layer CC attacks or malformed packet attacks.
Above the transport layer, Game Shield performs private protocol encapsulation on non-HTTP game protocols. Native TCP/UDP traffic sent by clients is encapsulated and encrypted before entering the public internet, no longer exposing the original communication characteristics. As a result, attackers cannot easily forge legitimate business handshake packets after capturing packets, and junk traffic lacking private protocol characteristics can be directly discarded at the edge node side.
2. Distributed edge node forwarding and origin server hiding
Unlike single-point high defense that puts all eggs in one basket, Game Shield supports full TCP/UDP protocol forwarding and deploys distributed edge nodes at the front end.
Players no longer connect directly to the game origin server but are distributed to edge nodes in various locations, which forward the cleaned traffic back to the origin server. Through this architecture, attackers can only see the dispersed front-end node IPs, and the real IP of the game origin server is completely hidden behind the scenes. If the origin server has been exposed before, it is necessary to simultaneously close it off during integration (see the closure sequence in will the origin IP still be exposed after high-defense CDN integration).
3. Switch to high-defense nodes when a node is attacked, without disconnecting
This is the most essential difference between Game Shield and ordinary port forwarding. In a distributed architecture, when the monitoring system detects that an edge node is under large traffic attack, the system automatically schedules the business on that node to switch to a high-defense node.
Supported by the underlying private protocol encapsulation, this node switching is completed at the tunnel layer, and the session connections relied upon by the upper-layer game logic are not interrupted. On the player side, it may only manifest as a slight increase in latency for a few frames, followed by immediate recovery, without a "disconnected from server" popup, thus completely avoiding the disconnection reconnection storm.
III. Layered combination recommendations for game business integration
A complete game business typically contains multiple protocol modules, and it is not necessary to stuff all traffic into the same channel. When planning the architecture, we can layer by module (for a detailed comparison of layering approaches, you can read should game servers choose high-defense IP or high-defense CDN):
| Game business module | Typical protocol type | Recommended protection and acceleration method | Core function |
|---|---|---|---|
| Lobby, matchmaking, combat servers | Custom TCP / UDP | Game Shield | Private protocol encapsulation, full TCP/UDP protocol forwarding, connection continuity during attack switching |
| Official website, login API, hot update packages | HTTP / HTTPS | High-defense CDN + Intelligent WAF | Anycast scrubbing of DDoS/CC, blocking SQL injection and malicious scanning, caching hot update resources |
| Overseas origin serving mainland China players | Cross-border long connection / HTTPS | Add CN2 China Acceleration | Via Hong Kong, Japan, Korea, Singapore nodes, using Telecom CN2 GIA, Unicom AS9929, Mobile CMI three-network direct return to China, reducing cross-border packet loss |
| Promotion landing pages and share links | HTTP / HTTPS | Blocking and pollution recovery | Solve DNS pollution and blocking by WeChat, QQ, etc., seamless 301 redirect without changing domain |
Especially for industry solutions such as card games, many teams deploy servers on AWS, Alibaba Cloud International, or Tencent Cloud International. RockCloud does not sell servers; your existing cloud hosts can continue to be used as origin servers. If you need to expand underlying computing resources, you can also directly use international cloud recharge to open an account for free without enterprise verification and recharge with USDT, in conjunction with the front-end Game Shield and high-defense CDN.
IV. Operations implementation and emergency checklist
Whether hardening the architecture before a new game launch or urgently integrating during an attack, it is recommended that the operations team check the configuration in the following four steps:
- Sort out protocol and port lists: Separate the in-game HTTP/HTTPS interfaces (which can be integrated with high-defense CDN by changing one CNAME) from the native TCP/UDP game server ports (which connect to Game Shield).
- Change and lock down origin server IP: If integrating urgently during an ongoing attack, be sure to simultaneously change the public IP of the origin server and set the origin firewall (security group) to only allow back-to-origin node IPs, cutting off the path for hackers to bypass protection and directly attack the origin.
- Configure real-time alert push: Enable traffic and bandwidth report monitoring in the control panel and bind Telegram real-time data push (for configuration, refer to how to push CDN data to Telegram), so that you receive notifications immediately when node scheduling is triggered or traffic anomalies occur.
- Apply for testing and verification in advance: On packages and billing, RockCloud charges by month and fixed peak by default, with unlimited traffic and requests, and acceleration and DDoS/CC defense are included in the same package. Before launch, you can contact customer service to determine specifications and apply for free testing to verify node switching and latency performance in a real business environment.
If your game server is currently under attack and frequently disconnecting, and you need immediate stop-loss integration, please directly contact the "Security Response" team through the contact page, or initiate emergency assistance via Telegram (@rockclouds).
Comments(0)