Skip to content

Commit 3e0d9fd

Browse files
author
SamSyntax
committed
fixing README
1 parent 5fc4fe6 commit 3e0d9fd

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ This Go project implements a load balancer that supports two balancing methods:
2121

2222
### Example Usage
2323

24-
1. **Spawn Local Servers** (5 servers, round-robin method):
25-
```bash
26-
go run *.go -amount 5 -method rr -env local
24+
1.**Spawn Local Servers** (5 servers, round-robin method):
25+
```bash
26+
go run *.go -amount 5 -method rr -env local
2727
Use External Servers from a JSON File (weighted round-robin method):
2828

2929
```bash
@@ -37,7 +37,7 @@ go run *.go -method rr -env external -path ./servers.yaml
3737
### Configuration File Format
3838
When using the -env external flag, the load balancer will read server information from a configuration file. You can provide the file in either YAML or JSON format.
3939

40-
# Sample YAML Configuration (servers.yaml)
40+
## Sample YAML Configuration (servers.yaml)
4141
```yaml
4242
---
4343
- addr: https://facebook.com
@@ -47,7 +47,7 @@ When using the -env external flag, the load balancer will read server informatio
4747
- addr: https://google.com
4848
weight: 3
4949
```
50-
# Sample JSON Configuration (servers.json)
50+
## Sample JSON Configuration (servers.json)
5151
```json
5252
[
5353
{
@@ -64,14 +64,14 @@ When using the -env external flag, the load balancer will read server informatio
6464
}
6565
]
6666
```
67-
# How It Works
68-
## Load Balancing Methods
67+
## How It Works
68+
### Load Balancing Methods
6969
Round Robin (rr): Distributes requests evenly across all available servers.
7070
Weighted Round Robin (wrr): Distributes requests based on the weight assigned to each server. Servers with higher weights receive more traffic.
7171
Local Server Spawning
7272
When using -env local, the program spawns a number of local servers on ports starting from 8000 (e.g., localhost:8000, localhost:8001, etc.).
7373

74-
## External Servers
74+
# External Servers
7575
When using -env external with the -path flag, the load balancer reads external server addresses from the specified JSON or YAML file and balances requests accordingly.
7676

7777
## Example Output

0 commit comments

Comments
 (0)