Most teams treat analytics events as logging with ambitions. Someone adds a track("button_clicked", {...}) call, a data engineer writes a parser three weeks later, and the warehouse fills with columns nobody can explain. Canva took the opposite position: an event is a record in a database that lives for years, it has a typed schema, two named owners, and a compatibility contract stricter than most public APIs.
The numbers explain why they had to. In a July 2024 post on the Canva Engineering Blog, Long Nguyen describes a stream of 25 billion events per day, roughly 800 billion per month, run by the Product Analytics Platform team at 99.999% uptime. Those events feed A/B testing, personalization and recommendations, design view statistics and the usage reports team admins see. The event catalog holds more than 2,000 unique event types. At that scale, a single careless schema change is not a bug in one dashboard. It is a migration over years of history.
The architecture before, and what broke
The first version of the pipeline was a sensible MVP built from Amazon SQS and SNS. It worked, but SQS and SNS ended up accounting for about 80% of the service's total cost. That is the failure mode of message-per-event designs at high volume: the per-request price of a queue is invisible at a million events and dominant at billions.
The second problem was structural rather than financial. Events are consumed by very different readers. A warehouse wants every event, eventually. A recommendation service wants three event types, now. When the same worker that enriches events also delivers them to every consumer, one slow consumer delays everyone. And because events are kept indefinitely, any schema drift becomes permanent: the analyst reading data from three years ago needs the old shape to still parse.
Canva's answer is a pipeline in three stages, which the team calls structure, collect and distribute. Each stage carries one key mechanism.
Mechanism 1: schemas with full transitive compatibility, enforced by a code generator
Every event is defined as a Protobuf (proto2) message in the product code repository. Canva already used Protobuf for microservice contracts, so engineers did not learn a new tool. The article shows a page view event with a page_name string and an is_iframe_embedded boolean, tagged with a custom option that names the event type. A schema in that style looks like this:
syntax = "proto2";
package events.page;
// Fired when a user lands on a page. Owners: tech + business.
message PageVisitedEventProperties {
option (datumgen.event_type) = "page_visited";
optional string page_name = 1;
optional bool is_iframe_embedded = 2;
}
The rule attached to these schemas is the interesting part. Canva requires full transitive compatibility: every version of a schema must be both forward and backward compatible with every other version, so any reader can deserialize any event ever written. Adding or removing a required field is forbidden. If you need a breaking change, you create a new event. The stated reason is that these events are persistence, not messages between two services that deploy together. A service API can coordinate a breaking change across two teams in a sprint. A warehouse holding three years of events cannot.
The enforcement lives in Datumgen, a generator built on protoc that runs whenever a schema is created or changed. It checks the compatibility rules, then produces TypeScript definitions for compile-time checks in the frontend, Java classes for backend producers and consumers, SQL table definitions for Snowflake, and the Event Catalog, a searchable interface showing every event, its fields and where it is delivered. Each event must declare a technical owner (usually the engineer who fires it) and a business owner (usually a data scientist), and comments on the schema become documentation in both the catalog and the Snowflake tables.
The trade-off is explicit. Product engineers lose the freedom to reshape an event in place, and someone has to build and maintain a code generator. In exchange, the frontend cannot send a malformed event because it does not compile, the warehouse table is generated rather than hand-written, and duplicate events become discoverable before someone creates a third version of page_visited.
Mechanism 2: a cheap stream, compressed batches, and a queue that absorbs the tail
On the collection side, all frontend clients share one TypeScript core library running in a WebView; native code only supplies device information, so one codebase covers every platform. The collection endpoint validates each event against its schema and discards anything that fails. Accepted events are written asynchronously to an Amazon Kinesis Data Stream, which feeds an ingest worker that adds country-level geolocation and device details, corrects client timestamps, then writes to a second stream that feeds the router. The split keeps enrichment work off the request path of the endpoint.
The choice of Kinesis came from a load test against Amazon MSK. Compared with the SQS and SNS baseline, MSK cut costs by about 40% and Kinesis by about 85%. MSK had roughly 30% lower latency, but the absolute gap was 10 to 20 ms, which no analytics consumer notices. Kinesis needs only shard count changes, where MSK needs tuning of brokers, partitions, disk and memory. Canva picked Kinesis and reports that the migration reduced costs about 20 times.
Two additions make that cheap pipe usable. First, events are batched by a few hundred, compressed with zstd and written as a single record. The compression ratio is about 10x for roughly 100 ms per batch to compress and decompress, and the team estimates the saving at about $600K a year in AWS costs. Second, Kinesis has an average latency of about 7 ms but a tail above 500 ms, and each shard accepts only 1 MB/s of writes. When a shard throttles or a write is too slow, the endpoint sends the batch to SQS instead. With that fallback the endpoint keeps p99 response time under 20 ms, and the SQS path costs under $100 a month. The same path is the failover mode if Kinesis has a major outage.
The logic fits in a few lines. This is a sketch of the pattern, not Canva's code:
// Primary: Kinesis. Overflow and failover: SQS. Both feed the same ingest worker.
CompletableFuture<Void> send(byte[] zstdBatch) {
return kinesis.putRecord(zstdBatch)
.orTimeout(budgetMs, MILLISECONDS) // cut the long tail
.exceptionallyCompose(err -> // throttled, slow, or down
sqs.sendMessage(zstdBatch));
}
What this costs is two transport paths to run and observe, and consumers that must accept that ordering across the two paths is not guaranteed. What it buys is a pricing model set by the cheap path and a latency profile set by the fast path.
Mechanism 3: a router decoupled from ingestion, with consumers declared in config
The last stage is a router that reads the enriched stream and delivers events to consumers. It is deliberately a separate component from the ingest worker, so a slow consumer cannot delay data for the others, and separate router types can be deployed for consumers with different characteristics or priorities. Consumers are declared in configuration files in the repository and deployed with the router, so adding a subscription is a reviewed change rather than a ticket to the platform team.
Two delivery shapes are offered. Services that need two or three event types subscribe through SQS, which is simple to operate. Services that consume hundreds of event types subscribe through Kinesis, which is cheaper at that volume. Every event type also lands in Snowflake. In a January 2025 follow-up, Jack Caperon describes replacing Amazon Data Firehose with Snowpipe Streaming for that load: Java workers read Kinesis with the Kinesis Client Library, each shard maps to one Snowpipe Streaming channel, offset tokens act as checkpoints, and time-to-query is now about 10 minutes. Overall cloud spend for that part fell 45% compared with Firehose, which had been close to half of the platform's cost.
The guarantee is at-least-once: once the endpoint returns 200 OK, every subscribed consumer receives the event at least once. Duplicates are possible, and deduplication is the consumer's job. That keeps the pipeline simple and pushes a known cost onto each reader, which is the right place for it, since only the reader knows whether a duplicate matters.
What this changes compared with the principles you already apply
If you practice event-driven architecture, you already publish domain events and let consumers subscribe. Canva's design differs on three points that are easy to miss.
First, it separates two kinds of events that EDA texts often blur. Domain events between services are contracts that can be versioned and retired together. Analytics events are persistence. Treating them as persistence is what justifies a compatibility rule stricter than the backward-only mode many schema registries apply by default: Canva chose the transitive, two-way variant because the readers are unknown and future.
Second, schema governance is moved into the build. In DDD terms, the event schema is part of the published language of the context that emits it. Canva makes that language executable: the same file produces the producer types, the consumer types and the warehouse table. Ownership is a required field, not a wiki page.
Third, the transport is chosen by cost per event and operational load, then its weakness is patched with a second, more expensive path used only for the tail. That overflow pattern beats both "pay for the premium bus everywhere" and "accept the tail".
What to steal for your architecture
Adopt this model when events outlive the services that emit them: analytics, audit, billing usage, machine learning features. Do not adopt it for internal domain events between two services that deploy together, where a full transitive rule will slow every change for no reader that needs it. Do not build the Kinesis plus SQS fallback until your queue bill or your tail latency is a measured problem; below a few million events a day, a single managed queue is cheaper than the engineering.
For one team, the proposal is small: put event schemas in Protobuf or JSON Schema in the repository, add a CI check that rejects breaking changes, generate the client types, and name an owner per event. One managed stream and one warehouse loader are enough.
For ten teams, add the generator and the catalog, and split ingestion from delivery. Consumers declared in configuration, reviewed like code, let teams subscribe without a platform bottleneck. Make at-least-once explicit in the consumer contract and give teams an idempotency helper keyed on an event id.
For a hundred teams, the economics take over. Measure cost per million events per transport, batch and compress before the stream, add an overflow path for throttling and tail latency, and run separate routers per priority class so the recommendations pipeline never waits for a backfill. At that point, the platform team's product is the schema contract, and the pipes behind it can change, as Canva's did twice, without any producer noticing.

