Skip to main content
Slung accepts time-series metrics over WebSocket connections using a compact binary protocol. This approach provides high-throughput, low-latency ingestion suitable for real-time telemetry.

Ingestion Methods

Slung supports the following ingestion methods:

Binary WebSocket Protocol

The primary ingestion method uses a binary WebSocket protocol that sends metrics as compact binary frames. Each frame contains:
  • Timestamp (Unix microseconds)
  • Numeric value
  • Series name
  • Optional tags for metadata
This protocol is optimized for:
  • High throughput: Compact binary encoding minimizes bandwidth
  • Low latency: WebSocket connections eliminate HTTP overhead
  • Simplicity: Single connection handles all metrics

Connection Details

Default WebSocket URL: ws://127.0.0.1:2077 Connect using any WebSocket client and send binary frames following the WebSocket protocol specification.

Client SDKs

Official client SDKs handle protocol encoding and connection management:
  • TypeScript/Node.js: Full-featured SDK with streaming support
See the Client SDKs guide for installation and usage examples.

Message Format

Every metric message contains:
  • timestamp: Unix epoch in microseconds (i64)
  • value: Floating-point metric value (f64)
  • series: Series name identifying the metric type
  • tags: Key-value pairs for dimensions (e.g., sensor=1, env=prod)

Next Steps

WebSocket Protocol

Binary protocol specification and encoding details

Client SDKs

Use official SDKs to simplify integration

Build docs developers (and LLMs) love