{% extends "base.html" %} {% from "_macros.html" import no_data with context %} {% block title %}Headroom{% endblock %} {% macro status_badge(status, label) -%} {{ label }} {%- endmacro %} {% block content %}
Free IPs of each subnet against the worst case: every Auto Scaling group and ECS service at its maximum, {{ alb_reserve }} IPs per ALB per subnet (kept free: AWS needs them to scale the ALB) and 1 IP for each Lambda subnet / security group combination that has no ENI yet. ASG instances and ECS tasks still to launch are spread evenly over their subnets (the remainder to the subnets with the fewest now). tight: less than {{ tight_pct | int }}% of the subnet's usable IPs left at max scale; over: the subnet runs out before max. Read-only estimate from the latest snapshot. Forecast: a linear trend of the subnet's used IPs over the last {{ forecast_window }} days of snapshots (at least {{ min_points }}): when its free IPs reach 0, and when the demand at max scale no longer fits (free − demand = 0).
{% for n in h.notes %}| Subnet | Name | AZ | CIDR | Free | Demand at max | Left | Result | Forecast | Contributors |
|---|---|---|---|---|---|---|---|---|---|
| {{ r.subnet.subnet_id }} | {{ r.subnet.name }} | {{ r.subnet.az }} | {{ r.subnet.cidr }} | {{ r.free }} | {{ r.demand }} | {{ r.left }} ({{ r.left_pct | pct }}) | {{ status_badge(r.status, r.status_label) }} | {% set fc = forecasts.get(r.subnet.subnet_id) %}
{% if fc %}
{{ fc.trend_text }}
{% if fc.days_to_exhaustion is not none %}free = 0: {{ fc.exhaustion_text }} {% endif %}
{% if fc.days_to_headroom is not none %}demand no longer fits: {{ fc.headroom_text }} {% endif %}
{% else %}not enough data{% endif %}
|
{% for c in r.contributors %} {{ c.text }} {% else %}no scaling demand{% endfor %}
{% if r.suggestion %}
Suggestion: {{ r.suggestion }}
{% if r.needed_prefix %}
Plan a /{{ r.needed_prefix }} in the CIDR Planner
{% else %}
Open the CIDR Planner
{% endif %}
{% endif %}
|
| No subnets{{ ' in scope' if scope_count }}. | |||||||||
Free IPs and demand at max scale summed per AZ: an AZ that runs out while another has room shows an imbalance (spread the subnets, or move the resources to bigger subnets in that AZ).
{% for v in h.by_az %}| AZ | Subnets | Free | Demand at max | Left | Worst result |
|---|---|---|---|---|---|
| {{ a.az or '–' }} | {{ a.subnets | length }} | {{ a.free }} | {{ a.demand }} | {{ a.left }} ({{ a.left_pct | pct }}) | {{ status_badge(a.status, {'over': 'over', 'tight': 'tight', 'ok': 'OK'}[a.status]) }} |