---
title: "Test the service against every platform · Agent Wranglers"
url: https://agentwranglers.se/playbook/infrastructure/hosting-platforms/platform-limits
updated: 2026-10-21
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Test the service against every platform limit

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Hosting platforms](https://agentwranglers.se/playbook/infrastructure/hosting-platforms.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers). Updated 2026-10-21.

- ID: INF-62
- Level: Required
- Chapter: [Hosting platforms](https://agentwranglers.se/playbook/infrastructure/hosting-platforms)
- Rule: 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.
- Risk: The app down or unusable
- How: 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](https://agentwranglers.se/playbook/operations/alerts-and-on-call/queue-age) says. Run the tests in the [load test](https://agentwranglers.se/playbook/testing/non-functional-tests/load-tests).
- 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.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### YAML example

```yaml
# 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

```js
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

```python
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
```

## Sources

- [AWS Lambda quotas](https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html)
- [Cloudflare Workers limits](https://developers.cloudflare.com/workers/platform/limits/)

## Related rules

- [Alert on the age of the oldest waiting job](https://agentwranglers.se/playbook/operations/alerts-and-on-call/queue-age) in Operations
- [Test load against a budget](https://agentwranglers.se/playbook/testing/non-functional-tests/load-tests) in Testing

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/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.

- Previous: [Choose the hosting model from written needs](https://agentwranglers.se/playbook/infrastructure/hosting-platforms/hosting-model)
- Next: [Keep production data and secrets out of previews](https://agentwranglers.se/playbook/infrastructure/hosting-platforms/preview-isolation)
- [Hosting platforms](https://agentwranglers.se/playbook/infrastructure/hosting-platforms)
