Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Containerize load balancer #12

Open
DelusionalOptimist opened this issue Oct 4, 2022 · 4 comments
Open

Containerize load balancer #12

DelusionalOptimist opened this issue Oct 4, 2022 · 4 comments
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed

Comments

@DelusionalOptimist
Copy link
Member

Context?

The way you would use the load balancer right now:

  • Run the backend services using docker-compose up - This runs your services in docker containers managed by compose.
  • Run load balancer using the binary (./docker-lb) - This runs the load balancer as a process in your system (outside containers)

What's wrong with this?

  • It would make more sense to run the load balancer in a container as well.

So what changes can be done?

  • Create a docker image for the LB.
  • Figure out how networking would work - since we're running the lb in a different network namespace than that of host (container) now.
  • Restructure demo services accordingly.

Note

Comment below if you'd like to work on this issue to indicate your interest and let us know so that we can assign you! 😄

@DelusionalOptimist DelusionalOptimist added enhancement New feature or request help wanted Extra attention is needed hacktoberfest labels Oct 4, 2022
@hitman04
Copy link

hitman04 commented Oct 5, 2022

I am intrested in doing work
But i don't know anything about it (1st year)

@DelusionalOptimist
Copy link
Member Author

Hey @hitman04! Thanks for showing interest. 😄

Since you're new to Docker, I'll suggest starting out with https://github.com/Shreyas220/loadbalancer/issues/9 first to get a bit familiar.
In that issue, you'll basically create a github workflow which will build a docker image and push it to dockerhub.

A few resources to help you:
Documentation on github actions - https://docs.github.com/en/actions
A guide on building docker images - https://docs.docker.com/engine/reference/commandline/image_build
Github actions for building and pushing images - https://github.com/docker/build-push-action
A guide on Git and Github - https://wiki.ossdevs.com/tools/vcs.html

@gfelixc
Copy link

gfelixc commented Oct 23, 2022

Hello @DelusionalOptimist, in order to containerized load balancer is required to expose docker socket to the container, so this way the load balancer will be able to connect to docker and perform all the actions required. I just want to heads you up about the risks doing this, there is blog explaing it in details https://blog.quarkslab.com/why-is-exposing-the-docker-socket-a-really-bad-idea.html. As alternative solution I want to propose to leverage the cross-compile feature of go, to distribute an standalone executable using github releases feature. WDYT?

@elle-Bee
Copy link

Hey @DelusionalOptimist is this issue still up to grab?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants