Docker stop responding under load

notice that docker stop responding under load. Here is the steps to reproduce the issue:

docker-machine create -d virtualbox web

  • OSX boot2docker trouble connecting to docker daemon
  • deploy containers on swarm cluster using compose file without using docker machine
  • SSH in Docker container causes HTTP 404
  • Container Orchestration for provisioning single containers based on user action
  • Ember and Sails Deployment
  • Is it possible/sane to develop within a container Docker
  • docker-machine ip web

    192.168.99.253
    

    eval $(docker-machine env web)

    docker run –name app -d -p 3000:3000 ragesh/hello-express

    ab -n 100000 -c 100 http://192.168.99.253:3000/

    Server Hostname:        192.168.99.253
    Server Port:            3000
    
    Document Path:          /
    Document Length:        207 bytes
    
    Concurrency Level:      100
    Time taken for tests:   145.726 seconds
    Complete requests:      100000
    Failed requests:        0
    Total transferred:      38900000 bytes
    HTML transferred:       20700000 bytes
    Requests per second:    686.22 [#/sec] (mean)
    Time per request:       145.726 [ms] (mean)
    Time per request:       1.457 [ms] (mean, across all concurrent requests)
    Transfer rate:          260.68 [Kbytes/sec] received
    
    Connection Times (ms)
                  min  mean[+/-sd] median   max
    Connect:        0    0   0.2      0      15
    Processing:    32  145  14.1    140     237
    Waiting:       32  145  14.1    140     237
    Total:         36  146  14.1    140     237
    
    Percentage of the requests served within a certain time (ms)
      50%    140
      66%    146
      75%    151
      80%    155
      90%    165
      95%    173
      98%    185
      99%    196
     100%    237 (longest request)
    

    Everything looks good even -n 100000.

    docker-machine create -d virtualbox router

    eval $(docker-machine env router)

    vi nginx.conf

    upstream web {
        server 192.168.99.253:3000;
    }
    
    server {
        listen 80;
    
        location / {
            proxy_pass http://web;
        }
    }    
    

    docker run –name router -p 80:80 -v $(pwd)/nginx.conf:/etc/nginx/conf.d/default.conf:ro -d nginx

    docker-machine ip router

    192.168.99.252 
    

    ab -n 10000 -c 100 http://192.168.99.252:80/

    Server Software:        nginx/1.9.14
    Server Hostname:        192.168.99.252
    Server Port:            80
    
    Document Path:          /
    Document Length:        207 bytes
    
    Concurrency Level:      100
    Time taken for tests:   32.631 seconds
    Complete requests:      5957
    Failed requests:        0
    Total transferred:      2448327 bytes
    HTML transferred:       1233099 bytes
    Requests per second:    182.56 [#/sec] (mean)
    Time per request:       547.773 [ms] (mean)
    Time per request:       5.478 [ms] (mean, across all concurrent requests)
    Transfer rate:          73.27 [Kbytes/sec] received
    
    Connection Times (ms)
                  min  mean[+/-sd] median   max
    Connect:        0    2  52.6      0    3048
    Processing:     2  168  56.2    164    3002
    Waiting:        2  168  56.2    163    3002
    Total:          2  169  97.7    164    5032
    
    Percentage of the requests served within a certain time (ms)
      50%    164
      66%    171
      75%    176
      80%    178
      90%    185
      95%    192
      98%    199
      99%    209
     100%   5032 (longest request)
    

    Expect the Requests per second will drop, but not except it drop so dramatically. And run ab several times, got connection error very often.

    Did I do something wrong?

  • Re-mount volume in a running container
  • Error on script to clear cache docker container
  • Inspect non-daemon Docker container, after it has completed running
  • Why is my volume empty when binding it to a host folder?
  • How to configure PHP 7 - Apache with MySQL PDO driver in Debian Docker image?
  • How to activate docker 1.12 in terminal without Moby the whale app on Mac
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.