So I have been coding a game using Libgdx, and THE very simple and powerful kryonet(SERVER-CLIENT) for multiplayer section . So far I could properly do the multiplayer over LAN and it works great!. I'm Starting to do the Online part of multiplayer section, in which two players will have a match randomly(the opponent would be randomly chosen). OK I have these questions that I think Is so simple and sadly I couldn't find any proper Answers:
I have a web application running on my server that could be like:
Public class myClass { . . . public main(){ Server server = new Server; networkRegisterer.register(server); server.bind(port.UDP,port.TCP); server.start; server.addListener(new ServerListener); . . . }
So my question starts with that: Suppose that I have 500 players playing online(250 matches playing know) I know that I'm not being specific but how do I manage this? should I create one ServerListener per Match(for 2 players)?should I create separate servers for each match? should I have just one server forwarded to one port and somehow manage the matches being played? should I use several ports(and then several servers) in order to control the traffic?
and another important question is that how am I supposed to check the Server performance for issues like data transfer Speed ?? (I mean before publishing the app obviously I cannot test my Server performance since I don't have 500 clients!!!!) . is there any way that I can run a simulation with a lot of clients without having actual clients?
Sorry if my questions look naive, I have done a lot of java experiences but not any Server-Client programming.