viewof fpCurrentDevices = Inputs.range([10, 10000], {
value: 500,
step: 10,
label: "Current fleet size:"
})
viewof fpGrowthRate = Inputs.range([0, 100], {
value: 25,
step: 5,
label: "Annual growth rate (%):"
})
viewof fpMsgSize = Inputs.range([50, 1000], {
value: 370,
step: 10,
label: "Average message size (bytes):"
})
viewof fpMsgInterval = Inputs.range([1, 3600], {
value: 30,
step: 1,
label: "Message interval (seconds):"
})
viewof fpYearsToProject = Inputs.range([1, 5], {
value: 3,
step: 1,
label: "Projection years:"
})
fpYear0BW = (fpCurrentDevices / fpMsgInterval) * fpMsgSize * 86400 / (1024 * 1024 * 1024)
fpYears = Array.from({length: fpYearsToProject + 1}, (_, i) => i)
fpProjections = fpYears.map(y => {
const devices = Math.round(fpCurrentDevices * Math.pow(1 + fpGrowthRate / 100, y))
const dailyGB = (devices / fpMsgInterval) * fpMsgSize * 86400 / (1024 * 1024 * 1024)
return {year: y, devices: devices, dailyGB: dailyGB, monthlyGB: dailyGB * 30}
})
html`<div style="background: #f8f9fa; border-left: 4px solid #3498DB; padding: 15px; margin-top: 15px; font-family: Arial, sans-serif;">
<p style="color: #2C3E50; margin-top: 0; font-weight: 700;">Fleet Bandwidth Projection (${fpGrowthRate}% annual growth)</p>
<div style="display: grid; gap: 12px; margin-top: 10px;">
${fpProjections.map(p => `<div style="background: ${p.year === 0 ? '#e8f5e9' : 'white'}; border: 1px solid #e0e0e0; border-radius: 8px; padding: 12px;">
<div style="color: #2C3E50; font-size: 16px; font-weight: bold; margin-bottom: 10px;">${p.year === 0 ? 'Now' : 'Year ' + p.year}</div>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px;">
<div>
<div style="color: #7F8C8D; font-size: 11px; text-transform: uppercase; margin-bottom: 4px;">Devices</div>
<div style="color: #16A085; font-size: 22px; font-weight: bold;">${p.devices.toLocaleString()}</div>
</div>
<div>
<div style="color: #7F8C8D; font-size: 11px; text-transform: uppercase; margin-bottom: 4px;">Req/sec</div>
<div style="color: #2C3E50; font-size: 22px; font-weight: bold;">${(p.devices / fpMsgInterval).toFixed(1)}</div>
</div>
<div>
<div style="color: #7F8C8D; font-size: 11px; text-transform: uppercase; margin-bottom: 4px;">Daily (GB)</div>
<div style="color: #E67E22; font-size: 22px; font-weight: bold;">${p.dailyGB.toFixed(2)}</div>
</div>
<div>
<div style="color: #7F8C8D; font-size: 11px; text-transform: uppercase; margin-bottom: 4px;">Monthly (GB)</div>
<div style="color: ${p.monthlyGB > 100 ? '#E74C3C' : '#3498DB'}; font-size: 22px; font-weight: bold;">${p.monthlyGB.toFixed(1)}</div>
</div>
</div>
</div>`).join('')}
</div>
<div style="margin-top: 12px; padding: 10px; background: #f0f7ff; border-radius: 4px; font-size: 13px; color: #2C3E50;">
<strong>Scaling note:</strong> At year ${fpYearsToProject}, fleet reaches ${fpProjections[fpProjections.length - 1].devices.toLocaleString()} devices using ${fpProjections[fpProjections.length - 1].monthlyGB.toFixed(1)} GB/month.
${fpProjections[fpProjections.length - 1].monthlyGB > 100 ? ' Plan for CDN/caching and consider CoAP to reduce per-message overhead.' : ' Standard cloud tier should handle this volume.'}
</div>
</div>`Fleet Bandwidth Planner
Fleet Bandwidth Planner
animation
rest
protocols
Try Change "Annual growth rate (%):" and "Projection years:" after setting "Current fleet size:". Then press Calculate fleet bandwidth.
Observe After pressing Calculate fleet bandwidth, compare Devices, Req/sec, and Daily (GB) as "Annual growth rate (%):" changes.
Explain Describe how "Message interval (seconds):" determines requests per second and daily traffic after you press Calculate fleet bandwidth.
Technical boundaries. Projections apply constant annual growth while message size and interval stay fixed. Monthly traffic uses 30 days; the result is not a permanent forecast.
Fleet Bandwidth Planner
Use the planner to test when fleet growth invalidates an API capacity assumption. Set Current fleet size and Message interval first because together they determine requests per second; then change Average message size to expose the payload contribution to daily traffic. Apply Annual growth rate and Projection years last, and compare the Devices, Req/sec, Daily (GB), and Monthly (GB) outputs year by year. The result belongs in the deployment record alongside headroom and a review trigger, rather than being treated as a permanent forecast.