Re: publish/subscribe data between services

From: Colin Booth <cathexis_at_gmail.com>
Date: Mon, 7 Mar 2016 18:49:28 -0800

On Mar 7, 2016 6:41 PM, "Patrick Mahoney" <pat_at_polycrystal.org> wrote:
>
> On 2016-03-07 7:41 pm, Buck Evan wrote:
>
>> How do services become aware of each others' port numbers?
>>
>
> Not sure if this would be simpler than IP-per-playground, but you
> could look into Linux's network namespaces [1] to assign
> netns-per-playground. Within the netns, you can use statically known
> ports, and you can use `ip netns exec $namespace command...` to run
> arbitrary commands within the namespace. There's a fair amount of
> config to properly create the loopback address within each netns, and
> possibly allow routing through the primary netns (the one attached to
> the LAN) if that's needed.
>
I was thinking something similar but instead of using a network namespace
instead simply binding against a subdomain of a wildcard dns record. As
long as your naming scheme was reasonably stable
($svc.$playgroundname.$wildcarddomain), a service that restarted would be
able to bind to it's well-known port, only within the context of that
particular subdomain.

I think that might be less work than setting up individual network
namespaces, depending on your access to change internal dns.

Cheers!
Received on Tue Mar 08 2016 - 02:49:28 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC