Skip to content

Load balancer with nginx algorithm Round Robin – Requests are distributed evenly across the servers, with server weights taken into consideration. This method is used by default (there is no directive for enabling it)

Notifications You must be signed in to change notification settings

khasanjon-dev/nginx-load-balancer-round-robin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Env variables

# WEB
# DEBUG must be empty in production
DEBUG=
SECRET_KEY=django-insecure
DJANGO_SETTINGS_MODULE=root.settings
# DATABASE
DB_HOST=db
DB_NAME=news
DB_USERNAME=postgres
DB_PASSWORD=helloworld
DB_PORT=5432
# POSTGRES
POSTGRES_USER=postgres
POSTGRES_PASSWORD=helloworld
POSTGRES_DB=news

Run the project

step 1:

  • clone the project
git clone https://github.com/khasanjon-dev/nginx-load-balancer-round-robin.git

step 2

  • cd project file
cd nginx-load-balancer-round-robin

step 3

docker compose up --build

step 4

  • open the new terminal and run this command for testing
python test.py

Technologies used

  • Python
  • Django
  • DjangoRestFramework
  • Docker
  • docker compose
  • PostgreSQL
  • Nginx

About

Load balancer with nginx algorithm Round Robin – Requests are distributed evenly across the servers, with server weights taken into consideration. This method is used by default (there is no directive for enabling it)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published