This project is a course management system.
There is 2 microservices in this project. The first microservice is a course service in which we can see the list of all courses, delete courses and add courses.
The second microservice is a teacher service in wich we can see the list of all teachers, add teachers and delete teachers. We can also see the list of courses for a particular teacher, or add a course or also delete a course.
These two microservices connects with an external database Atlas MongoDB
So I started by dockerizing my two services then I Created Yaml files to deploy it in kubernetes.
I will use Canary because:
- version released for a subset of users
- convenient for error rate and performance monitoring
- fast rollback
For the metrics I worked with Prometheus for that i used prom-client. And I installed Prometheus in my cluster using helm chart.
My metrics are counters.
- We have all_requests:
- For the buisiness metric we can use all_requests with a filter in the http POST.
For better Visualization, I used grafana and I installed it in my cluster using the helm chart:
For Logging I used winston Logger and i configure it in my services then I installed the datadog agent in my cluster so that I can see the logs in Datadog.
As we see, we have request ID of the log so that we can filter the logs by ID.
Also we have a rate limit user requests based on their IP address. For that I used express rate limit package.
I used Terraform to automate various infrastructure tasks. So I created three stacks and I used a backend state(Azure Storage Account).
I created a new ressource group and an aks cluster.
In this layer I automated the deployment of my application using helm charts and I also set up the ingress in my cluster.
In this layer I set up the monitoring using helm chart. We have set up prometheus, grafana and datadog.