Node.js & Docker
docker vs host
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337);
console.log('Server running at http://0.0.0.0:1337/');docker node
root@ubuntu-512mb-nyc3-01:~/wrk# ./wrk http://192.241.209.*:1337
Running 10s test @ http://192.241.209.*:1337
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 76.01ms 1.24ms 88.79ms 83.68%
Req/Sec 65.51 16.12 101.00 76.77%
1305 requests in 10.04s, 198.81KB read
Requests/sec: 129.99
Transfer/sec: 19.80KB
host node
root@ubuntu-512mb-nyc3-01:~/wrk# ./wrk http://192.241.209.*:1337
Running 10s test @ http://192.241.209.*:1337
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 75.85ms 1.87ms 87.10ms 61.29%
Req/Sec 65.66 12.35 101.00 57.07%
1307 requests in 10.03s, 199.11KB read
Requests/sec: 130.27
Transfer/sec: 19.85KB Installing Docker
Creation steps
Build Image
Run Image
Access the application
Save Mongodb Data Files
Disk Mapping
Last updated