Skip to content

Enable girder scaling#685

Merged
subdavis merged 6 commits intomainfrom
scale-girder
Apr 8, 2021
Merged

Enable girder scaling#685
subdavis merged 6 commits intomainfrom
scale-girder

Conversation

@subdavis
Copy link
Contributor

@subdavis subdavis commented Apr 7, 2021

We have a lot of CPUs that we can throw at providing better response times. Let's scale girder up.

This is probably what we should have done instead of provisioning a second server in AWS for the last demo.

Also enables rolling restart during updates for zero downtime a535e44

Screenshot from 2021-04-07 14-59-27

All the pretty colors

@subdavis subdavis requested a review from BryonLewis April 7, 2021 18:52
@aashish24
Copy link
Collaborator

So did I read it correctly.. we are using traefik for scaling it up? how does it work exactly and have we used it before?

@subdavis
Copy link
Contributor Author

subdavis commented Apr 7, 2021

No, we have not used traefik before.

Howerver, I personally have a lot of experience with it, and it I think it provides several improvements over nginx for this use case

  • Right now, nginx reverse proxy is not part of our service config, you have to deploy it by hand. We could let traefik take over as the external-facing proxy.
  • Letsencrypt cert management is something traefik can handle itself. We also do this by hand right now.
  • It's a docker solution, which means we can write the service configuration directly into our docker-compose file rather than having to bind mount an nginx configuration file.
  • It scales without having to reconfigure. docker-compose scale girder=4 instead instead of having to write 4 different gider services into our compose, and then write a new nginx configuration to go with it.

In order to build a reproducible deployment, we'd have to either write ansible for nginx, use an nginx reverse proxy container, or use traefik.

Alternatives:

It works by just doing round-robin load balancing across however many running containers there are.

Copy link
Collaborator

@BryonLewis BryonLewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of questions regarding traefik.

image: traefik:v2.4
container_name: traefik
command: >
--api.insecure=true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

totally new to traefik so maybe need a clarification here on the purpose of API besides debugging and the dashboard. Is it needed for load balancing.
https://doc.traefik.io/traefik/operations/api/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. We can disable it.

container_name: traefik
command: >
--api.insecure=true
--serversTransport.insecureSkipVerify=true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we eventually remove nginx guess we will want this disabled for prod?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a slightly misleading argument. It allows inscure SSL behind the proxy, not in front. So like if girder were sending self-signed certs. It can also be removed

@subdavis subdavis requested a review from BryonLewis April 7, 2021 21:03
@subdavis subdavis merged commit 615311c into main Apr 8, 2021
@subdavis subdavis deleted the scale-girder branch April 8, 2021 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants