Converting mp4 videos to mp3 in a microservices architecture.
We implemented the following metrics:
-
A metric that allow us to track how many request we are processing
-
We used prometheus to collet metrics data and grafana to visualize them
We created Helm Charts (for MongoDB, Postgres and RabbitMQ) that Argo CD will use for automated deployment. Once Argo CD observes a change in the infrastructure desired state in the github repository, it will apply those changes.
We used Terraform which is an IAC tool to provision infrastructure and set-up the first Helm charts. We built 5 well isolated and maintainable infrastructure layers (Microstacks):
- Layer0: Defining and configuring Auzre remote backend
- Layer1: Provisioning an Azure Kubernetes Cluster (uses remote backend from layer0)
- Layer2: Provisioning MongoDB, Postgres, and RabbitMQ ressources based on the helm charts that we prepared
- Layer3: Adding Prometheus and Grafana to the provisioned cluster
- Layer4: Provisioning and setting up ArgoCD
We built the app using Docker and then Kubernetes for deployment
We used Rolling release deployment strategy to have the monitoring and rollback advantages
- Login endpoint
POST http://gateway.3001cf25469d4824b0ad.westeurope.aksapp.io/login
curl -X POST http://gateway.3001cf25469d4824b0ad.westeurope.aksapp.io/login -u <email>:<password>
- Upload endpoint
POST http://gateway.3001cf25469d4824b0ad.westeurope.aksapp.io/upload
curl -X POST -F 'file=@./video.mp4' -H 'Authorization: Bearer <JWT Token>' http://gateway.3001cf25469d4824b0ad.westeurope.aksapp.io/upload
- Download endpoint
GET http://gateway.3001cf25469d4824b0ad.westeurope.aksapp.io/download?fid=<Generated file identified>
curl --output video.mp3 -X GET -H 'Authorization: Bearer <JWT Token>' "http://gateway.3001cf25469d4824b0ad.westeurope.aksapp.io/download?fid= <Generated fid>"