<p>Does Mesos or Kubernetes provide the tooling to dynamically allocate/de-allocate virtual machines?</p>

<p>I need to build a workflow engine that has a highly variable load and a mixture of short and long running tasks.  For example, at 9am I might need to run 10,000 jobs with 500 taking 4 hours to run and the rest taking 5 minutes.  And then at 10 am I need to only run 600 short jobs.</p>

<p>If I'm running on Azure (my preferred cloud environment) can Mesos or Kubernetes dynamically scale up or scale down the available VMs in a cluster to match demand?  And can it do so intelligently so long running jobs wont be interrupted?  </p>

<p>I don't know of an auto scaler for DCOS/MESOS in azure. Here is a github repository for making an auto scaler inside of an ACS kubernetes cluster though.
<a href="https://github.com/wbuchwalter/Kubernetes-acs-autoscaler" rel="nofollow noreferrer">https://github.com/wbuchwalter/Kubernetes-acs-autoscaler</a></p>

<p>As for how the code works. It is a tool built using the az cli to tell the ACS service to scale up and down nodes, using az acs scale command. Looking at the code it has aspirations to  to drain all connections then pods from the node using kubectl, but it doens't appear to currently do so.</p>
