# Load Balancer and port conflicts

**URL:** <https://forums.suse.com/t/load-balancer-and-port-conflicts/5454>\
**Category:** Rancher 1.x\
**Created:** [February 8, 2017, 3:25am UTC](https://forums.suse.com/t/load-balancer-and-port-conflicts/5454 "2017-02-08T03:25:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sumobob](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@sumobob](https://forums.suse.com/u/sumobob)\
**Post date:** [February 8, 2017, 3:25am UTC](https://forums.suse.com/t/load-balancer-and-port-conflicts/5454/1 "2017-02-08T03:25:13Z")

</div>

HI all,

Struggling a little with understanding how the rancher load balancers work, I have a pretty simple setup, an api service, and nginx for static files.  
I want to load balance my api service, but how can I do this without the ports conflicting?

Right now my load balancer receives on :80/api and routes to api:3000, if I scale this up though, there is a conflict as the new container tries to get port 3000 as well.

Am I missing something?

---

<div class="post-metadata">

**Author:** ![sumobob](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@sumobob](https://forums.suse.com/u/sumobob)\
**Post date:** [February 8, 2017, 3:33am UTC](https://forums.suse.com/t/load-balancer-and-port-conflicts/5454/2 "2017-02-08T03:33:30Z")

</div>

Think I just figured it out, make sure you don’t have an external port on the api service, rancher looks like it automatically gives a port to your service.

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [February 8, 2017, 3:42am UTC](https://forums.suse.com/t/load-balancer-and-port-conflicts/5454/3 "2017-02-08T03:42:47Z")

</div>

Containers are accessible on the internal overlay network without publishing ports to the host. So yes, you have a limited number of balancer containers and then the services behind then vang have any scale since they use no host ports.

---

<div class="post-metadata">

**Author:** ![sumobob](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@sumobob](https://forums.suse.com/u/sumobob)\
**Post date:** [February 8, 2017, 3:44am UTC](https://forums.suse.com/t/load-balancer-and-port-conflicts/5454/4 "2017-02-08T03:44:23Z")

</div>

Yup, I didn’t realise that rancher internally will link the port, I was using EXPOSE in my dockerfile, and naturally, getting conflicts when I went to scale.
