<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/motherduck-on-cloudflare-workers-real-time-apps-at-the-edge-caqfsv4vi" -->

---
title: MotherDuck on Cloudflare Workers: real-time apps at the edge
description: A step-by-step guide to building a real-time voting app using Cloudflare Workers and MotherDuck. Since Cloudflare Workers don't support native DuckDB bindings,...
canonical: https://daily.dev/posts/motherduck-on-cloudflare-workers-real-time-apps-at-the-edge-caqfsv4vi
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: MotherDuck on Cloudflare Workers: real-time apps at the edge | daily.dev
og:description: A step-by-step guide to building a real-time voting app using Cloudflare Workers and MotherDuck. Since Cloudflare Workers don't support native DuckDB bindings,...
og:url: https://daily.dev/posts/motherduck-on-cloudflare-workers-real-time-apps-at-the-edge-caqfsv4vi
og:image: https://api.daily.dev/og/posts/cAQFsv4vI.png
og:image:alt: MotherDuck on Cloudflare Workers: real-time apps at the edge
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.

# MotherDuck on Cloudflare Workers: real-time apps at the edge

**[MotherDuck](https://daily.dev/sources/motherduck)** · 13 min read · 0 upvotes · 0 comments

## Summary

A step-by-step guide to building a real-time voting app using Cloudflare Workers and MotherDuck. Since Cloudflare Workers don't support native DuckDB bindings, the tutorial connects to MotherDuck via its Postgres endpoint using the `pg` npm package. The app uses Cloudflare Durable Objects for real-time consistent vote tracking across edge nodes, and queries MotherDuck for analytical data like sales summaries and location stats. The TypeScript backend routes API requests, while a D3-powered frontend polls for live vote updates every 5 seconds.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://motherduck.com/blog/motherduck-on-cloudflare-workers>

## Similar posts on daily.dev

- [MotherDuck Now Speaks Postgres](https://daily.dev/posts/motherduck-now-speaks-postgres-ghqhwqump) · MotherDuck · 5 upvotes · 0 comments
- [Vibe Code Data Apps with Vercel V0 & MotherDuck](https://daily.dev/posts/vibe-code-data-apps-with-vercel-v0-motherduck-83fdddbmt) · MotherDuck · 0 upvotes · 0 comments
- [Production at the Edge](https://daily.dev/posts/production-at-the-edge-ylvn9rvnh) · Flavio Copes · 0 upvotes · 0 comments
- [Customer-facing analytics with DuckDB and MotherDuck](https://daily.dev/posts/customer-facing-analytics-with-duckdb-and-motherduck-b8kbw45bw) · codecentric · 1 upvotes · 0 comments
- [DuckLake to MotherDuck: Validate locally, deploy to cloud in minutes](https://daily.dev/posts/ducklake-to-motherduck-validate-locally-deploy-to-cloud-in-minutes-qsfki85tt) · dltHub · 0 upvotes · 0 comments

---

Tags: [#cloudflare](https://daily.dev/tags/cloudflare), [#edge-computing](https://daily.dev/tags/edge-computing), [#duckdb](https://daily.dev/tags/duckdb)

[View this post on daily.dev](https://daily.dev/posts/motherduck-on-cloudflare-workers-real-time-apps-at-the-edge-caqfsv4vi)

```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":"MotherDuck on Cloudflare Workers: real-time apps at the edge","url":"https://daily.dev/posts/motherduck-on-cloudflare-workers-real-time-apps-at-the-edge-caqfsv4vi","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/motherduck-on-cloudflare-workers-real-time-apps-at-the-edge-caqfsv4vi"},"datePublished":"2026-04-21T13:28:18.222Z","dateModified":"2026-04-21T13:28:44.162Z","description":"A step-by-step guide to building a real-time voting app using Cloudflare Workers and MotherDuck. Since Cloudflare Workers don't support native DuckDB bindings,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a8532aeaef5008a73a1c6f0700cf6801?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a8532aeaef5008a73a1c6f0700cf6801?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"MotherDuck","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":"MotherDuck","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/f084d6835eef4c2b83f889f9a4e85ed6","url":"https://daily.dev/sources/motherduck"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/motherduck-on-cloudflare-workers-real-time-apps-at-the-edge-caqfsv4vi","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"cloudflare,edge-computing,duckdb","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"MotherDuck","item":"https://daily.dev/sources/motherduck"},{"@type":"ListItem","position":3,"name":"MotherDuck on Cloudflare Workers: real-time apps at the edge"}]}
```

