Search code examples
mesosmesosphere

How custom resources are handled by Apache Mesos?


I want to configure mesos agent with connection pool as custom resource with 10 connections. After this, I assume connection will be a part of Mesos Offer. I also understand that Mesos does not take care of isolation of custom resources.

My questions are

  1. I am offered 1 connection along with other resources. If I accept the offer, will that reduce connection count to 9 for that slave. Will number of connections will be 10 again only after running task is finished/killed ?

  2. I am offered 1 connection along with other resources. I accepted the offer and in TaskInfo I did not add connection as resource. Will that still make my connections reduce by 1 or number of connections will be same ?


Solution

    1. Yes it will be reduced but only if you specify connections as a scalar.
    2. If you don't explicitly declare resources nothing will be subtracted.

    Take a look at attributes-resources docs