Lambda Dispatch Demo App

This application demonstrates various features of the Lambda Dispatch system. Use the endpoints below to test different aspects of the service.

Health and Status Endpoints

GET /health-quick

Quick health check that doesn't wait for initialization.

curl http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/health-quick

GET /health

Full health check that ensures initialization is complete (waits for 7000ms).

curl http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/health

GET /ping

Simple ping endpoint that returns "pong".

curl http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/ping

Load test with hey:

hey -h2 -c 100 -n 10000 http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/ping

GET /headers

Returns all HTTP headers from the incoming request as JSON.

curl http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/headers

Delay and Streaming Endpoints

GET /delay

Delays the response by the specified number of milliseconds.

curl http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/delay?delay=500

GET /chunked-response

Returns a chunked response with an initial payload, 5 second delay, then final payload.

curl http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/chunked-response

Echo Endpoints

POST /echo

Streams the request body directly to the response with back pressure.

curl -X POST -H "Content-Type: text/plain" --data "Hello World" http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/echo

Debug mode:

curl -X POST -H "Content-Type: text/plain" -H "X-Lambda-Dispatch-Debug: true" --data "Hello World" http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/echo

POST /echo-slow

Reads the entire request body into memory before sending the response.

curl -X POST -H "Content-Type: text/plain" --data "Hello World" http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/echo-slow

POST /double-echo

Echoes each chunk of the request body twice, doubling the response size.

curl -X POST -H "Content-Type: text/plain" --data "Hello World" http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/double-echo

POST /half-echo

Echoes half of each chunk of the request body, halving the response size.

curl -X POST -H "Content-Type: text/plain" --data "Hello World" http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/half-echo

ALL /debug

Returns the request line, headers, and body. Works with any HTTP method.

curl -X POST -H "Content-Type: text/plain" --data "Hello World" http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/debug

AWS Service Endpoints

GET /read-s3

Reads an image file from S3 and returns it. Good for testing larger payloads.

curl -o image.jpg http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/read-s3

Load test with hey:

hey -h2 -c 100 -n 1000 http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/read-s3

GET /read

Reads a random item from DynamoDB.

curl http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/read

Load test with k6:

k6 run k6/read-dynamodb-constant.js

GET /odd-status

Returns an unusual HTTP status code (519).

curl -i http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/odd-status

Static Files

GET /public/silly-test-image.jpg

Serves a static image file stored in the application.

curl -o local-image.jpg http://lambdadispatch-demoapp-pr-274.ghpublic.pwrdrvr.com/public/silly-test-image.jpg