lonng / nano

Lightweight, facility, high performance golang based game server framework
MIT License
2.88k stars 445 forks source link

What are the best practices for user push across different gateway machines? #112

Open daewoochen opened 3 months ago

daewoochen commented 3 months ago

With multiple GatewayServer deployed and different users connected to different GatewayServer, what is the best practice under the current framework when a user connected to gatewayServerA wants to push a message to a user connected to gatewayServerB? Is the following method feasible

  1. Create a sessionServer to manage all sessions.
  2. When users connect to different GatewayServer, they will be registered through rpc calling sessionServer.
  3. To actively push information to users, need to call the sessionServer through rpc instead of pushing information to gateServer directly.