You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Niklas Quarfot Nielsen (JIRA)" <ji...@apache.org> on 2015/06/02 17:56:18 UTC

[jira] [Commented] (MESOS-2802) Prevent immediate reuse of network ports for different tasks

    [ https://issues.apache.org/jira/browse/MESOS-2802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14569323#comment-14569323 ] 

Niklas Quarfot Nielsen commented on MESOS-2802:
-----------------------------------------------

Hi Peter

While I do see the pain, this would mean we have to block an excess of resources (all previously used resources are released in one go) 2 minutes (or how long the cool-off period would be) after a terminal state for all tasks - I suspect that could mean huge drop in utilization in large clusters.

[~benjaminhindman] Was this something you have run into previously?



> Prevent immediate reuse of network ports for different tasks
> ------------------------------------------------------------
>
>                 Key: MESOS-2802
>                 URL: https://issues.apache.org/jira/browse/MESOS-2802
>             Project: Mesos
>          Issue Type: Improvement
>            Reporter: Peter Kolloch
>
> Currently, if a task finishes or dies, another task might reuse the same port immediately afterwards. If another task or a load balancer connects to this port, still expecting the old task, there might be unpleasant surprises.
> For example, imagine that a visitor of your Mesos hosted web page sees your internal reporting tool instead of your company market material when hitting your page during an update.
> To make this less likely, Marathon contains code which tries to randomize dynamically assigned ports. This is a workaround at best and we would like to get rid of this code. I imagine that other frameworks might include similar code.
> As a solution, I propose a grace period for ports. If a task dies, the associated ports resources should not immediately go back into the resource pool. Instead, Mesos should wait for a configurable time and only then offer them for new tasks again.
> If you then specify a grace period of 2 minutes and update your service discovery load balancer every 30 seconds, you can be reasonably sure that no improper port reuse occurs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)