  {"id":13514,"date":"2019-03-27T10:48:34","date_gmt":"2019-03-27T14:48:34","guid":{"rendered":"https:\/\/carleton.ca\/webservices\/?p=13514"},"modified":"2024-06-08T09:43:52","modified_gmt":"2024-06-08T13:43:52","slug":"load-testing-with-artillery","status":"publish","type":"post","link":"https:\/\/carleton.ca\/webservices\/2019\/load-testing-with-artillery\/","title":{"rendered":"Load Testing with Artillery"},"content":{"rendered":"\n<section class=\"w-screen px-6 cu-section cu-section--white ml-offset-center md:px-8 lg:px-14\">\n    <div class=\"space-y-6 cu-max-w-child-5xl  md:space-y-10 cu-prose-first-last\">\n\n            <div class=\"cu-textmedia flex flex-col lg:flex-row mx-auto gap-6 md:gap-10 my-6 md:my-12 first:mt-0 max-w-5xl\">\n        <div class=\"justify-start cu-textmedia-content cu-prose-first-last\" style=\"flex: 0 0 100%;\">\n            <header class=\"font-light prose-xl cu-pageheader md:prose-2xl cu-component-updated cu-prose-first-last\">\n                                    <h1 class=\"cu-prose-first-last font-semibold !mt-2 mb-4 md:mb-6 relative after:absolute after:h-px after:bottom-0 after:bg-cu-red after:left-px text-3xl md:text-4xl lg:text-5xl lg:leading-[3.5rem] pb-5 after:w-10 text-cu-black-700 not-prose\">\n                        Load Testing with Artillery\n                    <\/h1>\n                \n                                \n                            <\/header>\n\n                    <\/div>\n\n            <\/div>\n\n    <\/div>\n<\/section>\n\n<figure class=\"wp-block-image aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1182\" height=\"665\" src=\"https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/shutterstock_11479420281.jpg\" alt=\"\" class=\"wp-image-13515\" srcset=\"https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/shutterstock_11479420281.jpg 1182w, https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/shutterstock_11479420281-512x288.jpg 512w, https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/shutterstock_11479420281-1024x576.jpg 1024w, https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/shutterstock_11479420281-320x180.jpg 320w, https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/shutterstock_11479420281-768x432.jpg 768w, https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/shutterstock_11479420281-360x203.jpg 360w, https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/shutterstock_11479420281-200x113.jpg 200w\" sizes=\"auto, (max-width: 1182px) 100vw, 1182px\" \/><\/figure>\n\n\n\n<p>In the ITS department the servers that run our mission critical software need routine maintenance and replacement. When we replace computer hardware we work with the vendor to know what performance level to expect, but these numbers are calculated in laboratory conditions. Real world implementation is very different from an isolated testing environment, so in the course of the replacement project it was important to collect and measure the difference in performance between the systems.<\/p>\n\n\n\n<p>To answer the question of the performance delta, we turn to load testing. Essentially, you use a tool to send a large amount of network traffic to the system you want to test. Generally the tools used to craft these tests allow you to specify certain behaviour patterns to follow.<\/p>\n\n\n\n<p>I worked closely with student support staff to determine what the most common performance issue are experienced, and we found one of the largest pain points to be the timetable calendar, and individual events. We determined it to be prudent to test a sustained load, representing average use, as well as a spike of traffic that mimics registration.<\/p>\n\n\n\n<p>After assessing a variety of options available on the market I landed on an javascript package called <a href=\"http:\/\/artillery.io\/\">Artillery<\/a>. Artillery is written in modern javascript and runs on a platform called nodejs. It can be obtained from the npm registry, and documentation can be found on the Artillery website. As a command line tool, Artillery is run from a terminal window and uses test cases you have written in the YAML scripting language. In the case of our script we log in with a test user account, navigate to the user\u2019s schedule, view an event, and then log out. Each of these actions returns a status code, which I monitor in real time as the tests run. When I no longer receive 200 OK responses from the server I know the server\u2019s CPU has been overwhelmed. We record and graph the server\u2019s load average during the tests with a piece of software called ORCA. When our tests are complete we are able to compare the results with our original hardware and can validate that the performance deltas are within expected levels.<\/p>\n\n\n\n<p>Load testing is an instrumental validation step in the IT hardware life cycle. Our systems are tied to mission critical processes, and we must ensure they are able to meet the performance needs of our users.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the ITS department the servers that run our mission critical software need routine maintenance and replacement. When we replace computer hardware we work with the vendor to know what performance level to expect, but these numbers are calculated in laboratory conditions. Real world implementation is very different from an isolated testing environment, so in [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[369],"tags":[],"class_list":["post-13514","post","type-post","status-publish","format-standard","hentry","category-carleton-cms"],"acf":{"cu_post_thumbnail":""},"_links":{"self":[{"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/posts\/13514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/comments?post=13514"}],"version-history":[{"count":0,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/posts\/13514\/revisions"}],"wp:attachment":[{"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/media?parent=13514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/categories?post=13514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/tags?post=13514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}