# Rancher server and client in the same host

**URL:** <https://forums.suse.com/t/rancher-server-and-client-in-the-same-host/274>\
**Category:** Rancher 1.x\
**Created:** [August 19, 2015, 6:31pm UTC](https://forums.suse.com/t/rancher-server-and-client-in-the-same-host/274 "2015-08-19T18:31:38Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![shakisha](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@shakisha](https://forums.suse.com/u/shakisha)\
**Post date:** [August 19, 2015, 6:31pm UTC](https://forums.suse.com/t/rancher-server-and-client-in-the-same-host/274/1 "2015-08-19T18:31:38Z")

</div>

Is possible to run Rancher Server and Rancher client in the same host (but in different container)?  
Is an allowed practice ?

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [August 19, 2015, 7:48pm UTC](https://forums.suse.com/t/rancher-server-and-client-in-the-same-host/274/2 "2015-08-19T19:48:08Z")

</div>

It’s allowed but not a recommended practice. If you do so, please see these instructions when adding the host.

[http://docs.rancher.com/rancher/rancher-ui/infrastructure/hosts/custom/#samehost](http://docs.rancher.com/rancher/rancher-ui/infrastructure/hosts/custom/#samehost)

---

<div class="post-metadata">

**Author:** ![shakisha](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@shakisha](https://forums.suse.com/u/shakisha)\
**Post date:** [August 19, 2015, 8:05pm UTC](https://forums.suse.com/t/rancher-server-and-client-in-the-same-host/274/3 "2015-08-19T20:05:08Z")

</div>

Thank you for the answer Denise 😄

another little question:

if a remote rancher server (hosted in Italy for example) lose connectivity to the hosts (on USA) for little time (minutes) or big time (hours), how the hosts will be affected?

will they lose the functionality ? or gets broken? (I think not, but just to be sure)

---

<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:** [August 19, 2015, 8:21pm UTC](https://forums.suse.com/t/rancher-server-and-client-in-the-same-host/274/4 "2015-08-19T20:21:04Z")

</div>

If the server loses connectivity to a host it will assume the host has failed and spin up new containers for services in order to meet their desired scales.

If that host is not actually dead, but still running and not able to reach the server for some reason, the containers on it will continue to run and serve traffic (assuming the network otherwise works…). When connectivity is restored your services may have more containers than the desired scale (since one we thought was gone showed back up) and can be scaled back down.

---

<div class="post-metadata">

**Author:** ![shakisha](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@shakisha](https://forums.suse.com/u/shakisha)\
**Post date:** [August 19, 2015, 8:35pm UTC](https://forums.suse.com/t/rancher-server-and-client-in-the-same-host/274/5 "2015-08-19T20:35:44Z")

</div>

hi Vincent, thank you for your answer, really good and complete one.  
I clearly understand that situation, but how the server will act it itself lose connectivity with all the hosts ?(assuming that the server is using wan to connect to hosts)

---

<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:** [August 19, 2015, 8:45pm UTC](https://forums.suse.com/t/rancher-server-and-client-in-the-same-host/274/6 "2015-08-19T20:45:47Z")

</div>

It doesn’t really matter for this discussion but FYI the hosts (agent containers) open a connection to the server, not the other way around. This way the hosts don’t have be publicly accessible on the internet.

If the server loses internet connectivity, all the long-lived connections from the agents-\>server will drop and all the hosts will go into “disconnected” state (if you could see the server…). At this point there is nowhere for it to schedule replacement containers since there are no active hosts, so it will not really be able to do anything until hosts are able to connect back in and are in active states again.

I’m not positive but I think if you did something like yank the ethernet cable to the server, wait a bit for the hosts to all show disconnected, and then plug it back in, all the agents would reconnect within a small enough window that the server would not have gotten to rescheduling any of the containers onto the subset of hosts that happen to show back up first (@alena / @sonchang ?), so the net result would be as if nothing happened.

---

<div class="post-metadata">

**Author:** ![alena](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/alena/32/50_2.png) [@alena](https://forums.suse.com/u/alena)\
**Post date:** [August 19, 2015, 9:17pm UTC](https://forums.suse.com/t/rancher-server-and-client-in-the-same-host/274/7 "2015-08-19T21:17:54Z")

</div>

We don’t schedule service reconcile (containers redeployment) on host.disconnect. So service itself won’t kill the containers on disconnected host. And if it comes back fast enough, we should be good.

---

<div class="post-metadata">

**Author:** ![shakisha](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@shakisha](https://forums.suse.com/u/shakisha)\
**Post date:** [August 19, 2015, 11:52pm UTC](https://forums.suse.com/t/rancher-server-and-client-in-the-same-host/274/8 "2015-08-19T23:52:14Z")

</div>

Nice, i think this is the first thing that scary someone new approaching to rancher;  
but @alena, what happens if it doesn’t come back fast?  
Will the host continue to work and run even without the server?

Thanks to all for the answers 😄

---

<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:** [August 20, 2015, 12:49am UTC](https://forums.suse.com/t/rancher-server-and-client-in-the-same-host/274/9 "2015-08-20T00:49:50Z")

</div>

A disconnected host will continue to do what it was doing indefinitely. You will of course not be able to manage it from Rancher while it’s disconnected.

---

<div class="post-metadata">

**Author:** ![onlineth](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/onlineth/32/2320_2.png) [@onlineth](https://forums.suse.com/u/onlineth)\
**Post date:** [March 26, 2017, 5:10pm UTC](https://forums.suse.com/t/rancher-server-and-client-in-the-same-host/274/10 "2017-03-26T17:10:05Z")

</div>

Can you update that link? It appears to be down - possibly moved somewhere else
