- Home /
Massively Multiplayer Turn Based Game Performance : NodeJS or others ?
Hi,
I am in process of creating a multiplayer turn based game, and expecting it to be very popular (imagining).
I need to plan backend very carefully. So I am testing several servers which can handle several thousands clients.
I have tested nodeJS with socket.io, but that seems not a good choice. (may be I am wrong). I have tested nodeJS load with “websocket-bench” and apparently nodeJS Socket.IO starts dying on 3000 connections and on 5000 connections totally dead, while server resources are free. I have a 16GB RAM DUAL XEON (sandybridge 24 CORE) ON CENTOS 7. Overall load of server never goes above 6 and only 3GB to 6GB memory is utilized.
So I am not sure why nodeJS is not accepting more connections (I have set ulimit to 60,000).
I am using websocket-bench like this
websocket-bench -a 2000 -c 1000 http://localhost:3000/
and socket.io server is very simple.
// JavaScript Document
var io = require('socket.io')(process.env.PORT || 3000);
console.log('server started.');
var _clients=0;
io.on('connection', function (socket) {
_clients++;
console.log('Connections: '+_clients);
socket.on('disconnect', function () {
io.emit('user disconnected');
_clients--;
console.log('Connections: '+_clients);
});
});
Considering this background, I have 2 questions,
1) What wrong I am doing with my nodeJS setup. Am I missing something to get high very performance.
2) For a massively played turn based game what server should I use?
Thank You
Your answer
![](https://koobas.hobune.stream/wayback/20220612161400im_/https://answers.unity.com/themes/thub/images/avi.jpg)