<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/running-sql-concurrently-across-three-remote-duckdb-servers-with-quack-hpeijlvpf" -->

---
title: Running SQL Concurrently Across Three Remote DuckDB...
description: An experimental Quack protocol for DuckDB lets databases on separate servers communicate over HTTP. Setting up a three-node AWS EC2 cluster (via...
canonical: https://daily.dev/posts/running-sql-concurrently-across-three-remote-duckdb-servers-with-quack-hpeijlvpf
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Running SQL Concurrently Across Three Remote DuckDB Servers with Quack | daily.dev
og:description: An experimental Quack protocol for DuckDB lets databases on separate servers communicate over HTTP. Setting up a three-node AWS EC2 cluster (via...
og:url: https://daily.dev/posts/running-sql-concurrently-across-three-remote-duckdb-servers-with-quack-hpeijlvpf
og:image: https://api.daily.dev/og/posts/hPeIJLVPF.png
og:image:alt: Running SQL Concurrently Across Three Remote DuckDB Servers with Quack
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Running SQL Concurrently Across Three Remote DuckDB Servers with Quack

**[Towards Data Science](https://daily.dev/sources/tds)** · 19 min read · 0 upvotes · 0 comments

## Summary

An experimental Quack protocol for DuckDB lets databases on separate servers communicate over HTTP. Setting up a three-node AWS EC2 cluster (via CloudFormation) with a Python coordinator, concurrent SQL statements are fired against each remote DuckDB instance simultaneously using thread barriers, with timings and results gathered on a coordinator node. Examples cover simple aggregations, complex analytical queries, concurrent writes/reads with snapshot isolation behavior, and DDL operations. The setup costs roughly $0.12 for four hours on AWS. DuckDB's team has flagged Quack as experimental and not production-ready, with the protocol, function names, and defaults subject to change.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://towardsdatascience.com/running-sql-concurrently-across-three-remote-duckdb-servers-with-quack>

## Questions this post answers

### What is the Quack protocol in DuckDB used for?

Quack is an experimental DuckDB protocol that lets DuckDB databases on different servers communicate with each other over HTTP in a client/server arrangement, allowing one server to read or write another's data. It is not distributed query processing; the DuckDB team explicitly says it does not facilitate that. It is currently a work-in-progress, so its protocol, function names, settings, and defaults may change, and it should not be used in production.

_Track how experimental features like Quack evolve before betting a database architecture on them, with daily.dev._

### How do you run concurrent SQL queries against multiple remote DuckDB servers at once?

A coordinator process can create one thread per SQL fragment, synchronize them with a threading.Barrier so they release together, then have each thread open its own local DuckDB connection that loads the Quack extension, attaches the remote worker, and sends the statement through remote.query(). Results and per-fragment timing, including start offset and duration, are collected and displayed together on the coordinator once every future completes.

_Compare concurrency patterns like this when deciding how to fan out SQL across distributed databases, with daily.dev._

### What happens when you run concurrent inserts and reads against the same DuckDB table over Quack?

Each read sees a consistent snapshot containing whichever independent insert transactions had committed before that read began, so a concurrent SELECT may see none, some, or all of the new rows, but never a partially applied insert. Each insert runs as its own separate autocommit transaction, so if some inserts fail, the successful ones stay committed; there is no distributed transaction and no rollback of successful statements.

_Follow concurrency and consistency behavior like this before relying on new database tooling, with daily.dev._

## Similar posts on daily.dev

- [DuckDB Quack: Client/Server Protocol over HTTP for Multi-User Analytics](https://daily.dev/posts/duckdb-quack-client-server-protocol-over-http-for-multi-user-analytics-kclxrezzv) · InfoQ · 1 upvotes · 0 comments
- [Giving DuckDB a Server With Quack](https://daily.dev/posts/giving-duckdb-a-server-with-quack-p5doobzc2) · Medium · 1 upvotes · 0 comments
- [Self-hosting DuckDB: the road to production](https://daily.dev/posts/self-hosting-duckdb-the-road-to-production-crsdobrlt) · MotherDuck · 1 upvotes · 0 comments

---

Tags: [#aws](https://daily.dev/tags/aws), [#sql](https://daily.dev/tags/sql), [#distributed-systems](https://daily.dev/tags/distributed-systems), [#duckdb](https://daily.dev/tags/duckdb), [#aws-cloudformation](https://daily.dev/tags/aws-cloudformation)

[View this post on daily.dev](https://daily.dev/posts/running-sql-concurrently-across-three-remote-duckdb-servers-with-quack-hpeijlvpf)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Running SQL Concurrently Across Three Remote DuckDB Servers with Quack","url":"https://daily.dev/posts/running-sql-concurrently-across-three-remote-duckdb-servers-with-quack-hpeijlvpf","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/running-sql-concurrently-across-three-remote-duckdb-servers-with-quack-hpeijlvpf"},"datePublished":"2026-08-16T13:51:20.252Z","dateModified":"2026-08-25T06:22:06.504Z","description":"An experimental Quack protocol for DuckDB lets databases on separate servers communicate over HTTP. Setting up a three-node AWS EC2 cluster (via...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/bc4853a49f77ff76ebcd61b223c2d8dc?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/bc4853a49f77ff76ebcd61b223c2d8dc?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Towards Data Science","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Towards Data Science","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/tds","url":"https://daily.dev/sources/tds"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/running-sql-concurrently-across-three-remote-duckdb-servers-with-quack-hpeijlvpf","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"aws,sql,distributed-systems,duckdb,aws-cloudformation","timeRequired":"PT19M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Towards Data Science","item":"https://daily.dev/sources/tds"},{"@type":"ListItem","position":3,"name":"Running SQL Concurrently Across Three Remote DuckDB Servers with Quack"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/running-sql-concurrently-across-three-remote-duckdb-servers-with-quack-hpeijlvpf#faq","mainEntity":[{"@type":"Question","name":"What is the Quack protocol in DuckDB used for?","acceptedAnswer":{"@type":"Answer","text":"Quack is an experimental DuckDB protocol that lets DuckDB databases on different servers communicate with each other over HTTP in a client/server arrangement, allowing one server to read or write another's data. It is not distributed query processing; the DuckDB team explicitly says it does not facilitate that. It is currently a work-in-progress, so its protocol, function names, settings, and defaults may change, and it should not be used in production. Track how experimental features like Quack evolve before betting a database architecture on them, with daily.dev."}},{"@type":"Question","name":"How do you run concurrent SQL queries against multiple remote DuckDB servers at once?","acceptedAnswer":{"@type":"Answer","text":"A coordinator process can create one thread per SQL fragment, synchronize them with a threading.Barrier so they release together, then have each thread open its own local DuckDB connection that loads the Quack extension, attaches the remote worker, and sends the statement through remote.query(). Results and per-fragment timing, including start offset and duration, are collected and displayed together on the coordinator once every future completes. Compare concurrency patterns like this when deciding how to fan out SQL across distributed databases, with daily.dev."}},{"@type":"Question","name":"What happens when you run concurrent inserts and reads against the same DuckDB table over Quack?","acceptedAnswer":{"@type":"Answer","text":"Each read sees a consistent snapshot containing whichever independent insert transactions had committed before that read began, so a concurrent SELECT may see none, some, or all of the new rows, but never a partially applied insert. Each insert runs as its own separate autocommit transaction, so if some inserts fail, the successful ones stay committed; there is no distributed transaction and no rollback of successful statements. Follow concurrency and consistency behavior like this before relying on new database tooling, with daily.dev."}}]}
```

