Carleton University - School of Computer Science Honours Project
Summer 2019
Applications of Horizontal Pod Autoscaling and Load Testing at Shopify
SCS Honours Project Image
ABSTRACT
Shopify’s CloudX team is responsible for providing tooling for developers to help them operate their applications easily and reliably. A key area of work this summer for CloudX has been the Horizontal Pod Autoscaling project. Our team investigated Kubernetes’s Horziontal Pod Autoscaler (HPA) resource and researched whether it made sense to implement it for Shopify applications. An HPA automatically scales the number of pods allocated for a target resource based on the load applied to a system. After confirming that multiple teams would benefit from the automatic scaling of deployment resources, CloudX decided to implement an HPA for one of its main applications, CloudPortal. This was done in order to better understand the process of developing and monitoring an HPA. Work was then done in Shopify’s k8s-template-validator repository to validate Horizontal Pod Autoscaler resource templates prior to deploying them. Following up on the HPA project, it seemed beneficial to perform load testing on the CloudPortal application. The purpose of this was twofold. Firstly, it would allow the HPA resource that was provisioned for the Portal to be validated and ensure that it was behaving appropriately. Secondly, it would allow the Portal to be tested for performance bottlenecks and ascertain that the system was capable of handling increased load. Working on building a load test system for CloudPortal led to an interesting challenge related to secrets encryption with Genghis, Shopify's load testing solution. Contributions were made to the Genghis application to support secret encryption using a Shopify-built library called EJSON. After enabling Genghis to handle secret management appropriately, a load testing flow was developed to target CloudPortal. It was used to confirm that the implemented HPA was set up correctly and to establish that CloudPortal could withstand an increased load with minimal impact on performance.