We have created a cloud-service based application which uses highly decoupled microservices to serve user with music and playlist. To support this functionality, we build upon the cloud architecture developed in the CMPT756 assignments and add a new microservice called ‘playlist’. We have also experimented with scaling and loading of the system to test the resilience of the application. For the analysis and inference purpose, we have used Grafana, Prometheus and Kiali and triggered the load using Gatling. Below we discuss the details of our cluster architechture.
The main components of this project are:
We used ek8.mak to setup the cluster with minimum three nodes of type t3.medium in US-West-2 Region.
The application incorporates five microservices. In addition to the already present User and Music microservices, we created an additional Playlist microservice that provides users the capability to organize their music into custom playlists. The service was written in Flask, and provides users the capability to create, view and delete their playlists.
The Grafana and Kiali dashboard has been set up to view the traffic and effect on the system under stable load and after increasing the load, where load is simulated using Gatling tool. We first begin by giving a static load to our system using a Gatling script, where we send requests for 10 users per service, reaching about 3.5K total requests per minute . We monitor the effects using Grafana dashboard and Kiali dashboard. To encounter the failues coming up from the increasing the load, we scale the system by either increasing numnber of replicas for db service or increasing the number of nodes for the cluster.
We experiment with the resilience of the system by deliberately introducing the failures like HTTP delays and timeouts and implementing traffic-shifting deployments. To simulate these behaviours, we make traffic policy changes in respective *-vs.yaml files and deploy the files to the running cluster to see changes in real time.
Regardless of where your cluster will run, it uses AWS DynamoDB for its backend database. Check that you have the necessary tables installed by running
$ aws dynamodb list-tables
The resulting output should include tables User
, Music
and Playlist
.