Multiple services with @http?

59 views
Skip to first unread message

tsachi...@gmail.com

unread,
Mar 26, 2017, 7:54:59 AM3/26/17
to nameko-dev
Hi
We have two services that require using the @http decorator.
The problem is that the first service that launches "catches" the port, so the second service fails with "address already in use" exception.

How can this be solved?

Thanks,
Tsachi

Matt Bennett

unread,
Mar 26, 2017, 8:11:23 AM3/26/17
to nameko-dev, tsachi...@gmail.com
You can change the port that the two containers bind to. See https://github.com/nameko/nameko/issues/364


--
You received this message because you are subscribed to the Google Groups "nameko-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nameko-dev+...@googlegroups.com.
To post to this group, send email to namek...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/nameko-dev/eef45bfc-e48f-45bd-a75a-d10a302ba7de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

tsachi...@gmail.com

unread,
Mar 26, 2017, 8:28:25 AM3/26/17
to nameko-dev, tsachi...@gmail.com
Thanks, but the two services are run from the same machine (actually, it's a number of machines behind an ELB) and require to listen on the same port.
Can this be done?

Matt Bennett

unread,
Mar 26, 2017, 9:17:31 AM3/26/17
to nameko-dev, tsachi...@gmail.com
It's not possible to do this, in the same way that it's not possible to have two Flask apps share the same port.

The normal way of achieving this would be to put them behind a server like nginx.
Reply all
Reply to author
Forward
0 new messages