Re: Can I control the behavior of cf scale
Eric Malm <emalm@...>
Hi, Jiaxin,
toggle quoted messageShow quoted text
Let's handle these cases separately. When you shut down a DEA or a Diego Cell gracefully (say, as BOSH does when updating or deleting a VM), it will attempt to get replacements for its app instances scheduled and running on other VMs before it shuts down the instances it hosts. We call this process "evacuation". As Yitao pointed out, if you have the spare capacity in your deployment for those replacement instances, this evacuation procedure should prevent any downtime for the application. In your case, even if you have all 4 app instances on the same DEA or Diego Cell when it starts to shut down, the system will schedule 4 replacement instances on other VMs and get them running before the original 4 instances are stopped. The other thing you've asked about is rebalancing to improve instance anti-affinity when more capacity is available. Currently, neither the DEAs nor Diego do that, but this kind of active rebalancing is of great interest to the Diego team and is something we intend to work on in the near future. If you want to attempt this rebalancing manually, you can determine some placement information about your instances from the app-stats endpoint (/v2/apps/:guid/stats) on CC's API. The response will include the IP of the host for each instance. You could then use the `cf restart-app-instance` command to restart instances one by one by their index. On the Diego runtime, at least, instance anti-affinity across availability zones and hosts is the most important placement factor, so if there is sufficient capacity, the replacement instances will be placed on VMs with fewer instances of that app. Of course, this manual rebalancing procedure is less than ideal, which is one reason the Diego team is quite interested in having the platform handle it on your behalf. Moreover, the goal would also be to perform the rebalancing in a safer way, ideally similar to the "evacuation" concept above except for individual app instances instead of all the instances on a particular VM. Thanks, Eric, CF Runtime Diego PM
On Thu, Aug 18, 2016 at 9:28 PM, Yitao Jiang <jiangyt.cn(a)gmail.com> wrote:
when you use bosh to update the runner vm, the instances will
|
|