# Swift at scale: building the TelemetryDeck analytics service

DevFeed: [Swift at scale: building the TelemetryDeck analytics service](<https://devfeed.tech/articles/swift-at-scale-building-the-telemetrydeck-analytics-service-2928.md>)

Original publisher: [Read original article](<https://swift.org/blog/building-privacy-first-analytics-with-swift/>)

Author: Daniel Jilg

Published: 2026-03-06T11:00:00Z

Content type: article

Language: en

Sources: [Swift.org](<https://devfeed.tech/sources/swift-org.md>)

Topics: [Swift](<https://devfeed.tech/topics/swift.md>), [Vapor](<https://devfeed.tech/topics/swift-vapor.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [Cloud Architecture](<https://devfeed.tech/topics/cloud-architecture.md>), [container](<https://devfeed.tech/topics/container.md>)

Tags: [analytics](<https://devfeed.tech/tags/analytics.md>), [apache](<https://devfeed.tech/tags/apache.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [backend](<https://devfeed.tech/tags/backend.md>), [containers](<https://devfeed.tech/tags/containers.md>), [druid](<https://devfeed.tech/tags/druid.md>), [framework](<https://devfeed.tech/tags/framework.md>), [high-performance](<https://devfeed.tech/tags/high-performance.md>), [ios](<https://devfeed.tech/tags/ios.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [metadata](<https://devfeed.tech/tags/metadata.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [parallelism](<https://devfeed.tech/tags/parallelism.md>), [performance](<https://devfeed.tech/tags/performance.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [privacy](<https://devfeed.tech/tags/privacy.md>), [scale](<https://devfeed.tech/tags/scale.md>), [service](<https://devfeed.tech/tags/service.md>), [swift](<https://devfeed.tech/tags/swift.md>)

## AI overview

TelemetryDeck runs its analytics service on Swift and Vapor in Kubernetes, with Postgres for metadata and Apache Druid for analytics data. The article credits Swift's compiled type checking and concurrency with catching errors early and supporting efficient processing; Codable provides typed JSON parsing and rejects malformed input. It describes an architectural lesson from API versioning: shared DTO structs became difficult to change safely, so the newest API keeps request and response structs beside their controllers. For local development, the team uses Xcode and can connect either to local PostgreSQL or a SQLite file through Fluent. Its practical recommendations include structuring code with Swift packages, using Vapor's queues, jobs, migrations and middleware, versioning API paths, setting cache TTLs, and monitoring server errors and performance. The account is based on TelemetryDeck's experience and does not provide comparative benchmarks for other architectures.

## Source excerpt

TelemetryDeck is an app analytics service specifically for developers, designed to manage usage analytics that are anonymized, privacy-focused, and really easy to use. TelemetryDeck is managing the data of over 16 million people every month, helping thousands of app publishers improve their products, and we're doing it all with a Swift-based infrastructure. The decision to go with Swift brought a lot of unexpected advantages for us. We come from a world of iOS in the frontend, Python, Node, or Ruby in the backend for server-based applications. Compared to these languages and frameworks, Swift is just as easy to use, and its compiled nature allows us to catch a lot of possible errors at compile time instead of runtime, making it ideal for a hardened, high-performance web service. Let me share our journey and history with you. Adopting Swift for backend services TelemetryDeck is built on Vapor, a web framework written in Swift, for building scalable APIs and services. Similar to other Vapor-based projects like Things, TelemetryDeck runs on containers hosted in Kubernetes. Our metadata lives in Postgres, and our analytics data is stored in Apache Druid. We use Swift-native connectors to access APIs for these services. Some of those come from the Swift community, others we've written ourselves and are giving back to the open source ecosystem. In the very beginning, when TelemetryDeck was just a little exploratory hobby project, we wanted to go with Swift on the server simply because we love Swift, and we're pretty decent at it. Vapor was new, and we figured, let's try this out and learn a new way to apply and combine our skills. In the end, this decision turned out to be exactly the right one and resulted in a lean architecture that is highly performant, stable, and allows us to develop and iterate quickly. Swift's performance characteristics are remarkable, especially in multithreading. Python's Global Interpreter Lock has long constrained true parallelism, though rece