I built an architecture below:


How does it work (and if it's possible)

Assuming your game server currently runs on Node 1 and then Node 1 gets a successful DDoS attack. Your cloud system has automatically recognized big illegal traffic coming to your node, and automatically stops your server on node 1 and runs the same game instance on node 2 by moving the RAM from Node 1 to Node 2.

The problem is the game client, it knows just one IP it has to connect to, but what if you added a system to your client to detect disconnection and automatically try to move to the next node?.

Since all nodes connected to one database on a different server, that database server IP is anonymous and is only known for the nodes, so nobody really knows it's IP to DDoS it.

Could that kind of an idea work in real life? or maybe corrected because I am really clueless about networking administrating.

When you move from Node 1 to Node 2, your system will remember all of the illegal traffic IPs and block them, it will know which of the traffic is illegal by analysing, so Node 2 will not receive connections from them anymore while Node 1 is null routing

  • The way this is written is very confusing. Have you copied it from somewhere? A textbook? – schroeder Mar 24 '19 at 23:35
  • 1
    Here's my big question, if the "system" can identify the bad traffic enough to block it from node 2, why can't it block it from node 1 and thereby avoid needing to move to a new node? – schroeder Mar 24 '19 at 23:36
  • 1
    If the game clients know how to switch to node 2, then so does the attacker. – schroeder Mar 24 '19 at 23:37

This doesn't seem like it's grounded in good network engineering or security practices. You can't assume that the attacker won't know the IP addresses of the other nodes, because if the game client can know then so can the attacker.

That being said, your idea of horizontal scaling behind unknown IP addresses isn't without merit. In fact, that's kinda how CloudFlare works. Here's their marketing diagram:

CloudFlare diagram

The idea is that your servers sit on IPs that are not publicly known, and you instead set up your domain to point at CloudFlare IPs, and your CloudFlare account is configured to relay traffic over to your real servers. Clients visit your domain (e.g. gameserver.yourcompany.com) which resolves to a CloudFlare IP. That IP address uses a kind of anycast network configuration to reach a CloudFlare server, which then proxies traffic between the client and your real server. In the process CloudFlare can provide DDoS protection, as they have a huge number of servers to distribute load over, very fast network connections, a 24/7 SOC, and relationships with upstream providers that allow them to null-route bad traffic.

On your server side you may still want some resiliency to prevent targeted attacks that attempt to exhaust CPU or RAM on the server without using traditional DDoS trick that something like CloudFlare would otherwise thwart. The way you do this generally depends on your game design. For games where players join individually hosted rooms or matches (think a game of Counter Strike or StarCraft) it's a fairly simple affair - just have a bunch of servers and randomly pick one to host the game on, weighted by current load. You can use load balancers for some of this. For games where all players interact, like an MMO, you have to get a bit more creative due to the state-sharing requirements, and this is beyond the scope of my answer, but it is certainly possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.