Skip to content

Latest commit

 

History

History
57 lines (32 loc) · 996 Bytes

README.md

File metadata and controls

57 lines (32 loc) · 996 Bytes

Ticketing System with Envoy


Run

Please make sure Docker is installed and running.


Build the containers.

docker-compose build --pull

Start all the containers.

docker-compose up -d

Show all the running docker containers.

docker-compose ps

Run the server.

python3 service.py

Database

Docker Desktop > Containers > mysql-server > Terminal

exec mysql -h mysql-server -P 3306 -u root -psecret

Query

USE ds_prj
SELECT * FROM ticket_order;

Load Balancing

Scale service3 to 3 instances.

docker-compose up --scale service3=3 -d

Show all the running docker containers.

docker-compose ps

Send request to service3 multiple times.

docker-compose exec -T front-envoy bash -c "\
               curl -s http://localhost:8080/service/3 \
               && curl -s http://localhost:8080/service/3 \
               && curl -s http://localhost:8080/service/3" \
               | grep hostname