{"id":3094,"date":"2018-06-07T08:12:38","date_gmt":"2018-06-07T14:12:38","guid":{"rendered":"http:\/\/www.mooreds.com\/wordpress\/?p=3094"},"modified":"2018-06-07T08:12:38","modified_gmt":"2018-06-07T14:12:38","slug":"using-aws-for-load-testing-experimentation","status":"publish","type":"post","link":"https:\/\/www.mooreds.com\/wordpress\/archives\/3094","title":{"rendered":"Using AWS for load testing experimentation"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-medium wp-image-3095\" src=\"http:\/\/www.mooreds.com\/wordpress\/wp-content\/uploads\/2018\/06\/crossfit-534615_640-300x200.jpg\" alt=\"Someone with heavy weight\" width=\"300\" height=\"200\" srcset=\"http:\/\/edit.mooreds.com\/wordpress\/wp-content\/uploads\/2018\/06\/crossfit-534615_640-300x200.jpg 300w, http:\/\/edit.mooreds.com\/wordpress\/wp-content\/uploads\/2018\/06\/crossfit-534615_640.jpg 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/>The cloud is amazing for load testing your system. If you design your system to be behind a load balancer (which, in many applications, means pushing state to a database and having stateless compute nodes), you can easily switch out those nodes in different scenarios.<\/p>\n<p>I just load tested a system I&#8217;m working on and changing out the compute nodes was fairly easy. Once I&#8217;d built a number of servers (something I scripted partially but didn&#8217;t fully automate because the return wasn&#8217;t there) and troubleshot some horizontal scaling issues that popped up in the application, I was able to:<\/p>\n<ul>\n<li>take a server out of service behind the load balancer<\/li>\n<li>stop it<\/li>\n<li>change the instance type<\/li>\n<li>start it<\/li>\n<li>re-run any needed config changes on the server<\/li>\n<li>update DNS if needed (depending on if you have a pinned IP address or not)<\/li>\n<li>add it back to the load balancer<\/li>\n<\/ul>\n<p>Swap out a few instances and you have a new setup for your load test. When you are done, follow the process in reverse to save yourself some money.<\/p>\n<p>Incidentally, increasing the number or size of compute nodes didn&#8217;t have the desired effect of being able to handle more load.<\/p>\n<p>What turned out to be the root issue? The database was pegged, both in terms of CPU and connections. Just goes to show that when you&#8217;re load testing, you really need to be looking at different aspects of the system, thinking about where your weak bottlenecks are, and use the scientific method of hypothesis, experiment, result.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The cloud is amazing for load testing your system. If you design your system to be behind a load balancer (which, in many applications, means pushing state to a database [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[79,39],"tags":[],"class_list":["post-3094","post","type-post","status-publish","format-standard","hentry","category-aws","category-cloud-computing"],"_links":{"self":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/3094","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/comments?post=3094"}],"version-history":[{"count":1,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/3094\/revisions"}],"predecessor-version":[{"id":3096,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/3094\/revisions\/3096"}],"wp:attachment":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/media?parent=3094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/categories?post=3094"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/tags?post=3094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}