From 2942fa9c896273c21a299b19ba0b136485c4a70d Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Wed, 17 Jul 2024 15:14:34 -0700 Subject: [PATCH] update sidekick README.md with latest information --- README.md | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index e9f413d..2292e4d 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,11 @@ ![GitHub Downloads][gh-downloads] -*sidekick* is a high-performance sidecar load-balancer. By attaching a tiny load balancer as a sidecar to each of the client application processes, you can eliminate the centralized loadbalancer bottleneck and DNS failover management. *sidekick* automatically avoids sending traffic to the failed servers by checking their health via the readiness API and HTTP error returns. +*sidekick* is a high-performance sidecar load balancer. By attaching a tiny load balancer to each client application process, you can eliminate the need for a centralized load balancer and DNS failover management. *sidekick* automatically avoids sending traffic to the failed servers by checking their health via the readiness API and HTTP error returns. # Architecture ![architecture](https://raw.githubusercontent.com/minio/sidekick/master/arch_sidekick.png) -**Demo** ![sidekick-demo](https://raw.githubusercontent.com/minio/sidekick/master/sidekick-demo.gif) - # Install ## Binary Releases @@ -33,7 +31,7 @@ minisign -Vm sidekick-- -P RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRy Pull the latest release via: ``` -docker pull quay.io/minio/sidekick:v4.0.6 +docker pull quay.io/minio/sidekick:v7.0.0 ``` ## Build from source @@ -42,8 +40,9 @@ docker pull quay.io/minio/sidekick:v4.0.6 go install -v github.com/minio/sidekick@latest ``` +> [!IMPORTANT] > You will need a working Go environment. Therefore, please follow [How to install Go](https://golang.org/doc/install). -> Minimum version required is go1.17 +> The minimum version required is go1.22 # Usage @@ -52,18 +51,17 @@ NAME: sidekick - High-Performance sidecar load-balancer USAGE: - sidekick COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...] + sidekick - [FLAGS] SITE1 [SITE2..] -COMMANDS: - help, h Shows a list of commands or help for one command - FLAGS: --address value, -a value listening address for sidekick (default: ":8080") --health-path value, -p value health check path --read-health-path value, -r value health check path for read access - valid only for failover site --health-port value health check port (default: 0) --health-duration value, -d value health check duration in seconds (default: 5s) + --health-timeout value health check timeout in seconds (default: 10s) --insecure, -i disable TLS certificate verification + --rr-dns-mode enable round-robin DNS mode --log, -l enable logging --trace value, -t value enable request tracing - valid values are [all,application,minio] (default: "all") --quiet, -q disable console messages @@ -74,6 +72,11 @@ FLAGS: --client-key value client private key file --cert value server certificate file --key value server private key file + --pprof :1337 start and listen for profiling on the specified address (e.g. :1337) + --dns-ttl value choose custom DNS TTL value for DNS refreshes for load balanced endpoints (default: 10m0s) + --errors, -e filter out any non-error responses + --status-code value filter by given status code + --host-balance value specify the algorithm to select backend host when load balancing, supported values are 'least', 'random' (default: "least") --help, -h show help --version, -v print the version ``` @@ -91,14 +94,14 @@ http://minio1:9000 to http://minio4:9000 $ sidekick --health-path=/minio/health/ready --address :8000 http://minio{1...4}:9000 ``` -### Load balance across 2 sites with 4 servers each +### Load balance across two sites with four servers each ``` $ sidekick --health-path=/minio/health/ready http://site1-minio{1...4}:9000 http://site2-minio{1...4}:9000 ``` ## Realworld Example with spark-operator -With spark as *driver* and sidecars as *executor*, first install spark-operator and MinIO on your kubernetes cluster. +With spark as *driver* and sidecars as *executor*, first install spark-operator and MinIO on your Kubernetes cluster. ### Configure *spark-operator* @@ -137,7 +140,7 @@ mc cp /etc/hosts myminio/mybucket/mydata.txt ### Run the spark job in k8s -Obtain the ip address and port of the `minio` service. Use them as input to `fs.s3a.endpoint` the below SparkApplication. e.g. http://10.43.141.149:80 +Obtain the IP address and port of the `minio` service. Use them as input to `fs.s3a.endpoint` the below SparkApplication. e.g. http://10.43.141.149:80 ``` kubectl --namespace tenant-sidekick get svc/minio ``` @@ -213,6 +216,6 @@ kubectl --namespace spark-operator logs -f spark-minio-app-driver #### Monitor -The above SparkApplication will not complete until the Health check returns "200 OK"; in this case when there is MinIO read quorum. The Health check is provided at the path "/v1/health". It returns "200 OK" even if any one of the sites is reachable, else it returns "502 Bad Gateway" error. +The above SparkApplication will not complete until the Health check returns "200 OK", in this case, when there is a MinIO read quorum. The Health check is provided at the path "/v1/health." It returns "200 OK" even if any one of the sites is reachable; otherwise, it returns a "502 Bad Gateway" error. [gh-downloads]: https://img.shields.io/github/downloads/minio/sidekick/total?color=pink&label=GitHub%20Downloads