Hi @Pippin,
You're right that managing 20k+ users with QTcpServer and raw sockets can be very resource-heavy. Instead of using plain HTTP, I'd recommend looking into WebSockets with QWebSocketServer, which allows real-time, two-way communication and scales better for game updates. For encryption, you can either use QSslSocket directly or offload SSL using a reverse proxy like Nginx to handle HTTPS/WSS and let your server deal with plain TCP internally.
As for syncing game state: the server should act as the single source of truth. When Player A makes a move, the server processes it, validates it, then pushes the same update to Player B and any watchers using WebSocket messages. This way, all players receive the actions in the same order, keeping everything in sync. Starting with a small prototype using a few clients will help you get the architecture right before scaling up. Good luck!