<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/swift-at-scale-building-the-telemetrydeck-analytics-service-8bjq9mzpf" -->

---
title: Swift at scale: building the TelemetryDeck analytics service
description: TelemetryDeck, a privacy-focused app analytics service processing data for over 16 million users monthly, is built entirely on Swift and the Vapor web...
canonical: https://daily.dev/posts/swift-at-scale-building-the-telemetrydeck-analytics-service-8bjq9mzpf
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Swift at scale: building the TelemetryDeck analytics service | daily.dev
og:description: TelemetryDeck, a privacy-focused app analytics service processing data for over 16 million users monthly, is built entirely on Swift and the Vapor web...
og:url: https://daily.dev/posts/swift-at-scale-building-the-telemetrydeck-analytics-service-8bjq9mzpf
og:image: https://api.daily.dev/og/posts/8BjQ9MZpf.png
og:image:alt: Swift at scale: building the TelemetryDeck analytics service
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.

# Swift at scale: building the TelemetryDeck analytics service

**[Swift.org](https://daily.dev/sources/swift)** · 8 min read · 0 upvotes · 0 comments

## Summary

TelemetryDeck, a privacy-focused app analytics service processing data for over 16 million users monthly, is built entirely on Swift and the Vapor web framework rather than more common backend choices like Python, Node, or Ruby. The team shares architectural decisions including using Kubernetes, Postgres for metadata, and Apache Druid for analytics data. It covers practical lessons: leveraging Swift's Codable protocol for type-safe JSON handling, moving DTOs from a shared package into per-controller inline structs to avoid cross-version breakage, developing comfortably in Xcode with SQLite for local dev, and using Swift Distributed Tracing for observability. The piece closes with hard-won operational lessons like versioning API URLs early, setting cache TTLs, and monitoring errors proactively.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://swift.org/blog/building-privacy-first-analytics-with-swift>

## Questions this post answers

### How does moving Data Transfer Objects into per-controller inline structs help with API versioning in a Swift Vapor project?

Keeping DTOs as inline structs inside their controllers, rather than in a shared package used across API versions, prevents changes to one API version from breaking another. TelemetryDeck originally shared a SwiftDTOs package between client and server, but updating structs for new API versions caused compatibility issues, so its newest API version defines request and response structs directly within each versioned controller instead.

_daily.dev surfaces practical API versioning patterns for developers navigating similar Swift and Vapor tradeoffs._

### What database and storage stack does the TelemetryDeck analytics service use with Swift and Vapor?

TelemetryDeck runs on Kubernetes containers, stores metadata in Postgres, and stores analytics event data in Apache Druid, using Swift-native connectors for each. The service is built on the Vapor web framework and uses Fluent, Vapor's database layer, almost exclusively over raw SQL, with SQLite as a lightweight local development substitute for Postgres.

_Developers weighing backend storage stacks can track real-world architecture choices like this on daily.dev._

### Why is Swift's Codable protocol considered a security feature rather than just a convenience for JSON handling?

Codable rejects malformed JSON immediately at the type-system level when a request comes in, requiring no manual validation code and preventing entire classes of vulnerabilities tied to unchecked or malformed input. Defining a struct conforming to Codable and Content in Vapor gives automatic parsing, validation, and type safety in just a few lines, unlike dynamically typed languages that need extra guard code.

_daily.dev helps developers comparing type-safe backend languages like Swift keep up with practical tradeoffs._

## Similar posts on daily.dev

- [From Spring Boot to Swift: The Business Logic Was the Cheap Part](https://daily.dev/posts/from-spring-boot-to-swift-the-business-logic-was-the-cheap-part-nebmkht0n) · ITNEXT · 1 upvotes · 0 comments
- [Swift Server Has Another Google -- Fatbobman's Swift Weekly \#156](https://daily.dev/posts/swift-server-has-another-google----fatbobman-s-swift-weekly-156-hlv8nxymu) · Fatbobman · 0 upvotes · 0 comments
- [Building scalable backend apps in Swift](https://daily.dev/posts/building-scalable-backend-apps-in-swift-h6s2gzfe4) · The.Swift.Dev. · 0 upvotes · 0 comments
- [OpenTelemetry Experts on Tough Telemetry Challenges in Mobile](https://daily.dev/posts/opentelemetry-experts-on-tough-telemetry-challenges-in-mobile-gw8vlu1wa) · The New Stack · 1 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#backend](https://daily.dev/tags/backend), [#postgresql](https://daily.dev/tags/postgresql), [#swift](https://daily.dev/tags/swift)

[View this post on daily.dev](https://daily.dev/posts/swift-at-scale-building-the-telemetrydeck-analytics-service-8bjq9mzpf)

```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":"Swift at scale: building the TelemetryDeck analytics service","url":"https://daily.dev/posts/swift-at-scale-building-the-telemetrydeck-analytics-service-8bjq9mzpf","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/swift-at-scale-building-the-telemetrydeck-analytics-service-8bjq9mzpf"},"datePublished":"2026-08-23T12:16:55.793Z","dateModified":"2026-08-23T12:19:18.882Z","description":"TelemetryDeck, a privacy-focused app analytics service processing data for over 16 million users monthly, is built entirely on Swift and the Vapor web...","image":"https://media.daily.dev/image/upload/s--0_ODbtD2--/f_auto/v1722860399/public/Placeholder%2008","thumbnailUrl":"https://media.daily.dev/image/upload/s--0_ODbtD2--/f_auto/v1722860399/public/Placeholder%2008","isAccessibleForFree":true,"articleSection":"Swift.org","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":"Swift.org","logo":"https://media.daily.dev/image/upload/s--x7Cjs0jz--/f_auto,q_auto/v1787487412/logos/swift?_a=BAMAMicg0","url":"https://daily.dev/sources/swift"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/swift-at-scale-building-the-telemetrydeck-analytics-service-8bjq9mzpf","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,backend,postgresql,swift","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Swift.org","item":"https://daily.dev/sources/swift"},{"@type":"ListItem","position":3,"name":"Swift at scale: building the TelemetryDeck analytics service"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/swift-at-scale-building-the-telemetrydeck-analytics-service-8bjq9mzpf#faq","mainEntity":[{"@type":"Question","name":"How does moving Data Transfer Objects into per-controller inline structs help with API versioning in a Swift Vapor project?","acceptedAnswer":{"@type":"Answer","text":"Keeping DTOs as inline structs inside their controllers, rather than in a shared package used across API versions, prevents changes to one API version from breaking another. TelemetryDeck originally shared a SwiftDTOs package between client and server, but updating structs for new API versions caused compatibility issues, so its newest API version defines request and response structs directly within each versioned controller instead. daily.dev surfaces practical API versioning patterns for developers navigating similar Swift and Vapor tradeoffs."}},{"@type":"Question","name":"What database and storage stack does the TelemetryDeck analytics service use with Swift and Vapor?","acceptedAnswer":{"@type":"Answer","text":"TelemetryDeck runs on Kubernetes containers, stores metadata in Postgres, and stores analytics event data in Apache Druid, using Swift-native connectors for each. The service is built on the Vapor web framework and uses Fluent, Vapor's database layer, almost exclusively over raw SQL, with SQLite as a lightweight local development substitute for Postgres. Developers weighing backend storage stacks can track real-world architecture choices like this on daily.dev."}},{"@type":"Question","name":"Why is Swift's Codable protocol considered a security feature rather than just a convenience for JSON handling?","acceptedAnswer":{"@type":"Answer","text":"Codable rejects malformed JSON immediately at the type-system level when a request comes in, requiring no manual validation code and preventing entire classes of vulnerabilities tied to unchecked or malformed input. Defining a struct conforming to Codable and Content in Vapor gives automatic parsing, validation, and type safety in just a few lines, unlike dynamically typed languages that need extra guard code. daily.dev helps developers comparing type-safe backend languages like Swift keep up with practical tradeoffs."}}]}
```

