An open API service indexing awesome lists of open source software.

https://github.com/raycad/nodejs-cluster

NodeJS Performance Testing
https://github.com/raycad/nodejs-cluster

nodejs-cluster websocket

Last synced: 2 months ago
JSON representation

NodeJS Performance Testing

Awesome Lists containing this project

README

        

****Example for testing NodeJS performance.****

**1. ws-server**

A websocket server example.

Switch **USE_CLUSTER_MODE** and **USE_ASYNC** in the **constants.js** file to enable cluster and async mode.

USE_CLUSTER_MODE: 0

USE_ASYNC: 0

```
$ cd ws-server
$ npm install
$ node main.js
```

If you want to test separately with standalone & cluster modes you can use the following commands:

```
// Start in standalone mode
$ node node.js
```

```
// Start in cluster mode
$ node cluster.js
```

**2. ws-client**

A websocket client example.

```
$ cd ws-client
$ npm install
$ node main.js
````