Giter VIP home page Giter VIP logo

sre-interview-task-web3's Introduction

Interview Cloud Load Balancer

Overview

This project implements a lightweight load balancer written in Go Lang. It supports distributing incoming HTTP and WebSocket traffic across multiple backend servers.

  • HTTP and WebSocket Support: Handles both HTTP requests and WebSocket connections.
  • Load Balancing Algorithm: Currently supports a configurable load balancing algorithm (default: round robin).
  • Health Checks: Monitors the health of backend servers and removes unhealthy ones from the pool. (Nice to be have)
  • Configuration: Configuration options for load balancing algorithm, health check intervals, and backend server addresses.

Getting Started

Prerequisites

Clone the repository

git clone [email protected]:groschovskiy/sre-interview-task-web3.git

Build the load balancer

cd sre-interview-task-web3
go mod tidy
go build -o cloud-lb ./cmd/main.go

Run the load balancer

./cloud-lb -config config.json

Run the testing containers

cd scripts
docker-compose up -d

Go Directories

/cmd

Main applications for this project.

/scripts

Scripts to perform various build, install, analysis, etc operations. For a seamless testing experience, consider leveraging the docker-compose.yaml file, which provides an additional layer of flexibility and ease-of-use for testing your backend services.

/internal

Private application and library code.

/configs

Configuration file templates or default configs.

sre-interview-task-web3's People

Contributors

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