Skip to content

ykh/url-shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Shortener Project

How to Run The Project

Step 1: Run ZooKeeper Service

cd to/counter_service/directory

# OPTIONAL: Take a look on the ZooKeeper config file at `configs/zoo.cfg` for any desire changes.
vim ./configs/zoo.cfg

# To build docker image and up a container:
make up
# in case for detached mode, run following:
make up-detached

# For more information and examples:
make help

Step 2: Run App

cd to/url_shortner_service/directory

# Create env files using their templates.
cp ./envs/app.env.example ./envs/app.env
cp ./envs/app_db.env.example ./envs/app_db.env
cp ./envs/redis.env.example ./envs/redis.env
cp ./env.example ./.env

# Adjust env variables with appropriate values.
vim ./envs/app.env
vim ./envs/app_db.env
vim ./envs/redis.env
vim ./.env

# To build docker image and up a container:
make build-up
# in case for detached mode, run following:
make build-up-detached

# For more information and examples:
make help

How to Run Unit and Integration Tests

cd to/url_shortner_service/directory

# To run unit tests:
make tests-unit

# To run integration tests:
make tests-integration

# For more information and examples:
make help

How to Run Load-Tests, Using Locust in Multiple Machines Mode

cd to/load_test_service/directory

# Create env files using their templates.
cp ./envs/locust.env.example ./envs/locust.env
cp ./env.example ./.env

# Adjust env variables with appropriate values.
vim ./envs/locust.env
vim ./.env

# Build and up Locust master container.
make build-up-master

# Build, up and scale Locust worker containers with 5 instances.
make build-up-scale-workers scale=5

# Now, you can see the Locust web interface for running the tests on `LOCUST_EXPOSED_PORT` port number.
# e.g http://127.0.0.1:7357/

# For more information and examples:
make help

Documents

About

URL Shortener Scalable Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published