I’m running a web application based on Flask and Tornado in Python and I often reach timeouts when requesting my service. The app runs on the server with some other applications that generate high network load (all dockerized). To find out if this issue is related with Docker I did a simple test:
- created a simple hello-world application (Python, Flask, Tornado): https://gist.github.com/anonymous/a828e94693532477b167 - use “make build-docker” to create an image
- started 101 containers with my application (run_dockers.sh) - ports 8080-8180
- started one standalone (without Docker) instance of the app (“make run”)
- using Siege tool I provided high load on containers with ports 8080-8179 (“siege -c 1000 -r 100 -b -f list”)
- using ApacheBench I tested connection to the container on port 8180 (“ab -n 1000 -c 100 localhost:8180/”)
- using ApacheBench I tested connection to a standalone app on port 80.
When calling dockerized app I came into timeouts and benchmarking couldn’t be finished. I did it a few times, almost always with similar results.
When calling standalone app there were no such problems.
Screen: 6. on the left, 5. on the right
My conclusion is: high network load on some Docker containers can cause networking problems on other containers but not on applications running on host. Is that a normal behavior? Any suggestions how to overcome this issue?
I’m running Docker version 1.7.0, build 0baf609