GithubHelp home page GithubHelp logo

farely's Introduction

farely

Go

Farely load balancer

A load balancer supporting multiple LB strategies written in Go.

Goal

The goal of this project is purley educational, I started it as a brainstorming session in twitch.tv, and I ended up having fun to the point that I made it a project.

The balancer's main abstraction is a Service, each service has a name, a balancing strategy, and a group of identical replicas that can serve requests for the same service.

the service is configured via yaml file that is provided at startup, the most recent example can be found in the examples folder.

services: 
  - 
    matcher: /ui
    name: "Web UI"
    replicas: 
      - "http://192.168.23.1:8081"
      - "http://192.168.23.5:8082"
    strategy: RoundRobin
  - 
    matcher: /api/v1
    name: "Stateless API"
    replicas: 
      - "http://192.168.23.1:8081"
      - "http://192.168.23.5:8082"
    strategy: WeightedRoundRobin

Building a demo

If you want to try load balancer, you can run the demo server in the 'cmd/demo/main.go' directory, which starts up a hello world server listening to a specifi port.

Launching the load balancer is as easy as

go run cmd/farely/main.go --config-path /path/to/your/config/file

Or if you have an already built binary

./farely --config-path path/to/your/config

Contributing

Creating issues, and Adding features are always welcome, I leave pointers in the code for myself to remember to add tests / features, feel free to pick them up and address them.

This is a personal project, that is provided for use without any support, and for my own personal enjoyment, feel free to join me live to chat in twitch if you have questions or interested in contributing.

farely's People

Contributors

chermehdi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

farely's Issues

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.