Agent Wranglers

INF-62Required

Test the service against every platform limit

Keep a file of each platform limit the service can hit, with its value, plan and date from the provider's documents. Test the slowest request, the largest body and the peak memory against those limits before launch.

How to do it

Look up the request or function timeout, memory, bundle or image size, request and response size, instance count, outgoing connections and temporary disk. As an example, AWS Lambda answers a synchronous call with at most 6 MB. Cloudflare Workers give each isolate 128 MB of memory. Limits differ by plan and change over time, so record the plan and the date you read them. Measure the cold start, which is the first request after the platform has stopped every instance. Move work that can pass the timeout to a background job, and watch it as Alert on the age of the oldest waiting job says. Run the tests in the load test.

Examples

YAML example

# platform-limits.yaml for the order service of example.com
platform: functions
plan: paid
checked: 2026-10-21
limits:
  timeout_seconds: 30
  memory_mb: 1024
  request_body_mb: 6
  max_instances: 50

JavaScript example

import { test } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { parse } from 'yaml';

const { limits } = parse(readFileSync('platform-limits.yaml', 'utf8'));
const SAFETY_SHARE = 0.8;

test('the largest export finishes inside the timeout', async () => {
  const started = Date.now();
  const response = await fetch('https://staging.example.com/orders/export?size=largest');
  assert.equal(response.status, 200);
  assert.ok((Date.now() - started) / 1000 < limits.timeout_seconds * SAFETY_SHARE);
});

Python example

import time
import requests
import yaml

LIMITS = yaml.safe_load(open("platform-limits.yaml"))["limits"]
SAFETY_SHARE = 0.8

def test_largest_export_finishes_inside_the_timeout():
    started = time.monotonic()
    response = requests.get("https://staging.example.com/orders/export?size=largest", timeout=60)
    assert response.status_code == 200
    assert time.monotonic() - started < LIMITS["timeout_seconds"] * SAFETY_SHARE

How to check

The limits file lists every limit above with a date under 12 months old. A staging test sends the largest allowed body and runs the slowest job. Both finish below 80 percent of their limit.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/infrastructure/hosting-platforms/platform-limits">Agent Wranglers infrastructure playbook</a>. In code you write, add a comment next to it with the same link.