Payload Format
A payload format defines the structure and encoding of data transmitted between systems. In time-series databases, payload formats specify how data points, timestamps, and metadata are organized for efficient ingestion, storage, and retrieval.
Understanding payload formats in time-series systems
Payload formats provide a contract between data producers and consumers, defining how information is structured during transmission. For time-series data, these formats typically include specifications for:
- Timestamp representation and precision
- Measurement values and their data types
- Associated metadata and tags
- Batch or single event organization
Next generation time-series database
QuestDB is an open-source time-series database optimized for market and heavy industry data. Built from scratch in Java and C++, it offers high-throughput ingestion and fast SQL queries with time-series extensions.
Common payload format types
Line protocols
Line protocol formats represent each data point as a text line, combining simplicity with efficiency. Example structure:
measurement,tag1=value1,tag2=value2 field1=value1,field2=value2 timestamp
Structured formats
Structured formats like JSON Lines and Protocol Buffer provide richer data modeling capabilities:
{"timestamp": 1632150000000,"metric": "cpu_usage","value": 85.4,"tags": {"host": "server1","datacenter": "us-east"}}
Next generation time-series database
QuestDB is an open-source time-series database optimized for market and heavy industry data. Built from scratch in Java and C++, it offers high-throughput ingestion and fast SQL queries with time-series extensions.
Performance considerations
The choice of payload format impacts several system characteristics:
-
Parsing efficiency: Binary formats like Protobuf typically offer faster parsing than text-based formats
-
Storage efficiency: Compact formats reduce network bandwidth and storage requirements
-
Schema flexibility: Some formats support schema evolution while others require fixed schemas
-
Time precision: Different formats support varying levels of timestamp precision and representation
Integration with time-series systems
Payload formats interact with several database components:
- Ingestion pipelines validate and process incoming data
- Storage engines may optimize storage based on format characteristics
- Query engines can leverage format-specific optimizations
Best practices for payload format selection
-
Match your use case:
- High-frequency data may benefit from binary formats
- Human-readable formats suit debugging and development
- Consider schema flexibility requirements
-
Consider the full pipeline:
- Ensure tools and libraries support your chosen format
- Evaluate parsing and processing overhead
- Plan for format evolution and versioning
-
Monitor and optimize:
- Track ingestion latency
- Measure compression ratios
- Evaluate query performance impact