GithubHelp home page GithubHelp logo

gjsbrt / hashed-weighted-round-robin Goto Github PK

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

Hashed weighted round robin is a load balancing algorithm that will distribute traffic between destinations based on a hash and weight of backends.

Go 100.00%
hash load-balancing round-robin weighted

hashed-weighted-round-robin's Introduction

Heyo, I'm Gijsbert!

Nice to meet you. I am a passionate self-taught full stack developer from the Netherlands. I primarily work on DutchIS, have a look if you are interessted ๐Ÿ˜.

GJSBRT

hashed-weighted-round-robin's People

Contributors

gjsbrt avatar

Watchers

 avatar

hashed-weighted-round-robin's Issues

Nice work.

This all seems pretty sound, although I'm not sure round-robin is the best description - more like weighted-hash?

The problem that you could run into is when you need to add or remove backends from the pool (eg. when reconfigured or a backend fails health checks). This would change to the length of the array, which makes a drastic change to selections of backends, and would break the majority of connections.

This can be avoided by using a consistent hashing algorithm which results in only losing around 1/n-th of the connections when the pool changes. Rendezvous hasing or Maglev are two examples - I found the worked example from page 32 onwards in this description of Google's internal project to be quite easy to follow:

https://www.usenix.org/sites/default/files/conference/protected-files/nsdi16_slides_eisenbud.pdf

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.