{"id":293,"date":"2016-02-14T14:19:56","date_gmt":"2016-02-14T13:19:56","guid":{"rendered":"https:\/\/blog.mi.hdm-stuttgart.de\/?p=293"},"modified":"2023-06-07T11:34:41","modified_gmt":"2023-06-07T09:34:41","slug":"more-docker-more-power-part-4-problems-arise","status":"publish","type":"post","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2016\/02\/14\/more-docker-more-power-part-4-problems-arise\/","title":{"rendered":"More docker = more power? \u2013 Part 4: Problems arise"},"content":{"rendered":"<p>Now, it\u2019s finally time to start our first load test. We will be using ApacheBench. To install it simply enter apt-get install apache2-utils. To load test your website enter<\/p>\n<pre class=\"prettyprint lang-sh\" data-start-line=\"1\" data-visibility=\"visible\" data-highlight=\"\" data-caption=\"\">ab -n 200 -c 50 &lt;URL_to_your_page&gt;<\/pre>\n<p>This command runs 200 requests, with a maximum of 50 at the same time. The results are then displayed in the terminal.<\/p>\n<p>All good so far. We decided to to run 10000 requests with a maximum of 1000 at the same time with 1, 5, 20 and 100 Docker containers providing our website, to see if the amount of containers makes a difference. However, the results did not really vary at all. No matter if we used 1 or 100 containers. The requests per second and the time per request ended up being the same (with a little, not noteworthy variation) for every amount of containers.<br \/>\n<!--more--><\/p>\n<p>This made us question our whole setup. Does it even matter to have different amounts of Docker containers when providing a website? Is one nginx instance capable of of handling everything? And why do the times not vary at all? We knew that the host-system hardware is not virtualized between the Docker containers, but we were at least expecting differences between running 1 or 100 nginx instances at the same time.<\/p>\n<p>At first we did some tests to see if the load balancer is working. Therefor, we checked the logfiles of the web servers. It seemed like everything was fine here. Each request was forwarded to a different container.<\/p>\n<p>Later we figured out, since we only had a 100Mbit network available (yes, no Gbit over here), that maybe limiting the requests per nginx instance could change the results. Turns out it only kind of does, since AB does not load the whole website but only checks for its availability. So next up, we limited the bandwidth, which did produce different results, however, far away from being useful. And then it hit us:<\/p>\n<p><em>suspenseful silence<\/em><\/p>\n<p>We were performing all tests over WiFi! (yeah..) Plus: we were looking at the results the wrong way!<\/p>\n<p>So first, always use a LAN connection for this (even the most obvious things can go wrong). The switch to WiFi made our load testing more than 4 times faster.<\/p>\n<p>Second, it\u2019s all about reading the results correctly. We completely neglected the amount of failed requests. And this is where it gets interesting.<\/p>\n<p>Taking a look at 10000 requests with a maximum of 1000 at the same time we found out the the amount of failed requests decreases extremely between 1 and 100 docker containers.<\/p>\n<p>For example, one measurement came up with the following amount of failed requests per container-amount:<\/p>\n<p>1: 10009, 5: 9653, 20: 7231 and 100: 1284. This told us that our thesis of \u201cmore docker = more power\u201d might be true after all.<\/p>\n<p>In our next and last post we will provide you guys with our final insights. Testing 1, 5, 20, 100 and even 200 docker containers and different amounts of requests and requests at the same time, to finally find out, if \u201cmore docker = more power\u201d. Click <a href=\"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2016\/02\/22\/more-docker-more-power-part-5-scientific-paper\/\" target=\"_blank\" rel=\"noopener\">right here<\/a>&nbsp;to read more.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now, it\u2019s finally time to start our first load test. We will be using ApacheBench. To install it simply enter apt-get install apache2-utils. To load test your website enter ab -n 200 -c 50 &lt;URL_to_your_page&gt; This command runs 200 requests, with a maximum of 50 at the same time. The results are then displayed in [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":182,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1,651,2,657],"tags":[],"ppma_author":[688],"class_list":["post-293","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-allgemein","category-system-designs","category-system-engineering","category-teaching-and-learning"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2016\/01\/1429543497dockerimg.png","jetpack-related-posts":[{"id":274,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2016\/02\/07\/more-docker-more-power-part-3-setting-up-the-loadbalancer\/","url_meta":{"origin":293,"position":0},"title":"More docker = more power? \u2013 Part 3: Setting up the loadbalancer","author":"Moritz Lottermann","date":"7. February 2016","format":false,"excerpt":"To benefit from using a loadbalancer we need several machines to distribute the traffic on, evidently. Thanks to Docker we simply run docker run -d -p 81:80 testwebsite:1 to get a second machine. This time the container port of the webserver is mapped to port 81. If you now visit\u2026","rel":"","context":"In &quot;Allgemein&quot;","block_context":{"text":"Allgemein","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/allgemein\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2016\/01\/1429543497dockerimg.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2016\/01\/1429543497dockerimg.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2016\/01\/1429543497dockerimg.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2016\/01\/1429543497dockerimg.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":170,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2016\/01\/07\/more-docker-more-power-part-2-setting-up-nginx-and-docker\/","url_meta":{"origin":293,"position":1},"title":"More docker = more power? \u2013 Part 2: Setting up Nginx and Docker","author":"Moritz Lottermann","date":"7. January 2016","format":false,"excerpt":"This is Part 2 of a series of posts. You can find Part 1 here:\u00a0https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2016\/01\/03\/more-docker-more-power-part-1-setting-up-virtualbox\/ In the first part of this series we have set up two VirtualBox machines. One functions as the load balancer and the other will house our services. As the next step we want to install\u2026","rel":"","context":"In &quot;System Designs&quot;","block_context":{"text":"System Designs","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/system-designs\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2016\/01\/1429543497dockerimg.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2016\/01\/1429543497dockerimg.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2016\/01\/1429543497dockerimg.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2016\/01\/1429543497dockerimg.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":12550,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2021\/02\/27\/migrating-from-heroku-to-hetzner-achieving-scalability-with-docker-kubernetes-and-rancher\/","url_meta":{"origin":293,"position":2},"title":"Migrating from Heroku to Hetzner: Achieving Scalability with Docker, Kubernetes and Rancher","author":"Mario Koch","date":"27. February 2021","format":false,"excerpt":"Dockerizing an existing application and deploying it in a Kubernetes Cluster via Rancher to achieve better scalability and cost minimization. Load Testing with Artillery, Monitoring with Prometheus & Grafana and GitHub Actions for CI\/CD were used in the process.","rel":"","context":"In &quot;Allgemein&quot;","block_context":{"text":"Allgemein","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/allgemein\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2021\/02\/vidar-nordli-mathisen-y8TMoCzw87E-unsplash-1-scaled.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2021\/02\/vidar-nordli-mathisen-y8TMoCzw87E-unsplash-1-scaled.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2021\/02\/vidar-nordli-mathisen-y8TMoCzw87E-unsplash-1-scaled.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2021\/02\/vidar-nordli-mathisen-y8TMoCzw87E-unsplash-1-scaled.jpg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2021\/02\/vidar-nordli-mathisen-y8TMoCzw87E-unsplash-1-scaled.jpg?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2021\/02\/vidar-nordli-mathisen-y8TMoCzw87E-unsplash-1-scaled.jpg?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":149,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2016\/01\/03\/more-docker-more-power-part-1-setting-up-virtualbox\/","url_meta":{"origin":293,"position":3},"title":"More docker = more power? \u2013 Part 1: Setting up VirtualBox","author":"Tobias Schneider","date":"3. January 2016","format":false,"excerpt":"This series of blogposts will focus on the effects on response times when performing different tasks running on a variable number of docker containers in a virtual machine. What will be the performance differences running a small or large number of containers on the same machine? These posts will function\u2026","rel":"","context":"In &quot;System Designs&quot;","block_context":{"text":"System Designs","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/system-designs\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2016\/01\/1429543497dockerimg.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2016\/01\/1429543497dockerimg.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2016\/01\/1429543497dockerimg.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2016\/01\/1429543497dockerimg.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1299,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2016\/08\/16\/exploring-docker-security-part-2-container-flaws\/","url_meta":{"origin":293,"position":4},"title":"Exploring Docker Security &#8211; Part 2: Container flaws","author":"Patrick Kleindienst","date":"16. August 2016","format":false,"excerpt":"Now that we've understood the basics, this\u00a0second part will\u00a0cover the most relevant container threats, their possible impact as well as\u00a0existent countermeasures. Beyond that, a short overview\u00a0of the most important sources for container threats will be provided. I'm pretty sure you're not counting on most\u00a0of them. Want to know more? Container\u2026","rel":"","context":"In &quot;Secure Systems&quot;","block_context":{"text":"Secure Systems","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/system-designs\/secure-systems\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2023\/08\/article-1301858-0ABD7881000005DC-365_964x543.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2023\/08\/article-1301858-0ABD7881000005DC-365_964x543.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2023\/08\/article-1301858-0ABD7881000005DC-365_964x543.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2023\/08\/article-1301858-0ABD7881000005DC-365_964x543.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":21651,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2021\/09\/18\/deploy-random-chat-application-on-aws-ec2-with-kubernetes\/","url_meta":{"origin":293,"position":5},"title":"Deploying Random Chat Application on AWS EC2 with Kubernetes","author":"dv029","date":"18. September 2021","format":false,"excerpt":"1. Introduction For the examination of the lecture \u201cSoftware Development for Cloud Computing\u201d, I want to build a simple Random Chat Application. The idea of this application is based on the famous chat application called Omegle. Omegle is where people can meet random people in the world and can have\u2026","rel":"","context":"In &quot;Cloud Technologies&quot;","block_context":{"text":"Cloud Technologies","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/scalable-systems\/cloud-technologies\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2021\/09\/image-19.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"authors":[{"term_id":688,"user_id":8,"is_guest":0,"slug":"ts144","display_name":"Tobias Schneider","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/70f05efe954847d5dc6a4258b188ef70b9eb4bbcb9685346bfe9f02979342ed8?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts\/293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/comments?post=293"}],"version-history":[{"count":6,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts\/293\/revisions"}],"predecessor-version":[{"id":24655,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts\/293\/revisions\/24655"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/media\/182"}],"wp:attachment":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/media?parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/categories?post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/tags?post=293"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/ppma_author?post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}