Giter Site home page Giter Site logo

robszollosi / networking Goto Github PK

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

The project is a simple web load balancer implemented in python that uses HTTP redirection.

Python 93.52% HTML 6.48%
networking-in-python socket-programming http-redirects

networking's Introduction

Networking - Web Load Balancer

To use the balancer as described in this assignment you will need 3 directories 
with the following files:

1. client_dir - client.py

2. balancer_dir - balancer.py, 301.html, 404.html, 501.html, 505.html, config.txt

3. server_dir - server.py, 404.html, 501.html, 505.html, testing.jpg, + other files 
that the client will request to download

server
------

To run the server, simply execute:

  python server.py

potentially substituting your installation of python3 in for python depending
on your distribution and configuration.  The server will report the port 
number that it is listening on for your client to use.  Place any files to 
transfer into the same directory as the server.

balancer
--------

To run the balancer, execute:

  python3 balancer.py config.txt

where config.txt is a file containing the host:port for each server that you want 
to have incduced in the web load balancing (each host:port should be on a new line).
I have included a sample config.txt that I used for testing, so you can just edit 
it as necessary.

client
------

To run the client, execute:

  python3 client.py http://host:port/file

where host is where the balancer is running (e.g. localhost), port is the port 
number reported by the balancer where it is running and file is the name of the 
file you want to retrieve.  Again, you might need to substitute python3 in for
python depending on your installation and configuration.

if you wish to bypass the balancer and simply connect to the server as in asn2, 
then simply substitute the balncer host:port for that of the server that you would
like to connect to instead.

networking's People

Contributors

robszollosi avatar

Stargazers

 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.