Skip to content

An humble benchmark of Node.js native IPC vs. Websocket communication.

Notifications You must be signed in to change notification settings

dbrugne/node-ipc-vs-ws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-ipc-vs-ws

An humble benchmark of Node.js native IPC vs. Websocket communication.

Compared communication channels are:

Note that my use case requires complex object exchange between processes so JSON serialization/deserialization is operate manually with JSON.stringify|parse on Websocket and uWebsocket client and server side to have a real comparison with IPC that (de)serialize automatically.

Result on Node.js 6.5.0:

IPC x 18,031 ops/sec ±2.44% (75 runs sampled)
Websocket x 8,200 ops/sec ±5.16% (78 runs sampled)
uWebsocket x 17,343 ops/sec ±3.67% (75 runs sampled)
Complex message : fastest are IPC,uWebsocket

Surprisingly uWebsockets is a little bit faster than IPC. I'm very interesting on knowing how they achieve to be faster than the native IPC API.

About

An humble benchmark of Node.js native IPC vs. Websocket communication.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published