Skip to the content.

Protocols

Crankfire speaks four protocols out of the box:

All protocols share the same scheduling and reporting engine, so you can compare behavior under identical workloads. Select the protocol per run with --protocol (or protocol: in config); multi-protocol mixes in a single run are not supported yet.

HTTP

Basic

crankfire --target https://api.example.com --total 1000

POST with Body

crankfire --target https://api.example.com/data \
  --method POST \
  --header "Content-Type=application/json" \
  --body '{"user":"test"}' \
  --concurrency 10 \
  --total 500

WebSocket

Enable WebSocket mode with --protocol websocket or protocol: websocket in config.

crankfire --protocol websocket \
  --target ws://localhost:8080/ws \
  --ws-messages '{"type":"ping"}' \
  --ws-message-interval 1s \
  --concurrency 10 \
  --duration 30s

WebSocket runs reuse the global headers section, so OAuth tokens (from the auth block) and feeder placeholders flow into the handshake plus each message you send.

See Usage Examples for more recipes.

Server-Sent Events (SSE)

crankfire --protocol sse \
  --target http://localhost:8080/events \
  --sse-read-timeout 30s \
  --sse-max-events 100 \
  --concurrency 20 \
  --duration 2m

Use feeders to parameterize query strings or headers (e.g., https://events.example.com/stream?topic=). OAuth headers are injected automatically when configured.

gRPC

gRPC mode uses a .proto file and JSON messages.

crankfire --protocol grpc \
  --target localhost:50051 \
  --grpc-proto-file ./hello.proto \
  --grpc-service helloworld.Greeter \
  --grpc-method SayHello \
  --grpc-message '{"name":"LoadTest"}' \
  --concurrency 10 \
  --duration 30s

Key points:

See Usage Examples for TLS, metadata, and feeder integration.