Why docker port binding is for both tcp and udp?

904 views
Skip to first unread message

Michał Wieczorek

unread,
Jun 23, 2016, 4:08:41 PM6/23/16
to Nomad
In job specification for docker we define ports, but without saying if it's tcp or udp.
Nomad will add both binding.

Is it intentional (if so: why?), or it's done this way to make the job spec simple?
Do you consider adding option to define 'only tcp' or 'only udp'?

Diptanu Choudhury

unread,
Jun 23, 2016, 6:40:05 PM6/23/16
to Michał Wieczorek, Nomad
Yes, this was done to make the job spec simpler. Do you have any use case where you want to enable only one?

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/nomad/issues
IRC: #nomad-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Nomad" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nomad-tool+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nomad-tool/c9c3dba8-53b8-4856-8735-cc4745a6bfe6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks,
Diptanu Choudhury

Michał Wieczorek

unread,
Jun 24, 2016, 4:43:21 AM6/24/16
to Nomad
It's just my curiosity :-) not a real use case.
I'm just trying to run nomad/docker on windows server 2016, and there's a bug in windows when we want to bind both tcp/udp for the same port - https://github.com/Microsoft/Virtualization-Documentation/issues/319
So a dirty workaround for me is to comment out line with tcp or udp bind.

When there will be a fix in windows (next TP or RTM) - problem will be gone.

But do you consider to change it (adding option to define 'only tcp' or 'only udp') or prefer to leave it like that?

Nathan Fisher

unread,
Jun 24, 2016, 7:43:48 AM6/24/16
to Michał Wieczorek, Nomad
Would making the default tcp and then slightly more configuration for udp make sense? I feel like tcp will be the sane default for most users/
services (http and RPC). Where udp is more likely to be used for core components such as telemetry, logs, and dns. The latter being important but far fewer services.

Alex Dadgar

unread,
Jun 24, 2016, 11:37:33 AM6/24/16
to Nathan Fisher, Michał Wieczorek, Nomad
From a scheduler perspective it is easier to assume that the port is bound for both UDP and TCP. It requires less state and less look ups meaning that the servers use less memory/disk and make faster placement decisions.

- Alex Dadgar

Nathan Fisher

unread,
Jun 24, 2016, 11:41:57 AM6/24/16
to Alex Dadgar, Michał Wieczorek, Nomad
Makes sense. Was thinking solely from the user point of view. I can see how it would be an explosion having to maintain state for both tcp and udp allocations.

Michał Wieczorek

unread,
Jun 24, 2016, 4:53:46 PM6/24/16
to Nomad
Makes sense for me too. 
Thanks.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages