# Hostnames with multiple hosts in same environment

**URL:** <https://forums.suse.com/t/hostnames-with-multiple-hosts-in-same-environment/8086>\
**Category:** Rancher 1.x\
**Created:** [December 21, 2017, 12:59pm UTC](https://forums.suse.com/t/hostnames-with-multiple-hosts-in-same-environment/8086 "2017-12-21T12:59:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jean-Charle\_Passepon](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@Jean-Charle\_Passepon](https://forums.suse.com/u/Jean-Charle_Passepon)\
**Post date:** [December 21, 2017, 12:59pm UTC](https://forums.suse.com/t/hostnames-with-multiple-hosts-in-same-environment/8086/1 "2017-12-21T12:59:36Z")

</div>

First of all I’m sorry because I saw several _quite_ related questions but either I don’t think it was exactly my problem or maybe I simply didn’t understand the answers.

In the mean time I’m quite new with rancher and general devops stuff, so I thank you in advance for your patience.

**The problem** :  
I’ve got 2 services, [service.domain.com](http://service.domain.com) and [service-dev.domain.com](http://service-dev.domain.com).  
From route53, I’ve got my [service.domain.com](http://service.domain.com) pointing to a specific server IP and [service-dev.domain.com](http://service-dev.domain.com) pointing to **another** specific server IP.  
Now the services work requesting the port 5000.

And I would like it to be in the same environment. But as Rancher is an awesome container orchestration (I really mean it) sometimes it will happen that both service and service-dev will be deployed on the same host.

From here, my problem begin. A load balancer is either deployed to one host or available on every host, right!  
So I did something like:  
requester: [service.domain.com](http://service.domain.com) - 5000 -\> service-container - 5000  
requester: [service-dev.domain.com](http://service-dev.domain.com) - 5000 -\> service-dev-container - 5000

But if both service are deployed on the same host, which is linked to only one domain name, one of them won’t work.

**My questions**  
So, I was wondering what are the best practices?  
I read to setup an nginx on top of it but I’m not so sure to understand, is this nginx deployed on both hosts? Do I need to link the domain names to both hosts from route53?

At the moment I’m creating an environment for every host, but I don’t like it and if it continues this way I’ll end up with 100 environments even if some of them are related.
