GithubHelp home page GithubHelp logo

rlepretre / load-balancing Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.05 MB

Load balancing PoC using nginx to redirect traffic to 2 docker containers running flasks servers. These are tasks to execute a C executable that determines wether or not a pair of x and y is part of the mandelbrot set.

Dockerfile 11.63% Python 30.40% C 32.74% HTML 25.24%

load-balancing's Introduction

Load balancing project - Mandelbrot Set

Description :

The GUI folder holds a javascripts client application that sends HTTPS requests to an Nginx server. These requests send x and y coordinate and expect a number of iterations. Depending on the amount of iterations for an x-y pair, it will plot a heatmap. This will draw the Mandelbrot set.

The nginx folder holds the Dockerfile and configuration file for the nginx server tasked with balancing the request load to the 2 Flask servers.

Finally, app1 and app2 folders are identical and contain the Flask server code as well as the C source code meant to do the heavy computing.

How to use :

  • To launch the APP, just open a terminal, go inside the unzipped folder, at the same level with docker-compose.yml, and execute : docker-compose up
  • This will spin up the dockerised architecture. After that, you need to open a browser and tape : http://localhost:8080
  • It will redirect 60% traffic to app1 and 40% traffic to app2.
  • To quit, you can just CTRL + C in the terminal and it will stop the application and destroy the created containers.

load-balancing's People

Contributors

rlepretre 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.