{ "type": "excalidraw", "version": 2, "source": "https://excalidraw.com", "elements": [ { "type": "text", "id": "title", "x": 200, "y": 20, "width": 760, "height": 50, "text": "GC-Induced HPA Thrash Cycle", "fontSize": 28, "fontFamily": 2, "textAlign": "center", "verticalAlign": "top", "fillStyle": "solid", "strokeColor": "#1971c2", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0 }, { "type": "text", "id": "subtitle", "x": 220, "y": 68, "width": 720, "height": 30, "text": "Why CPU-based HPA fails for Java — and what to do instead", "fontSize": 15, "fontFamily": 1, "textAlign": "center", "strokeColor": "#666666", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0 }, {"type": "rectangle", "id": "box1", "x": 60, "y": 140, "width": 200, "height": 90, "strokeColor": "#2f9e44", "backgroundColor": "#ebfbee", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2}, {"type": "text", "id": "txt1", "x": 70, "y": 155, "width": 180, "height": 60, "text": "① Normal Operation\nApp running fine\nGC pauses < 200ms", "fontSize": 13, "fontFamily": 1, "textAlign": "center", "strokeColor": "#2f9e44", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "arr1", "x": 260, "y": 185, "width": 80, "height": 0, "points": [[0,0],[80,0]], "strokeColor": "#666666", "backgroundColor": "transparent", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2, "endArrowhead": "arrow"}, {"type": "text", "id": "lbl1", "x": 270, "y": 165, "width": 60, "height": 20, "text": "GC runs", "fontSize": 11, "fontFamily": 1, "textAlign": "center", "strokeColor": "#666666", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "rectangle", "id": "box2", "x": 340, "y": 140, "width": 200, "height": 90, "strokeColor": "#e8590c", "backgroundColor": "#fff4e6", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2}, {"type": "text", "id": "txt2", "x": 350, "y": 150, "width": 180, "height": 70, "text": "② GC Pause\nStop-the-world fires\nCPU spikes to 100%\n(normal GC behaviour)", "fontSize": 13, "fontFamily": 1, "textAlign": "center", "strokeColor": "#e8590c", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "arr2", "x": 540, "y": 185, "width": 80, "height": 0, "points": [[0,0],[80,0]], "strokeColor": "#666666", "backgroundColor": "transparent", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2, "endArrowhead": "arrow"}, {"type": "text", "id": "lbl2", "x": 548, "y": 165, "width": 64, "height": 20, "text": "HPA sees", "fontSize": 11, "fontFamily": 1, "textAlign": "center", "strokeColor": "#666666", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "rectangle", "id": "box3", "x": 620, "y": 140, "width": 200, "height": 90, "strokeColor": "#c92a2a", "backgroundColor": "#fff5f5", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2}, {"type": "text", "id": "txt3", "x": 630, "y": 150, "width": 180, "height": 70, "text": "③ HPA Scales Out\nCPU > threshold\nHPA adds 3 new pods\n(wrong response!)", "fontSize": 13, "fontFamily": 1, "textAlign": "center", "strokeColor": "#c92a2a", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "arr3", "x": 720, "y": 230, "width": 0, "height": 80, "points": [[0,0],[0,80]], "strokeColor": "#666666", "backgroundColor": "transparent", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2, "endArrowhead": "arrow"}, {"type": "rectangle", "id": "box4", "x": 620, "y": 320, "width": 200, "height": 90, "strokeColor": "#c92a2a", "backgroundColor": "#fff5f5", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2}, {"type": "text", "id": "txt4", "x": 630, "y": 330, "width": 180, "height": 70, "text": "④ New Pods Also GC\nEach new pod warms up\nAll do GC at startup\nMore CPU spikes!", "fontSize": 13, "fontFamily": 1, "textAlign": "center", "strokeColor": "#c92a2a", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "arr4", "x": 620, "y": 365, "width": -80, "height": 0, "points": [[0,0],[-80,0]], "strokeColor": "#666666", "backgroundColor": "transparent", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2, "endArrowhead": "arrow"}, {"type": "rectangle", "id": "box5", "x": 340, "y": 320, "width": 200, "height": 90, "strokeColor": "#862e9c", "backgroundColor": "#f8f0fc", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2}, {"type": "text", "id": "txt5", "x": 350, "y": 330, "width": 180, "height": 70, "text": "⑤ HPA Scales Again\nMore CPU spikes seen\nAdds more pods...\n20 pods for 3-pod load", "fontSize": 13, "fontFamily": 1, "textAlign": "center", "strokeColor": "#862e9c", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "arrow", "id": "arr5", "x": 340, "y": 365, "width": -80, "height": 0, "points": [[0,0],[-80,0]], "strokeColor": "#666666", "backgroundColor": "transparent", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2, "endArrowhead": "arrow"}, {"type": "rectangle", "id": "box6", "x": 60, "y": 320, "width": 200, "height": 90, "strokeColor": "#862e9c", "backgroundColor": "#f8f0fc", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2}, {"type": "text", "id": "txt6", "x": 70, "y": 330, "width": 180, "height": 70, "text": "⑥ Cost Explosion\nCluster at 20 pods\nLoad unchanged\nOn-call at 2am", "fontSize": 13, "fontFamily": 1, "textAlign": "center", "strokeColor": "#862e9c", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "text", "id": "loop-label", "x": 310, "y": 252, "width": 60, "height": 20, "text": "LOOP", "fontSize": 14, "fontFamily": 2, "textAlign": "center", "strokeColor": "#c92a2a", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "rectangle", "id": "fix-box", "x": 60, "y": 460, "width": 760, "height": 130, "strokeColor": "#2f9e44", "backgroundColor": "#ebfbee", "fillStyle": "solid", "roughness": 1, "opacity": 100, "angle": 0, "strokeWidth": 2}, {"type": "text", "id": "fix-title", "x": 70, "y": 470, "width": 740, "height": 25, "text": "THE FIX — Two changes required:", "fontSize": 15, "fontFamily": 2, "textAlign": "left", "strokeColor": "#2f9e44", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "text", "id": "fix1", "x": 80, "y": 498, "width": 360, "height": 85, "text": "① Scale on RPS, not CPU\n HPA metric: http_requests_per_second\n RPS is unaffected by GC CPU spikes\n Use KEDA or Prometheus Adapter", "fontSize": 13, "fontFamily": 1, "textAlign": "left", "strokeColor": "#2f9e44", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "text", "id": "fix2", "x": 450, "y": 498, "width": 360, "height": 85, "text": "② Stabilization windows in HPA\n scaleUp: stabilizationWindowSeconds: 120\n scaleDown: stabilizationWindowSeconds: 300\n Absorbs GC spikes < 2 min", "fontSize": 13, "fontFamily": 1, "textAlign": "left", "strokeColor": "#2f9e44", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0}, {"type": "text", "id": "footnote", "x": 60, "y": 605, "width": 760, "height": 20, "text": "Reference: SRE with Java Microservices — \"Autoscale on throughput metrics, not CPU — GC pauses create false CPU spikes that mislead HPA\"", "fontSize": 11, "fontFamily": 1, "textAlign": "left", "strokeColor": "#999999", "backgroundColor": "transparent", "roughness": 0, "opacity": 100, "angle": 0} ], "appState": { "gridSize": null, "viewBackgroundColor": "#ffffff" } }