Coder Social home page Coder Social logo

demonware / balanced Goto Github PK

View Code? Open in Web Editor NEW
37.0 9.0 7.0 95 KB

BalanceD is a Layer-4 Linux Virtual Server (LVS) based load balancing platform for Kubernetes.

License: Apache License 2.0

Dockerfile 0.33% Makefile 0.72% Go 98.58% Shell 0.38%
balanced ipvs kubernetes k8s network loadbalancer ecmp consistent hashing elb

balanced's Introduction

Go Report Card

BalanceD is a Layer-4 Linux Virtual Server (LVS) based load balancing platform for Kubernetes.

It is capable of providing basic load balancing for any Kubernetes cluster and is reliable and performant. This is achieved by utilizing LVS (also known as IPVS - IP Virtual Server), along with any Consistent-Hashing algorithm, to implement a stateless Direct-Server-Return (DSR) Layer-4 load balancer. The stateless nature means it can be horizontally scaled with the help of AnyCast and ECMP.

Above all, it is designed with modularity in mind which makes BalanceD very simple to operate and maintain.

BalanceD is meant to be placed alongside an existing Kubernetes networking solution, and is NOT a turnkey solution for Kubernetes networking such as kube-router, which was an inspiration for this project.

Status

BalanceD is being used in several production clusters to power the most demanding online game services at Demonware! Core functionality is considered stable.

Requirements

BalanceD requires two LVS/IPVS nodes at minimum for redundancy purposes - these can either be physical machines or virtual instances. Each node must be part of the Kubernetes cluster and can route to all Pods through their respective Pod IPs. Each node must be configured to act as BGP peers to advertise the VIP addresses to the rest of the network. For flexibility, BalanceD does not bundle a BGP speaker allowing for a more seamless integration with the network. A BIRD configuration is available here as a reference.

Kubernetes

BalanceD has been tested on versions Kubernetes >= 1.9. If kube-proxy is running in IPVS mode, the ipvs-controller of BalanceD must run in Pod Networking Mode to avoid conflict with IPVS.

Operating System

BalanceD was tested to operate on Linux kernels >= 4.4. However, it should work in theory with any modern kernels with decent LVS/IPVS support.

Supported CNI Plugins

This has been tested to work with:

Getting Started

Build

Docker

make images to build all controllers.

Golang

Go version 1.12 or above is required to build BalanceD
make build to build all controllers.

Acknowledgement

BalanceD is built upon following open-source libraries:

and many more!

BalanceD has also been inspired by:

Support and Feedback

Feel free to leave feedback or raise any questions by opening an issue here.

Contributing

We encourage all kinds of contributions! Feel free to submit a PR!

balanced's People

Contributors

ottoyiu avatar oyiu-dw 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

balanced'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.