Key Features
Blazing Fast
Super Easy Integration
Analytics Ready
Memory Efficient
Built-in Streaming
Battle-Tested
Cross-Platform
Monitoring Ready
Batch Write
Data Export
Gorilla Compression
Advanced Analytics
Why is GTSDB so efficient?
Most databases separate their write path and read path with layers of abstraction — a write-ahead log (WAL) for durability, a buffer pool for caching, and separate index structures for querying. Each layer adds latency and memory overhead. GTSDB takes a fundamentally different approach: the WAL is the database.
Instead of maintaining a separate buffer pool and periodically flushing pages to disk, GTSDB appends every write directly to a per-key append-only file. There is no double-writing — data goes straight from the network socket to the WAL and into a ring buffer cache. This eliminates the memory amplification that comes from maintaining both a write buffer and a read cache. The ring buffer, configured per-key with up to 10,000 slots, serves recent reads directly from memory without any disk access. For a typical IoT workload where the latest readings matter most, virtually every read hits the cache.
But the real performance breakthrough is in how GTSDB handles the read path. Traditional databases serialize query results into verbose JSON, with each data point carrying repeated field names like "timestamp" and "value". At 5,000 points per query, this adds up to hundreds of kilobytes of redundant text. GTSDB introduces an optional binary protocol: each data point becomes a fixed 16-byte record — an 8-byte timestamp followed by an 8-byte IEEE 754 float. No parsing, no field name repetition, no reflection-based serialization overhead. The server writes raw bytes straight to the TCP socket; the client reads them back with zero allocation. On a multi-key read of 25,000 points, this alone takes the response time from 7 milliseconds down to 260 microseconds.
The JSON path is no slouch either. GTSDB uses Velox, a Go JSON library backed by a native C VM, which outperforms the standard library by an order of magnitude and even beats SIMD-based alternatives like Sonic. For writes and non-bulk reads where JSON remains the default, Velox handles marshaling in nanoseconds per operation.
Under the hood, a dirty-key async flusher ensures that only modified keys trigger disk syncs, avoiding the blanket fsync storms that plague append-only databases. When data does go to disk, Facebook's Gorilla time-series compression reduces storage by nearly 30x compared to raw JSON, making disk space a non-issue even on constrained edge devices.
The architecture scales down as well as it scales up. At idle, GTSDB uses about 6 MB of memory — less than a single browser tab. It ships as a single statically-linked binary with no external dependencies. Deploy it on a Raspberry Pi, a cloud VM, or a Windows server; the behavior is identical. This is what makes GTSDB uniquely suited for IoT: it does not ask you to choose between durability, speed, and footprint. It gives you all three.
Usages
POST /
{
"operation": "write",
"key": "a_sensor1",
"write": {
"value": 32242424243333333333.3333
}
}
Need more details? Check out our complete API documentation.
View Full API DocumentationClient Drivers
First-class Go & Node.js clients with JSON and binary protocol support
go get github.com/abbychau/gtsdb-drivers/go@latestimport "github.com/abbychau/gtsdb-drivers/go"
client, _ := gtsdb.Connect("localhost:5555")
client.Auth("your-token")
// JSON
client.Write("sensor1", 42.5)
pts, _ := client.ReadLast("sensor1", 100)
// 🚀 Binary — 100x faster
pts, _ := client.ReadBinary("sensor1", 5000)
multi, _ := client.MultiReadBinary(
[]string{"s1","s2"}, 5000,
) Go driver + docsnpm install github:abbychau/gtsdb-driversconst { GTSDBClient } = require('gtsdb-drivers')
const c = new GTSDBClient('localhost', 5555)
await c.connect()
await c.auth('your-token')
// JSON
await c.write('sensor1', 42.5)
const pts = await c.readLast('sensor1', 100)
// 🚀 Binary — 100x faster
const pts = await c.readBinary('sensor1', 5000)
const multi = await c.multiReadBinary(
['s1','s2'], 5000
) JS driver + docsPerformance Comparison
Write Benchmarks
Write (seq) — 5,000 pts
Batch Write — 5,000 pts
Pipeline Write — 5,000 pts
Multi-Sensor Write — 5 keys × 1,000 pts
Read Benchmarks
Single Read — Last 1 Point
Multi-Key Read — 5 Keys × 5,000 pts
Pub/Sub Delivery Latency (s)
Storage per 5,000 points (KB)
Resource Usage
CPU Time (s)
Memory (MB)
Disk (KB)
Benchmark Report Charts

Performance Radar

Throughput (ops/sec)

Resource Usage

Write Latency

Batch Write Comparison

Pipeline Write

Read Comparison

Multi-Sensor Write
Test Configuration
| Points per Operation | 5,000 |
| Sensors (multi-write) | 5 |
| Runs per Benchmark | 3 |
| Warmup Iterations | 300 |
| GTSDB JSON Library | Velox (native C VM backend) |
| GTSDB Cache Size | 10,000 ring buffer / key |
| Sync Mode | async (dirty-key flusher) (p.s. sync mode also available, and our clients love it :p) |
| OS | Windows |
| Architecture | amd64 |
| CPU | Core(TM) i7-13700KF |
Key Takeaways
vs InfluxDB
- 16.21x faster sequential write (90.97 ms vs 1474.15 ms)
- 9.21x faster pipeline write (29.4 ms vs 270.71 ms)
- 4.59x faster batch write (2.29 ms vs 10.52 ms)
- 3.56x faster multi-sensor write (2.37 ms vs 8.46 ms)
- 44.27x faster single read (<0.19 ms vs 8.35 ms)
- 18.13x faster multi-key read (0.72 ms vs 13.09 ms)
vs VictoriaMetrics
- 1.73x faster sequential write (90.97 ms vs 156.98 ms)
- 1.2x faster pipeline write (29.4 ms vs 35.19 ms)
- 3.55x faster multi-key read (0.72 ms vs 0.2 ms) 🏆
- 2.27x faster single read (0.19 ms vs 0.08 ms) 🏆
- VM leads batch write (2.46x) and multi-write (3.84x)
General
- JSON: Velox native C VM + binary protocol for reads
- Binary protocol: 16 bytes/point, zero-alloc encode/decode
- Multi-Key Read: 6,926,359 ops/sec — faster than VM
- Pub/Sub: 110.94 ms delivery latency
- 2,183,177 ops/sec batch write, 2,107,641 ops/sec multi-write
- 29.6x smaller than raw JSON with Gorilla compression
- Only ~12 MB memory usage at idle
- Single binary executable — no dependencies
GTSDB - 