Skip to content

Commit

Permalink
Separate README.md to USAGE.md and ROADMAP.md
Browse files Browse the repository at this point in the history
  • Loading branch information
krapie committed Feb 9, 2024
1 parent 464e9eb commit 014127c
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 81 deletions.
84 changes: 3 additions & 81 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# plumber

Plumber is a L7 load balancer from scratch in Go
Plumber is a L7 load balancer from scratch in Go.

## Installation

Expand All @@ -15,91 +15,13 @@ make build

## Usage

Basic usage:

```bash
# Start the load balancer
./bin/plumber
```

Basic usage with docker-compose:

```bash
# Test the load balancer with docker-compose
make docker-compose-up

# Start the load balancer with target backend image for service discovery
./bin/plumber --target-backend-image traefik/whoami

# Send a request to the load balancer
chmod +x ./scripts/lb_distribution_test.sh
./scripts/lb_distribution_test.sh

# Cleanup the docker-compose
make docker-compose-down
```

Yorkie usage with docker-compose:

```bash
# Test the load balancer with docker-compose
make docker-compose-yorkie-up

# Start the load balancer with target backend image for service discovery
./bin/plumber --target-backend-image yorkieteam/yorkie

# Test with yorkie-js-sdk
git clone https://github.com/yorkie-team/yorkie-js-sdk.git
cd yorkie-js-sdk
npm install
sed -i html 's#http://localhost:8080#http://localhost#g' ./public/index.html
npm run dev

# Cleanup the docker-compose
make docker-compose-yorkie-down
```

Yorkie usage with Kubernetes:

```bash
# Start minikube with ingress addon
minikube start
minikube addons enable ingress

# Install Yorkie cluster with helm chart
helm install yorkie-cluster ./build/charts/yorkie-cluster

# Expose Yorkie cluster with Minikube tunnel
minikube tunnel

# Test with yorkie-js-sdk
git clone https://github.com/yorkie-team/yorkie-js-sdk.git
cd yorkie-js-sdk
npm install
sed -i html 's#http://localhost:8080#http://localhost#g' ./public/index.html
npm run dev

# Cleanup the minikube
minikube delete
```
For more usage, see [USAGE.md](./USAGE.md).

## Roadmap

Plumber aims to support [Yorkie](https://github.com/yorkie-team/yorkie) as a backend for the load balancer.
The following features are planned to be implemented first:

### v0.1.0

- [x] Support static load balancing with round-robin algorithm
- [x] Support backends health check

### v0.2.0

- [x] Support consistent hashing algorithm with maglev
- [x] Support backend service discovery with Docker API
- [x] Support mechanism to resolve split-brain of long-lived connection

### v0.3.x

- [x] Support backend service discovery with Kubernetes API
- [ ] TBD
See [ROADMAP.md](./ROADMAP.md) for more details.
24 changes: 24 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Roadmap

Plumber aims to support [Yorkie](https://github.com/yorkie-team/yorkie) as a backend for the load balancer.
The following features are planned to be implemented first:

### v0.1.0

- [x] Support static load balancing with round-robin algorithm
- [x] Support backends health check

### v0.2.0

- [x] Support consistent hashing algorithm with maglev
- [x] Support backend service discovery with Docker API
- [x] Support mechanism to resolve split-brain of long-lived connection

### v0.3.0

- [x] Support backend service discovery with Kubernetes API
- [x] Support Yorkie cluster helm chart

### v0.4.0

- [ ] TBD
75 changes: 75 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Usage

## Basic Usage

```bash
# Start the load balancer
./bin/plumber
```

## Docker Usage

We use Docker Compose to test Plumber.

```bash
# Test the load balancer with docker-compose
make docker-compose-up

# Start the load balancer with target backend image for service discovery
./bin/plumber --target-backend-image traefik/whoami

# Send a request to the load balancer
chmod +x ./scripts/lb_distribution_test.sh
./scripts/lb_distribution_test.sh

# Cleanup the docker-compose
make docker-compose-down
```

## Docker Usage with Yorkie

We use Docker Compose to test Plumber with Yorkie.

```bash
# Test the load balancer with docker-compose
make docker-compose-yorkie-up

# Start the load balancer with target backend image for service discovery
./bin/plumber --target-backend-image yorkieteam/yorkie

# Test with yorkie-js-sdk
git clone https://github.com/yorkie-team/yorkie-js-sdk.git
cd yorkie-js-sdk
npm install
sed -i html 's#http://localhost:8080#http://localhost#g' ./public/index.html
npm run dev

# Cleanup the docker-compose
make docker-compose-yorkie-down
```

## Kubernetes Usage with Yorkie

We use Minikube to test Plumber with Yorkie.

```bash
# Start minikube with ingress addon
minikube start
minikube addons enable ingress

# Install Yorkie cluster with helm chart
helm install yorkie-cluster ./build/charts/yorkie-cluster

# Expose Yorkie cluster with Minikube tunnel
minikube tunnel

# Test with yorkie-js-sdk
git clone https://github.com/yorkie-team/yorkie-js-sdk.git
cd yorkie-js-sdk
npm install
sed -i html 's#http://localhost:8080#http://localhost#g' ./public/index.html
npm run dev

# Cleanup the minikube
minikube delete
```

0 comments on commit 014127c

Please sign in to comment.