minio / sidekick

High Performance HTTP Sidecar Load Balancer
GNU Affero General Public License v3.0
546 stars 82 forks source link

sidekick and minio behind reverse proxy #56

Closed 12nick12 closed 3 years ago

12nick12 commented 3 years ago

with the command below I would expect it to have rclone use the https://1.api.domain.com URL. Within the LB https://1.api.domain.com appears to flap when trying a rclone copy. If I change https://1.api.domain.com to http://127.0.0.1:9199 then it works like everything is proxying through sidekick. From my understanding shouldn't the client redirect to 1.api.domain.com

./sidekick --health-path=/minio/health/ready --address :8000 https://1.api.domain.com

NGiNX Config for minio: https://sndit2.me/raw/5dc3wzl5.txt NGiNX Config for sidekick: https://sndit2.me/raw/3k4kc06g.txt

harshavardhana commented 3 years ago

with the command below I would expect it to have rclone use the https://1.api.domain.com URL. Within the LB https://1.api.domain.com appears to flap when trying a rclone copy. If I change https://1.api.domain.com to http://127.0.0.1:9199 then it works like everything is proxying through sidekick. From my understanding shouldn't the client redirect to 1.api.domain.com

No client won't redirect anywhere sidekick is not a redirection service its a proxy service.

12nick12 commented 3 years ago

OK. So each minio server should be set up like the below and then sidekick would proxy as needed?

nginx -> sidekick -> minio_servers

So this would mean regardless of which minio server I connect to they will all connect to eachother? If that makes sense

so the front end would have one IP (for public user/NGiNX) and the sidekick would connect to minio (via a private IP/directly via http:port).

Does sidekick pass the host header allow with the request?

harshavardhana commented 3 years ago

If you are using nginx you don't need sidekick - sidekick is meant to be run right next to the application it is not meant to be used anywhere else. @12nick12

harshavardhana commented 3 years ago

Look at the architecture diagram here https://github.com/minio/sidekick#architecture

12nick12 commented 3 years ago

OK, but the diagram shows sidekick in front of all four instances, so what does that solve instead of just having a single LB like you usually would (this diagram only shows the single one)? I'm just trying to wrap my head around sidekick vs haproxy/nginx.

harshavardhana commented 3 years ago

OK, but the diagram shows sidekick in front of all four instances, so what does that solve instead of just having a single LB like you usually would (this diagram only shows the single one)? I'm just trying to wrap my head around sidekick vs haproxy/nginx.

Diagram shows sidekick right next to application @12nick12