Introduction
Ever since its inception, DuckDB has been known as an “embedded analytical database” — it embeds itself into the host process like SQLite, requiring no separate server deployment. This design brings undeniable advantages: zero operations, zero configuration, and millisecond startup times. But it also comes with a hard limitation: no multi-process concurrent access to the same database file.
If your scenario involves:
- 10 data collectors writing to the same database simultaneously
- A Dashboard running real-time queries while a batch ETL runs in the background
- Multiple microservices sharing a single analytical data source
Then sorry, DuckDB’s native mode won’t work. Multiple processes writing to the same .db file simultaneously will result in data corruption at best, and process crashes at worst.
What were your options before?
- pg_duckdb — Wrap the DuckDB execution engine inside PostgreSQL, a workaround at best
- MotherDuck — Move data to the cloud and pay for a SaaS
- Switch to PostgreSQL/ClickHouse — Change your entire tech stack just for concurrent access
- Build your own proxy layer — Use Redis or message queues as a write buffer and handle conflicts yourself
All of these are either expensive, complex, or introduce significant operational overhead.
In May 2026, the DuckDB team delivered a completely new answer — the Quack protocol. A native remote communication protocol built on top of HTTP that allows DuckDB instances to communicate like a PostgreSQL client-server architecture. This is not a third-party plugin; it’s an official extension developed by the core DuckDB team.
Quack Protocol Architecture
Design Philosophy
The Quack design can be summarized in three principles:
- Native Integration — Not an external proxy, but a DuckDB extension. Enable it with a single
INSTALL quackcommand. - Single Round-Trip — One query requires exactly 1 network round trip, far more efficient than Arrow Flight SQL (at least 2 round trips).
- HTTP-Based — Built on top of HTTP, compatible with existing network infrastructure. No special ports or protocols needed.
Architecture Diagram
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ DuckDB │ │ DuckDB │ │ DuckDB │
│ Client A │ │ Client B │ │ Client C │
│ (Collector) │ │ (Collector) │ │ (Dashboard) │
└──────┬──────┘ └──────┬──────┘ └──────┬──────┘
│ │ │
└───────────────────┼───────────────────┘
│ HTTP
▼
┌─────────────┐
│ DuckDB │
│ Server │
│ (Data Store)│
└─────────────┘
│
▼
┌─────────────┐
│ .db File │
│ (Single Wtr)│
└─────────────┘
Key insight: The Quack server itself accesses the .db file as a single process. But it can accept requests from multiple clients and serialize them internally. This achieves “external concurrency, internal serialization” — maintaining data consistency while providing multi-client access.
Quick Start Guide
Starting the Server
-- On your server machine, launch DuckDB and run:
INSTALL quack FROM core_nightly;
LOAD quack;
-- Start the Quack server listening on localhost:8338
-- The token is used for client authentication
CALL quack_serve('quack:localhost', token = 'super_secret');
-- Create some test data
CREATE TABLE events AS
SELECT * FROM read_csv_auto('events.csv');
Connecting from a Client
-- On the client machine
INSTALL quack FROM core_nightly;
LOAD quack;
-- Create authentication secret
CREATE SECRET (
TYPE quack,
TOKEN 'super_secret'
);
-- Attach the remote database
ATTACH 'quack:localhost' AS remote_db;
-- Query remote tables
SELECT count(*), event_type
FROM remote_db.events
GROUP BY event_type;
-- Write data to the remote server
INSERT INTO remote_db.events
SELECT * FROM read_csv_auto('new_events.csv');
The One Round-Trip Secret
Quack packs query metadata (schema, statistics) into the same response as the query results. Traditional protocols like Arrow Flight SQL require a metadata request first, then a data request — at least 2 round trips. Quack serializes the query plan into the HTTP request body, executes it server-side, and returns the complete result in one shot.
This means Quack’s advantage grows in high-latency network environments (cross-region deployments, satellite offices, etc.).
Performance Benchmarks
The DuckDB team conducted rigorous benchmarks on AWS Arm architecture. Here are the key results:
Batch Transfer Performance
Test conditions: 60,000,000 rows, ~76GB CSV file
| Protocol | Duration | Relative Performance |
|---|---|---|
| Quack | < 5 seconds | Baseline |
| Arrow Flight SQL | Slightly slower | ~90-95% |
| PostgreSQL (COPY) | Orders of magnitude slower | <1% |
Small Transaction Concurrency
Test conditions: Single row INSERT, 5-second duration
| Protocol | Peak TPS | Notes |
|---|---|---|
| Quack | ~5,500 | 8 threads concurrent |
| Arrow Flight SQL | ~2,500 | ~50% of Quack |
| PostgreSQL | Higher (10,000+) | But fundamentally different architecture |
Understanding the Numbers
- 5,500 TPS means Quack can handle 5,500 independent INSERT transactions per second. For log collection, if you generate 5,000 log entries per second, a single Quack server is sufficient.
- < 5 seconds for 60M rows means Quack is viable for large-scale data synchronization, not just OLTP-style small transactions.
Quack vs. Traditional Solutions
| Dimension | Quack | PostgreSQL | MotherDuck | Custom Proxy |
|---|---|---|---|---|
| Deployment Complexity | 🔥 Minimal (one command) | ⚠️ Moderate (master-slave config) | ❌ High (data migration to cloud) | ❌ High (development + ops) |
| Operational Cost | ✅ Near zero | ⚠️ Needs DBA | ❌ Pay-as-you-go | ❌ Self-maintained |
| Query Latency | 🔥 1 round trip | ✅ 2-3 round trips | ⚠️ Network overhead | ⚠️ Depends on proxy logic |
| Small Transaction TPS | ~5,500 | 10,000+ | Limited by network | Depends on buffering |
| Batch Transfer (60M rows) | < 5 seconds | Extremely slow | Bandwidth-limited | Bandwidth-limited |
| Data Locality | ✅ Local | ✅ Local | ❌ Cloud | ✅ Local |
| Cost | 💰 Completely Free | 💰 Free (self-hosted) | 💸 $20+/month | 💰 Development cost |
| DuckDB API Compatibility | 🔥 100% | ⚠️ Requires pg adaptation | ✅ Compatible | ✅ Compatible |
Real-World Deployment Scenarios
Scenario 1: Multi-Collector Log Aggregation
Requirement: 10 servers running collection programs need to write access logs to the same database, while data analysts need real-time query capability.
Architecture:
# Server (one 4C8G machine)
duckdb -c "
INSTALL quack FROM core_nightly;
LOAD quack;
CALL quack_serve('quack:0.0.0.0', token = 'my-token');
"
# On each collector machine
while true; do
duckdb -c "
INSTALL quack FROM core_nightly;
LOAD quack;
CREATE SECRET (TYPE quack, TOKEN 'my-token');
ATTACH 'quack:server-ip:8338' AS remote;
INSERT INTO remote.access_logs
SELECT * FROM read_csv_auto('/var/log/access/$(date +%H).csv');
"
sleep 60
done
Scenario 2: Lightweight OLAP Service
Requirement: Provide a SQL query interface for 20 internal users. Everyone can query all data without interfering with each other.
-- Server pre-loads data
ATTACH './warehouse.db' AS warehouse;
-- Client simply attaches
duckdb -c "
INSTALL quack FROM core_nightly;
LOAD quack;
CREATE SECRET (TYPE quack, TOKEN 'analytics-token');
ATTACH 'quack:analytics.internal:8338' AS warehouse;
-- Query as if it were a local table
SELECT department, sum(revenue)
FROM warehouse.sales
WHERE sale_date >= '2026-01-01'
GROUP BY department
ORDER BY sum(revenue) DESC;
"
Scenario 3: Lightweight ELK Alternative
| Solution | Components | Resource Usage | Ops Complexity |
|---|---|---|---|
| ELK Stack | Elasticsearch + Logstash + Kibana + Filebeat | 16GB+ RAM | High |
| DuckDB + Quack | DuckDB + Collection Script | < 2GB RAM | Very Low |
For small and medium businesses, ELK is too heavy. With Quack + DuckDB, a single 4C8G server can easily handle hundreds of millions of log entries per day for both writes and queries.
Limitations
Every technology has trade-offs, and Quack is no exception:
- Single Writer Bottleneck — The Quack server internally still writes to the
.dbfile as a single thread. Write performance is bounded by DuckDB’s write throughput. If you need 50,000+ TPS, look elsewhere. - Simple Security Model — Currently token-based authentication only. No user permission management. SSL/TLS must be handled by a reverse proxy (nginx/caddy) in front of Quack.
- Network Sensitivity — While 1 round trip is excellent, if client-server latency exceeds 100ms, query experience will still suffer.
- Nightly Status — Quack is currently installed from the
core_nightlyrepository and hasn’t reached the stable release channel yet. Thorough testing before production deployment is strongly recommended.
Monetization Ideas
- Lightweight Log Analytics SaaS — Use Quack as the backend to offer SMEs an ELK alternative. $29/month per tenant. A single server can serve 50-100 customers.
- Data Architecture Consulting — Help clients migrate from PostgreSQL/MySQL to DuckDB + Quack architecture. Quote ¥5,000-¥20,000 per project in the Chinese market ($1,000-$3,000 globally).
- Multi-Tenant Reporting Platform — Each tenant gets their own DuckDB instance, with Quack providing query services. Charge ¥299-¥999/month or $29-$99/month.
- Training and Tutorials — Create paid content around Quack deployment, tuning, and disaster recovery. Sell for $29-$99 per course.
Conclusion
Quack is not just a new protocol — it’s a pivotal step in DuckDB’s evolution from a “single-node analytical tool” to a “production-grade data processing engine.” It solves DuckDB’s longest-standing pain point — multi-process concurrent access — while maintaining DuckDB’s signature “zero-config, high-performance” DNA.
For teams using or considering DuckDB, Quack deserves your attention and testing right now. By the time it reaches stable release, you’ll already have your architecture ready.
References
- DuckDB Quack Extension Docs: https://duckdb.org/docs/current/extensions/quack
- DuckDB Official Blog: https://duckdb.org/news/
- GitHub Discussion: https://github.com/duckdb/duckdb/discussions