Report this

What is the reason for this report?

Load Balance non-web based docker containers

Posted on May 2, 2018

Hi,

I am trying a usecase where I am doing the following:

  1. Create a containers for the service exposed on ports 2321,2322 , the service is not an http service and has no endpoint API - Done
  2. Scale the service to multiple containers- 5- Done
  3. Load Balance the incoming requests to the service , the incoming request are via shell commands which the service accepts and responds. - Not able to achive

How can i load balance incoming requests to a non-http service running inside a container. I tried HAPROXY, but it accepts http protocol on port 80 by default.

Kindly suggest



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

The DO Load Balancer service will support any TCP protocol out of the box. You would just need to configure it with the correct ports.

This guide will help you with configuring HAProxy to load balance your nodes. You’ll need to ensure that the mode is changed from http to tcp

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.