Swift.org Blog Mar 6, 2026

Building Privacy-First Analytics with Swift

Article Summary

TelemetryDeck is processing analytics for 16 million users monthly using Swift on the server. The infrastructure costs and performance gains are making Python and Node developers take notice.

TelemetryDeck built their entire privacy-first analytics service on Swift and Vapor, running on Kubernetes with Postgres and Apache Druid. This deep dive shares technical lessons from scaling a production Swift backend that handles millions of events while keeping infrastructure lean.

Key Takeaways

Critical Insight

A production analytics service proves Swift delivers on backend promises: type safety prevents bugs, compiled performance cuts infrastructure costs, and familiar tooling accelerates development velocity.

The team shares specific mistakes they made with Data Transfer Objects that forced an architecture change in their newest API version.

About This Article

Problem

TelemetryDeck had trouble managing API versions when sharing Data Transfer Objects between client and server code. Updating structs for one API version would break the others that were still running.

Solution

TelemetryDeck moved DTOs into their controllers as inline structs within versioned API extensions. This removed the need for a shared SwiftDTOs package and separated API changes from client updates.

Impact

API changes became faster and easier to maintain. TelemetryDeck could develop new API versions continuously while keeping older clients working without having to update structs everywhere.

Recent from Swift.org Blog

Related Articles

AI Tools for iOS

Browse all AI tools →