How to do stress testing on my nakama node or cluster?

For rest APIs, it’s simple. Tools like JMeter allow you to apply all types of tests to a certain hardware configuration.

how can I check how many concurrent matches can my backend handle? why it uses sockets and there are many scenarios for a game to finish, how can I handle it? is there any good tool or technique for such scenarios?

To stress test your setup for concurrent matches I also haven’t found any official tool, since most of the game will be different, or may use different runtime but you could try creating a scripts to profile it.
For example:

  • Script can create a socket connection with user id, queue for match maker, and join match, send few ping pongs across like 5-10mins and see what happens.
  • In my case for initial profiling i created a script that initialize N number of matches, matches try to broadcast match state across 5min then closes, and i observe stats, how much memory it uses, cpu, latency and so on.
  • This process didnt show hot spots or what to optimize, but it showed that overall there were issue with some of data that needed to be reconfigured if i wanted to have a lot of matches on some low configurations.