Document the ability to publish a port locally on a swarm node#1091
Document the ability to publish a port locally on a swarm node#1091mdlinville merged 1 commit intodocker:vnext-enginefrom mdlinville:643_service_publish_port_local
Conversation
engine/swarm/services.md
Outdated
| where that service is running. This feature is available in Docker 1.13 and | ||
| higher. This creates less networking overhead by passing the routing mesh, but | ||
| you are responsible for routing requests to your service's nodes, and you can | ||
| only run one task for a given service on a given swarm node. |
There was a problem hiding this comment.
This restriction is only in place if you specify the published port. If you don't specify it, an ephemeral port will be allocated on the node.
engine/swarm/services.md
Outdated
| #### Publish a service's ports directly on the swarm node | ||
|
|
||
| Using the routing mesh may not be the right choice for your application if you | ||
| need to minimize network overhead or your application topology requires that |
There was a problem hiding this comment.
Maybe break this down into bullet points.
dongluochen
left a comment
There was a problem hiding this comment.
You mention overhead of routing mesh several times. I'd suggest reduce it. It's more of different scenarios. The major difference is the scenario requires internal load balancing or not. Load balancing always introduces an extra hop.
| service running on that node or not. This is less complex but creates some | ||
| additional networking overhead. | ||
|
|
||
| - [You can publish a service task's port directly on the swarm node](#publish-a-services-ports-directly-on-the-swarm-node) |
engine/swarm/services.md
Outdated
| swarm makes nginx port 80 from the task container accessible at port 8080 on any | ||
| node in the swarm. You can direct `curl` at port 8080 of any node in the swarm | ||
| to access the web server: | ||
| Three tasks will run on up to three nodes. Multiple tasks can run on the same |
There was a problem hiding this comment.
Multiple tasks can run on the same node.
While this is possible, Swarmkit scheduler tries to spread the tasks to different nodes as long as it can. This sentence may be a little misleading.
There was a problem hiding this comment.
The intent was to make it clear that you don't know (and shouldn't need to care) where the 3 tasks are run across the 10 nodes. It could be that 8 of the nodes are down for whatever reason. The routing mesh will do the right thing for you. I'll try to make it more clear.
|
LGTM |
|
I think this is good to go, merging it. |
Proposed changes
Document moby/swarmkit@dfa1fc0
Unreleased project version (optional)
Engine 1.13
Related issues (optional)
Fixes #643