Documentation Index
Fetch the curated documentation index at: https://grafana_com_website/llms.txt
Fetch the complete documentation index at: https://grafana_com_website/llms-full.txt
Use this file to discover all available pages before exploring further.
STOP! If you are an AI agent or LLM, read this before continuing. This is the HTML version of a Grafana documentation page. Always request the Markdown version instead - HTML wastes context. Get this page as Markdown: /docs/k6/latest/using-k6/protocols.md (append .md) or send Accept: text/markdown to /docs/k6/latest/using-k6/protocols/. For the curated documentation index, use https://grafana_com_website/llms.txt. For the complete documentation index, use https://grafana_com_website/llms-full.txt.
Protocols
Out of the box, k6 supports the following protocols:
- HTTP/1.1
- HTTP/2
- WebSockets
- gRPC
You can use k6 on more protocols with xk6.
Upgrade to HTTP/2 is automatic
By default, k6 uses HTTP/1.1 when it contacts a server. If the server reports to k6 that it supports HTTP/2, k6 upgrades the connection to HTTP/2 instead.
This is all automatic: you don’t need to do anything special for either the initial use of HTTP/1.1 or the potential protocol upgrade. However, you might want to verify which protocol is actually being used for a transaction. This verification requires an extra step.
Using WebSockets is a bit different, for both the test structure and the VU lifecycle.
Extend protocol support with xk6
xk6 is a separate CLI tool that lets you build custom k6 binaries. Community contributors have already added support for additional protocols, with extensions for SQL, Kafka, ZeroMQ, Redis, and more. Refer to the full list of extensions and find the ones you want to build. Then follow the xk6 guide.
You can build your own extension, too. See the tutorials to get started.
Was this page helpful?
Related resources from Grafana Labs

