New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Enhance Experimental Networking and Services UI #14593
Comments
So we are assuming that networks can communicate with each other since you can publish a service to a different network? |
No you can only publish a service on a network that you are attached to |
Oh I see, specifying the network name on |
Something is wonky in the above command. Does the above create 2 network interfaces attaches to the same network? If not, how do you attach 2 networks to a container? |
@cpuguy83 yep, We would error out on @shettyg per the explanation above, in this case the Attaching a container to multiple networks is something that we (those in the PR above) decided to defer to tackle later as there are some complexities in the implementation that we aren't quite happy with. I'm going to set up a networking working group call where we can discuss these kind of things - I'll add details to the libnetwork wiki soon - and would love it if you could join too. |
+1 for this proposal from me. |
+1 |
+1 |
-1 I'm sorry guys. I really am. But there is something still incomplete in my mind. The mere presence of the term "service" means we have a incomplete thought. Those asking for "networks" and those asking for "services" are having two different conversations. We need to separate concerns. |
I'll do my best to add something productive to this conversation, but still working on a complete thought. |
would be good to clarify failure cases (per @shettyg comment above) |
@dave-tucker I've just realized the example you gave at the top of this PR may confuse people because of the "frontend" and "backend" network name choices. Some may infer from that they various different network-to-network and cross-network-service-discovery behaviors - which as I understand it are not supported in this initial proposal. Might be better just to replace with "mynetwork" or similar? |
+1 |
@lxpollitt done. @ibuildthecloud imo, networking and services are indeed different concerns in this example. You can create networks and use Anyway, would love to hear your thoughts - feel free to ping me directly if you want to talk it over. |
@monadic added failure cases |
thanks @dave-tucker is docker run -itd --net=backend --publish-service=frontend:web an error? |
@monadic I'm assuming so based on the discussions we had re: explicit vs implicit and multiple networks. I'm interpreting the user intent in your example as, attach me to frontend and backend and publish service web on front-end...
otherwise the only constraint that we are enforcing (at this time) is that you can't have "discoverability" without "reachability" - it makes no sense to find a service when you can't access it. this may change in time as the features mature. |
+1 Would love to join the mailer list and actively participate as per below:
|
Me too, thanks @dave-tucker |
@dave-tucker I'll probably ping you directly. I've almost got it sorted out in my brain, but still -1. I'll hopefully have a write up of what I'm thinking by Monday. |
I really think the conflation of network and service here is wrong.
OK
BAD. If I understood the other thread, you want to publish a service into a scope, not into a network. Are scopes and networks 1:1 ? I don't know that they have to be. Can I define a network with more than one scope? I think instead you want to disaggregate the ideas: Simple services:
Ignoring services:
|
+1 I'd written a patch for this before finding this issue: rlane@9be0775 |
@thockin I think the intention is that initially (i.e. in the increment covered by this PR) networks and scopes are 1:1, but that there is potential for scopes to be defined in the future that are not 1:1 with networks. I think this could do with being more clearly stated since right now the PR talks about publishing a service to a network, when it should probably talk about publishing to network's default scope (or something similar that de-conflates the concepts)? I believe DNS is the assumed service discovery mechanism for now, so fully flexible scopes become interesting, but not impossible, to spec right so they make sense for the app developer and can be implemented by a broad range of network / service discovery drivers. I think that's a reasonable enough justification for simplifying in the short term and making scopes and networks 1:1. Obviously though there is a huge danger that this short term 1:1 leads to conflation, particularly if not explained and documented clearly. |
Closing in favour of what was implemented in #16645 |
--net=NETWORK
whereNETWORK
is created viadocker network create
--publish-service
to useNETWORK:NAME
whereNETWORK
is the namespace under which to publish andNAME
is the name of the serviceExample
Failure Cases
These changes are motivated by docker/compose#1676 and designed to accomplish the following use cases
We have deliberately ignored attachment to multiple networks at this time as there are concerns about how this is going to be implemented.
Related to: #14143
Developed and discussed with @monadic @bboreham @squaremo @aanand @bfirsh @lxpollitt
The text was updated successfully, but these errors were encountered: