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
- Host: GitHub
- URL: https://github.com/raycad/nodejs-cluster
- Owner: raycad
- Created: 2017-09-09T06:30:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-10T05:18:53.000Z (over 7 years ago)
- Last Synced: 2025-01-22T18:32:32.840Z (4 months ago)
- Topics: nodejs-cluster, websocket
- Language: JavaScript
- Homepage:
- Size: 12.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
````