<mxfile host="Electron" version="29.6.1">
  <diagram name="Page-1" id="diagram-ecs-mi-consolidation">
    <mxGraphModel dx="1600" dy="900" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="1900" pageHeight="860" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="title-group" connectable="0" style="group;fontFamily=Helvetica;" value="" vertex="1" parent="1">
          <mxGeometry height="83" width="1120" x="40" y="20" as="geometry" />
        </mxCell>
        <mxCell id="title-text" style="text;html=1;resizable=1;points=[];autosize=1;align=left;verticalAlign=top;spacingTop=-4;fontSize=30;fontStyle=1;fontFamily=Helvetica;" value="ECS Managed Instances consolidation" vertex="1" parent="title-group">
          <mxGeometry height="42" width="900" as="geometry" />
        </mxCell>
        <mxCell id="subtitle-text" style="text;html=1;resizable=0;points=[];autosize=1;align=left;verticalAlign=top;spacingTop=-4;fontSize=16;fontFamily=Helvetica;" value="Repack tasks across c9g instances, then onto Spot only after replacement capacity exists" vertex="1" parent="title-group">
          <mxGeometry height="25" width="980" x="5" y="40" as="geometry" />
        </mxCell>
        <mxCell id="title-separator" style="line;strokeWidth=2;html=1;fontSize=14;strokeColor=#FF9900;fontFamily=Helvetica;" value="" vertex="1" parent="title-group">
          <mxGeometry height="10" width="1110" x="5" y="70" as="geometry" />
        </mxCell>
        <mxCell id="aws-cloud" style="points=[[0,0],[0.25,0],[0.5,0],[0.75,0],[1,0],[1,0.25],[1,0.5],[1,0.75],[1,1],[0.75,1],[0.5,1],[0.25,1],[0,1],[0,0.75],[0,0.5],[0,0.25]];outlineConnect=0;gradientColor=none;html=1;whiteSpace=wrap;fontSize=12;fontStyle=0;shape=mxgraph.aws4.group;grIcon=mxgraph.aws4.group_aws_cloud;strokeColor=#232F3E;fillColor=light-dark(#232F3E0D,#232F3E0D);fillStyle=auto;verticalAlign=top;align=left;spacingLeft=30;fontColor=#232F3E;dashed=0;container=1;pointerEvents=0;collapsible=0;recursiveResize=0;fontFamily=Helvetica;" value="AWS Cloud" vertex="1" parent="1">
          <mxGeometry x="40" y="150" width="1120" height="480" as="geometry" />
        </mxCell>
        <mxCell id="label-before" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;fontSize=14;fontStyle=1;fontColor=#ED7100;fontFamily=Helvetica;" value="Before: one instance at a time" vertex="1" parent="aws-cloud">
          <mxGeometry x="40" y="40" width="280" height="24" as="geometry" />
        </mxCell>
        <mxCell id="label-after" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;fontSize=14;fontStyle=1;fontColor=#ED7100;fontFamily=Helvetica;" value="After: fleet repacked" vertex="1" parent="aws-cloud">
          <mxGeometry x="940" y="40" width="160" height="24" as="geometry" />
        </mxCell>
        <mxCell id="grp-tasks" style="fillColor=#FFF2E8;strokeColor=#ED7100;rounded=1;whiteSpace=wrap;html=1;verticalAlign=top;fontStyle=1;fontSize=12;fontColor=#ED7100;fontFamily=Helvetica;container=1;collapsible=0;shadow=1;strokeWidth=1.5;" value="Compute" vertex="1" parent="aws-cloud">
          <mxGeometry x="40" y="80" width="120" height="120" as="geometry" />
        </mxCell>
        <mxCell id="icon-tasks" style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=none;fillColor=#ED7100;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=10;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.ecs_task;fontFamily=Helvetica;" value="ECS task&lt;div&gt;&lt;i&gt;261 tasks, 1 vCPU&lt;/i&gt;&lt;/div&gt;" vertex="1" parent="grp-tasks">
          <mxGeometry x="36" y="30" width="48" height="48" as="geometry" />
        </mxCell>
        <mxCell id="grp-ec2-before" style="fillColor=#FFF2E8;strokeColor=#ED7100;rounded=1;whiteSpace=wrap;html=1;verticalAlign=top;fontStyle=1;fontSize=12;fontColor=#ED7100;fontFamily=Helvetica;container=1;collapsible=0;shadow=1;strokeWidth=1.5;" value="Compute" vertex="1" parent="aws-cloud">
          <mxGeometry x="340" y="80" width="120" height="120" as="geometry" />
        </mxCell>
        <mxCell id="icon-ec2-before" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#ED7100;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=10;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.ec2;fontFamily=Helvetica;shadow=1;" value="Amazon EC2&lt;div&gt;&lt;i&gt;19 c9g On-Demand&lt;/i&gt;&lt;/div&gt;" vertex="1" parent="grp-ec2-before">
          <mxGeometry x="36" y="30" width="48" height="48" as="geometry" />
        </mxCell>
        <mxCell id="grp-ecs" style="fillColor=#FFF2E8;strokeColor=#ED7100;rounded=1;whiteSpace=wrap;html=1;verticalAlign=top;fontStyle=1;fontSize=12;fontColor=#ED7100;fontFamily=Helvetica;container=1;collapsible=0;shadow=1;strokeWidth=1.5;" value="Compute" vertex="1" parent="aws-cloud">
          <mxGeometry x="640" y="80" width="120" height="120" as="geometry" />
        </mxCell>
        <mxCell id="icon-ecs" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#ED7100;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=10;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.ecs;fontFamily=Helvetica;shadow=1;" value="ECS Managed Instances&lt;div&gt;&lt;i&gt;repacks the fleet&lt;/i&gt;&lt;/div&gt;" vertex="1" parent="grp-ecs">
          <mxGeometry x="36" y="30" width="48" height="48" as="geometry" />
        </mxCell>
        <mxCell id="grp-ec2-after" style="fillColor=#FFF2E8;strokeColor=#ED7100;rounded=1;whiteSpace=wrap;html=1;verticalAlign=top;fontStyle=1;fontSize=12;fontColor=#ED7100;fontFamily=Helvetica;container=1;collapsible=0;shadow=1;strokeWidth=1.5;" value="Compute" vertex="1" parent="aws-cloud">
          <mxGeometry x="940" y="80" width="120" height="120" as="geometry" />
        </mxCell>
        <mxCell id="icon-ec2-after" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#ED7100;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=10;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.ec2;fontFamily=Helvetica;shadow=1;" value="Amazon EC2&lt;div&gt;&lt;i&gt;13 c9g On-Demand&lt;/i&gt;&lt;/div&gt;" vertex="1" parent="grp-ec2-after">
          <mxGeometry x="36" y="30" width="48" height="48" as="geometry" />
        </mxCell>
        <mxCell id="grp-ec2-spot" style="fillColor=#FFF2E8;strokeColor=#ED7100;rounded=1;whiteSpace=wrap;html=1;verticalAlign=top;fontStyle=1;fontSize=12;fontColor=#ED7100;fontFamily=Helvetica;container=1;collapsible=0;shadow=1;strokeWidth=1.5;" value="Compute" vertex="1" parent="aws-cloud">
          <mxGeometry x="640" y="300" width="120" height="120" as="geometry" />
        </mxCell>
        <mxCell id="icon-ec2-spot" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#ED7100;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=10;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.ec2;fontFamily=Helvetica;shadow=1;" value="Amazon EC2&lt;div&gt;&lt;i&gt;Spot after capacity check&lt;/i&gt;&lt;/div&gt;" vertex="1" parent="grp-ec2-spot">
          <mxGeometry x="36" y="30" width="48" height="48" as="geometry" />
        </mxCell>
        <mxCell id="edge-tasks-ec2" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=block;elbow=vertical;startArrow=none;endFill=1;strokeColor=#545B64;rounded=0;fontFamily=Helvetica;exitX=1;exitY=0.5;entryX=0;entryY=0.5;" edge="1" parent="1" source="icon-tasks" target="icon-ec2-before">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="edge-tasks-ec2-label" value="placed at 42% CPU" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;labelBackgroundColor=none;" connectable="0" vertex="1" parent="edge-tasks-ec2">
          <mxGeometry relative="1" x="0" y="0" as="geometry">
            <mxPoint as="offset" />
          </mxGeometry>
        </mxCell>
        <mxCell id="edge-ec2-ecs" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=block;elbow=vertical;startArrow=none;endFill=1;strokeColor=#545B64;rounded=0;fontFamily=Helvetica;exitX=1;exitY=0.5;entryX=0;entryY=0.5;" edge="1" parent="1" source="icon-ec2-before" target="icon-ecs">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="edge-ec2-ecs-label" value="evaluate the fleet together" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;labelBackgroundColor=none;" connectable="0" vertex="1" parent="edge-ec2-ecs">
          <mxGeometry relative="1" x="0" y="0" as="geometry">
            <mxPoint as="offset" />
          </mxGeometry>
        </mxCell>
        <mxCell id="edge-ecs-after" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=block;elbow=vertical;startArrow=none;endFill=1;strokeColor=#545B64;rounded=0;fontFamily=Helvetica;exitX=1;exitY=0.35;entryX=0;entryY=0.5;" edge="1" parent="1" source="icon-ecs" target="icon-ec2-after">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="edge-ecs-after-label" value="start before stop" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;labelBackgroundColor=none;" connectable="0" vertex="1" parent="edge-ecs-after">
          <mxGeometry relative="1" x="0" y="0" as="geometry">
            <mxPoint as="offset" />
          </mxGeometry>
        </mxCell>
        <mxCell id="edge-ecs-spot" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=block;elbow=vertical;startArrow=none;endFill=1;strokeColor=#545B64;rounded=0;dashed=1;fontFamily=Helvetica;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="icon-ecs" target="icon-ec2-spot">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="edge-ecs-spot-label" value="only if replacement Spot exists" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Helvetica;fontSize=11;fontStyle=2;labelBackgroundColor=none;" connectable="0" vertex="1" parent="edge-ecs-spot">
          <mxGeometry relative="1" x="0" y="0" as="geometry">
            <mxPoint as="offset" />
          </mxGeometry>
        </mxCell>
        <mxCell id="step-1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#007CBD;strokeColor=default;fontColor=#FFFFFF;fontStyle=1;fontSize=16;fontFamily=Helvetica;shadow=1;glass=0;strokeWidth=2;align=center;verticalAlign=middle;labelBackgroundColor=none;" value="1" vertex="1" parent="1">
          <mxGeometry x="215.0" y="230.0" width="28" height="28" as="geometry" />
        </mxCell>
        <mxCell id="step-2" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#007CBD;strokeColor=default;fontColor=#FFFFFF;fontStyle=1;fontSize=16;fontFamily=Helvetica;shadow=1;glass=0;strokeWidth=2;align=center;verticalAlign=middle;labelBackgroundColor=none;" value="2" vertex="1" parent="1">
          <mxGeometry x="490.0" y="160.0" width="28" height="28" as="geometry" />
        </mxCell>
        <mxCell id="step-3" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#007CBD;strokeColor=default;fontColor=#FFFFFF;fontStyle=1;fontSize=16;fontFamily=Helvetica;shadow=1;glass=0;strokeWidth=2;align=center;verticalAlign=middle;labelBackgroundColor=none;" value="3" vertex="1" parent="1">
          <mxGeometry x="850.0" y="210.0" width="28" height="28" as="geometry" />
        </mxCell>
        <mxCell id="step-4" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#007CBD;strokeColor=default;fontColor=#FFFFFF;fontStyle=1;fontSize=16;fontFamily=Helvetica;shadow=1;glass=0;strokeWidth=2;align=center;verticalAlign=middle;labelBackgroundColor=none;" value="4" vertex="1" parent="1">
          <mxGeometry x="760" y="400" width="28" height="28" as="geometry" />
        </mxCell>
        <mxCell id="legend-bg" style="verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.basic.rect;fillColor2=none;strokeWidth=1;size=20;indent=5;fillColor=light-dark(#EDF3FF,#305363);strokeColor=#6c8ebf;fontFamily=Helvetica;" value="" vertex="1" parent="1">
          <mxGeometry height="610" width="650" x="1200" y="20" as="geometry" />
        </mxCell>
        <mxCell id="legend-container" connectable="0" style="group;fontFamily=Helvetica;" value="" vertex="1" parent="1">
          <mxGeometry height="560" width="610" x="1220" y="50" as="geometry" />
        </mxCell>
        <mxCell id="step-1-legend" connectable="0" style="group;fontFamily=Helvetica;" value="" vertex="1" parent="legend-container">
          <mxGeometry height="100" width="600" x="0" y="0" as="geometry" />
        </mxCell>
        <mxCell id="step-1-badge-legend" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#007CBD;strokeColor=default;fontColor=#FFFFFF;fontStyle=1;fontSize=22;labelBackgroundColor=none;fontFamily=Helvetica;shadow=1;glass=0;strokeWidth=2;" value="1" vertex="1" parent="step-1-legend">
          <mxGeometry height="38" width="40" y="2" as="geometry" />
        </mxCell>
        <mxCell id="step-1-desc-legend" style="text;html=1;align=left;verticalAlign=top;spacingTop=-4;fontSize=14;labelBackgroundColor=none;whiteSpace=wrap;fontFamily=Helvetica;" value="&lt;div&gt;&lt;b&gt;Tasks sit on a wide fleet&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: light-dark(rgb(0,0,0), rgb(255,255,255));&quot;&gt;AWS's test placed 261 tasks (1 vCPU, 1.94 GiB) on 19 c9g instances, at 42% CPU and 41% memory.&lt;/span&gt;&lt;/div&gt;" vertex="1" parent="step-1-legend">
          <mxGeometry height="90" width="548" x="52" as="geometry" />
        </mxCell>
        <mxCell id="step-2-legend" connectable="0" style="group;fontFamily=Helvetica;" value="" vertex="1" parent="legend-container">
          <mxGeometry height="100" width="600" x="0" y="110" as="geometry" />
        </mxCell>
        <mxCell id="step-2-badge-legend" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#007CBD;strokeColor=default;fontColor=#FFFFFF;fontStyle=1;fontSize=22;labelBackgroundColor=none;fontFamily=Helvetica;shadow=1;glass=0;strokeWidth=2;" value="2" vertex="1" parent="step-2-legend">
          <mxGeometry height="38" width="40" y="2" as="geometry" />
        </mxCell>
        <mxCell id="step-2-desc-legend" style="text;html=1;align=left;verticalAlign=top;spacingTop=-4;fontSize=14;labelBackgroundColor=none;whiteSpace=wrap;fontFamily=Helvetica;" value="&lt;div&gt;&lt;b&gt;Evaluate instances together&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: light-dark(rgb(0,0,0), rgb(255,255,255));&quot;&gt;Cross-instance consolidation looks across the capacity provider, which matters when the allowed sizes are a narrow c9g range.&lt;/span&gt;&lt;/div&gt;" vertex="1" parent="step-2-legend">
          <mxGeometry height="90" width="548" x="52" as="geometry" />
        </mxCell>
        <mxCell id="step-3-legend" connectable="0" style="group;fontFamily=Helvetica;" value="" vertex="1" parent="legend-container">
          <mxGeometry height="100" width="600" x="0" y="220" as="geometry" />
        </mxCell>
        <mxCell id="step-3-badge-legend" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#007CBD;strokeColor=default;fontColor=#FFFFFF;fontStyle=1;fontSize=22;labelBackgroundColor=none;fontFamily=Helvetica;shadow=1;glass=0;strokeWidth=2;" value="3" vertex="1" parent="step-3-legend">
          <mxGeometry height="38" width="40" y="2" as="geometry" />
        </mxCell>
        <mxCell id="step-3-desc-legend" style="text;html=1;align=left;verticalAlign=top;spacingTop=-4;fontSize=14;labelBackgroundColor=none;whiteSpace=wrap;fontFamily=Helvetica;" value="&lt;div&gt;&lt;b&gt;Repack, then stop the empty hosts&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: light-dark(rgb(0,0,0), rgb(255,255,255));&quot;&gt;Tasks move with start-before-stop. The same test ended on 13 instances, at 91% CPU and 88% memory.&lt;/span&gt;&lt;/div&gt;" vertex="1" parent="step-3-legend">
          <mxGeometry height="90" width="548" x="52" as="geometry" />
        </mxCell>
        <mxCell id="step-4-legend" connectable="0" style="group;fontFamily=Helvetica;" value="" vertex="1" parent="legend-container">
          <mxGeometry height="110" width="600" x="0" y="330" as="geometry" />
        </mxCell>
        <mxCell id="step-4-badge-legend" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#007CBD;strokeColor=default;fontColor=#FFFFFF;fontStyle=1;fontSize=22;labelBackgroundColor=none;fontFamily=Helvetica;shadow=1;glass=0;strokeWidth=2;" value="4" vertex="1" parent="step-4-legend">
          <mxGeometry height="38" width="40" y="2" as="geometry" />
        </mxCell>
        <mxCell id="step-4-desc-legend" style="text;html=1;align=left;verticalAlign=top;spacingTop=-4;fontSize=14;labelBackgroundColor=none;whiteSpace=wrap;fontFamily=Helvetica;" value="&lt;div&gt;&lt;b&gt;Spot only after a replacement exists&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: light-dark(rgb(0,0,0), rgb(255,255,255));&quot;&gt;Spot consolidation uses the same repack, and it waits until replacement Spot capacity is available. The dashed path is that check.&lt;/span&gt;&lt;/div&gt;" vertex="1" parent="step-4-legend">
          <mxGeometry height="100" width="548" x="52" as="geometry" />
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>