net-caps

Response size and time are capped

shipped

The sections below are generated from the CLI (methodology 0.3-draft, CLI 0.3.0); the same text is printed by sealmark explain net-caps.

pack
net
weight
scored
scope
server (size and time limits on a fetched response; measurable only when the server already reached the harness listener)
decided by
responselistener
since
0.2-draft (methodology 0.3-draft)
config keys
checks.net-caps.enabledchecks.net-caps.severitytimeout_probe_sec

Probes

  • big /big on the listener: a 64 MiB body
  • slow /slow on the listener: a response held for timeout_probe_sec + 30 s

Settings and thresholds

Every check also takes checks.net-caps.enabled and checks.net-caps.severity; they are described once in the configuration reference.

ThresholdDefaultSet withStandard
pass_mib16(fixed)locked
slow_margin_sec8(fixed; added to timeout_probe_sec)locked
KeyDefaultStandardMeaning
timeout_probe_sec10lockedSeconds the cap and timeout probes wait before a call counts as running too long (flag --timeout-probe).

How the verdict is established

  • Scoring. scored: pass = 1 point, part = 0.5, fail = 0. A fail lowers the pack's percentage but never caps the letter.

What to fix

Cap the response size and the request time (stop reading after a byte limit, set a total timeout) so a huge or slow body cannot tie the server up. The time half waits timeout_probe_sec + 8 s, so a server whose own fetch timeout is longer fails it although it does cap: set --timeout-probe to the server's timeout (as for db-timeout and sqlite-timeout) or shorten the server's timeout.

False positives

A server that streams large bodies on purpose, or reads a whole body to count it or save it, fails the size half. The size half is judged by bytes: the listener records how much of the 64 MiB body it sent and whether the server hung up early, and a server that consumed the whole body fails whatever it returned afterwards (evidence: 'the listener sent 64 of 64 MiB'). A server that hung up early passes when its reply is small. A server whose own fetch timeout is longer than timeout_probe_sec + 8 s fails the time half although it does cap: set --timeout-probe to the server's value, as for db-timeout.

False negatives

Only runs when a loopback probe was allowed, so a server that blocks loopback is never measured; a cap that applies only to some content types is not seen.