Happy New Year Everyone
This is the first blog post for the 2020, i Wish everyone will have healthy and wonderful year, may your dreams come true.
I post recently or let’s say Last Year about Full automation project using DevOps tools, and i didn’t to be honest except that much download and questions on that post. you can read it from here.
I decided to create new project but this time to show the power of DevOps and how to use it more in your daily Job, task or even configuration.
The idea of this project like the following:-
- You have two code, one Go based application, one Java-based application. Both are providing an HTTP service with the same endpoints.
- The Endpoints which is :-
Route | Description |
/ | A static site. Should not appear in the final setup as it is but redirect to /hotels. |
/hotels | JSON object containing hotel search results |
/health | Exposes the health status of the application |
/ready | Readiness probe |
/metrics | Exposes metrics of the application |
We have to setup Load Balancer for this application to be like the following :-

traffic distribution should be as follows: 70% of the requests are going to the application written in Go, 30% of the requests are going to the application written in Java, also i will do it using Docker
I upload the code, and the application ( the two part which is Go application and Java) to my Github HERE, all the configuration has been uploaded to my github,
The Solution files like the below;
-
docker-compose.yml
file in root directory is the main compose file for setting up containers for all services go-app
directory contains binary of Golang Application andDockerfile
of relavant setupjava-app
directory contains binary of Java Application andDockerfile
of relavant setupload-balancer
directory containsnginx.conf
file which is configuration file of Nginx and have load balancer rules written in it. And containers aDockerfile
for setting upNginx
with defined configurations
The final architecture will be like this instead of the image you saw above

Enjoy And Happy New Year
Osama Mustafa (The Guy who known as OsamaOracle)