Probe results
Measured on 2026-11-14 with the probe on the php85 (PHP 8.5.12) and php84 (PHP 8.4.27) runtimes, region fr-par.
Both runtimes behaved identically.
Client addresses are replaced with documentation addresses (2001:db8::1, 203.0.113.66).
Process
- The runtime is one long-lived PHP CLI process (
sapi=cli, pid 8) running a ReactPHP HTTP server (/home/app/index.php,SCW_RUNTIME_BRIDGE) that includes/home/app/function/handler.phpand callshandle(). - Warm Processes are reused: consecutive Invocations hit the same pid with an increasing counter.
$_SERVER['SCRIPT_FILENAME'],PHP_SELFandargv[0]are/home/app/index.php;$_GET,$_POST,$_COOKIE,$_FILESare empty.- The working directory is
/home/app/function, which is writable, as is/tmp. - Function environment variables (plain and secret) reach
getenv(); the platform also setsSCW_APPLICATION_NAME,SCW_APPLICATION_ID,SCW_NAMESPACE_ID,SCW_APPLICATION_REGION,SCW_APPLICATION_MEMORY,SCW_PAYLOAD_MAX_SIZE(6291456),SCW_PUBLIC,SCW_HANDLER_NAME,SCW_HANDLER_PATH. - Anything written to stdout does not end up in the response body.
- An uncaught exception yields
500with the bodyError while executing function.
Deployment and Composer
- When the zip has a
composer.jsonat its root, Scaleway runscomposer installat deploy time (COMPOSER_DEV_MODE=0, i.e.--no-dev) in/home/app/function, replacing any shippedvendor/. - A shipped
composer.lockis respected (a package pinned to an older version in the lock was installed at that version). - Composer scripts run (
post-install-cmd;post-update-cmdwhen no lock is shipped). - Function environment variables are not available to Composer scripts at deploy time (
APP_ENVand custom variables were unset). - A failing Composer script does not fail the deployment: the function still becomes
ready. - With
composer.jsonandvendor/in a subdirectory instead of the zip root, Scaleway does not run Composer and keeps the shippedvendor/.
HTTP Event
Keys: resource, path, httpMethod, headers, multiValueHeaders (null), queryStringParameters, multiValueQueryStringParameters (null), pathParameters (null), stageVariables, requestContext (with httpMethod), body, isBase64Encoded.
- The method is in
httpMethod; there is nomethodkey. queryStringParametersis decoded, sorted by key, and keeps the last value of repeated keys:?repeated=a&repeated=b&list[]=x&list[]=ygives{"repeated": "b", "list[]": "y"}; it is an empty list[]when there is no query string.- Header names are canonicalised (
X-Custom,User-Agent), single string values. - There is no
Hostheader. isBase64Encodedistruewith a base64 body for binary and multipart bodies,truewith an empty body for GET, and absent for text bodies (JSON, plain text).- Bodies up to 6 MiB are accepted; 7 MiB is rejected by the platform with
413before reaching the function.
Headers added by the platform on an external HTTP call:
Forwarded: for="[2001:db8::1]";proto=https, for=100.96.1.187
K-Proxy-Request: activator
X-Envoy-External-Address: 2001:db8::1
X-Forwarded-For: 2001:db8::1, 100.96.1.187, 100.96.38.33
X-Forwarded-Proto: https
X-Real-Ip: 2001:db8::1
X-Request-Id: <uuid>
Headers sent by the client:
| Header | Behaviour |
|---|---|
X-Forwarded-For |
Client value prepended: 203.0.113.66,2001:db8::1, 100.96.2.180, 100.96.36.219 |
X-Forwarded-Host, X-Forwarded-Port |
Passed through unchanged (forgeable) |
Forwarded |
Client value replaces the platform one (forgeable) |
X-Forwarded-Proto |
Overwritten with https |
X-Real-Ip, X-Envoy-External-Address, X-Request-Id, K-Proxy-Request |
Overwritten by the platform |
Host |
Not forwarded to the function (an unknown host routes to a 404) |
CRON Event
{
"path": "/",
"httpMethod": "POST",
"headers": {
"Content-Length": "40",
"Content-Type": "application/json",
"Forwarded": "for=100.96.2.180;proto=http",
"K-Proxy-Request": "activator",
"User-Agent": "Go-http-client/1.1",
"X-Forwarded-For": "100.96.2.180, 100.96.36.219",
"X-Forwarded-Proto": "http",
"X-Request-Id": "<uuid>"
},
"queryStringParameters": [],
"body": "{\"probe\":\"cron\",\"nested\":{\"list\":[1,2]}}"
}
- The trigger
argsarrive as a JSON string inbody, withoutisBase64Encoded. - CRON Events carry neither
X-Real-IpnorX-Envoy-External-Address, which the platform always sets (overwriting client values) on external HTTP calls.
Context
An array: {"memoryLimitInMb": 256, "functionName": "probe-php85", "functionVersion": ""}.
Function Response
- Array header values are sent as repeated headers (
Set-Cookieincluded). - Binary bodies with
isBase64Encoded: trueare decoded by the platform. - Without
headers, the response getsContent-Type: text/plain; charset=utf-8. - Custom status codes pass through (
418). HEADresponses carryContent-Lengthand no body.- The platform adds
Access-Control-Allow-Origin: *andAccess-Control-Allow-Headers: Content-Typeto every response.
Terraform
- Replacing a function (for example changing
runtime) deletes its CRON triggers server side; Terraform recreates them only on the next apply.
Not measured
- Cockpit logs (where stdout and uncaught exceptions are logged).
- Whether a deployment with a failing Composer script serves the new code or keeps the previous version.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|