Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gbbr/benchmark-node-go
Benchmarking Concurrent Network Performance
https://github.com/gbbr/benchmark-node-go
Last synced: about 1 month ago
JSON representation
Benchmarking Concurrent Network Performance
- Host: GitHub
- URL: https://github.com/gbbr/benchmark-node-go
- Owner: gbbr
- Created: 2014-07-20T02:08:35.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-22T23:05:51.000Z (over 10 years ago)
- Last Synced: 2024-04-13T06:45:11.679Z (7 months ago)
- Language: JavaScript
- Size: 3.61 MB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### NodeJS vs Go Concurrent Network Performance Benchmark
Test scenario is as follows:
A TCP server (written in Go, and compiled) is provided, which opens port 1234 and welcomes connections. Each client that connects gets sent the byte value of the character "X" after a 1 second wait time, followed by disconnection.
To start the server run the `server` binary that is located inside the server folder. A NodeJS version of the server is also provided.
After the server is started, run the tests using `node testRunner.js`. Number of connections in test can be changed by altering the `CONNECTIONS` constant inside each of the tests. There is also a limit on the OS as to how many TCP connections area allowed at any given time, to change this, see: http://stackoverflow.com/questions/7578594/how-to-increase-limits-on-sockets-on-osx-for-load-testing
Some results I've obtained for 5000 connections are below:
| Go | NodeJS |
| ------------- |:-------------:|
| 1.076 sec | 1.356 sec |
| 1.072 sec | 1.352 sec |
| 1.068 sec | 1.682 sec |
| 1.047 sec | 5.487 sec |