Coder Social home page Coder Social logo

khasanjon-dev / nginx-load-balancer-least-conn Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 19 KB

Load balancer with nginx algorithm Least Connections – A request is sent to the server with the least number of active connections, again with server weights taken into consideration

Python 86.57% Dockerfile 6.98% Shell 6.45%
django djangorestframework docker docker-compose load-balancer load-balancing-algorithm nginx python testing load-balancing nginx-config load-balancing-nginx

nginx-load-balancer-least-conn's Introduction

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=solve_the_problem
DB_PORT=5432

# POSTGRES
POSTGRES_USER=postgres
POSTGRES_PASSWORD=solve_the_problem
POSTGRES_DB=news

Run the project

step 1:

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

step 2

  • cd project file
cd nginx-load-balancer-least-conn

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

nginx-load-balancer-least-conn's People

Contributors

khasanjon-dev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.