sniperHW / kendynet

go network lib
16 stars 9 forks source link

does it work on websocket? #1

Open jjhesk opened 5 years ago

jjhesk commented 5 years ago

does it work on production?

sniperHW commented 5 years ago

i was used kendynet in my mmorpg project. but not used websocket yet.

jjhesk commented 5 years ago

any testing with the websocket module yet? thx

sniperHW commented 5 years ago

go run example/benchmark_ws_pingpong.go server localhost:8010

and then use web browser to open/example/index.html

jjhesk commented 5 years ago

have you tested how many connections in one server given a ubuntu and 8 cores? did you reconstruct the timer? does it fix the error from the ticker where it does not play at once? appreciated!

sniperHW commented 5 years ago

i had tested for my mmorpg server in the scenario below: 1000 clients connected to a gate server,every client send a move request per second. when the gate receive a request,it pass through to a scene server. scene server brocast the move request to other all clients.

sniperHW commented 5 years ago

did you mean time.Ticker?

jjhesk commented 5 years ago

@sniperHW yes man,

jjhesk commented 5 years ago

how do you qualify that 1000 clients? are they hosted in no latency machine or heavy latency machines.. any indicators you have built?

sniperHW commented 5 years ago

it was a stress test on scene server. The main purpose is to estimate how many players a scene can carry. we deployed scene server,gate server,login server,and a redis on a ubuntu server(8 core,16G) which located in tencent cloud. and run four test clients on two mac machine,Simulate 250 players per client。

the opration flow for each player is :

login

enter scene

random move per second(with timesamp)

The players are divided into 10 groups, and the players in each group are visible to each other.

Therefore, each move request needs to be broadcast to 100 players.

the p99 move latency is under 100ms.

the cup useage of scene and gate is about 20% and 10%.

jjhesk commented 5 years ago

looks like a stable version. how do you prevent login attacks from the hackers. does having a dedicated server for login and authentication will work?

sniperHW commented 5 years ago

For the game, the account verification is provided by the Game operator, and the login service only performs secondary verification on this, and notifies the client of an available gate service for direct connection.