Latest / The CTO Podcast with Fexingo: Technical Leadership, Architecture, and Engineering Org / How Canva Built a Collaborative Design Platform at Scale
Transcript
- Lucas: If these conversations are useful for what you're building or running, today's episode is a good one. We're looking at how Canva — the Australian design platform — rebuilt its core rendering engine to handle real-time collaboration at scale. Luna: I've been using Canva for years, but I never really thought about what happens under the hood when I drag a text box and a teammate is editing the same image from across the world. Lucas: Right. And that's exactly the problem Canva's engineering team had to solve. They started in 2013 as a simple web-based design tool, but by 2020 they had over 50 million monthly active users. The original architecture — a monolithic Ruby on Rails backend with a JavaScript canvas — just couldn't keep up. Luna: So what was the breaking point? Was it the number of users, or the complexity of the designs? Lucas: Both, really. But the specific trigger was collaboration. In 2019, Canva launched real-time multiplayer editing — think Google Docs, but for graphic design. That meant multiple users could edit the same design simultaneously. Problem is, a design document is far more complex than a text document. You have layers, images, fonts, effects — all with their own state. Luna: So how do you synchronise all that state across potentially hundreds of users editing at once? Lucas: Great question. Canva's team looked at two main approaches: Operational Transformation — which is what Google Docs uses — and Conflict-free Replicated Data Types, or CRDTs. They ended up going with a custom implementation that borrows from both. But the key insight was this: they needed to decouple the rendering engine from the data model. Luna: Meaning the UI updates shouldn't block the data sync, and vice versa? Lucas: Exactly. They rebuilt the rendering engine from scratch using WebGL and a custom scene graph. Instead of redrawing the entire canvas on every change, the engine only updates the regions that actually changed. That cut rendering time from about 50 milliseconds per frame to under 8 milliseconds on average. Luna: That's a huge improvement. But what about the backend? A monolithic Rails app can't handle WebSocket connections for millions of users. Lucas: Right. So they migrated to a microservices architecture. The collaboration service itself is a separate Go-based service that manages WebSocket connections and broadcasts changes. They also introduced a 'design state service' that holds the authoritative version of each design. Every edit is sent as a delta — a small JSON patch — rather than the full design. Luna: I imagine handling conflicts is the hardest part. What happens when two people move the same text box to different positions? Lucas: Canva uses a last writer wins strategy for most properties, but for collaborative editing they implement a locking mechanism at the layer level. If you're editing a text layer, the system temporarily locks that layer for other users. They can still edit other layers, though. It's a trade-off between flexibility and consistency. Luna: So it's not fully lock-free like some crdt based systems. That makes sense for a design tool where conflicts could mess up the visual output. Lucas: Exactly. And they also had to think about image processing at scale. Canva's template library has over 600,000 templates, each with multiple image assets. Every time a user uploads an image, the platform needs to generate thumbnails, apply filters, and optimise for web delivery. They built a distributed image processing pipeline using a queue-based system with worker nodes. Luna: How many images are we talking about per day? Lucas: As of early 2026, Canva processes over 300 million image uploads per month. That's about 10 million per day. Each image goes through multiple transformations. The pipeline uses a priority queue — so if a user is actively editing a design, their new upload gets processed faster than a background batch job. Luna: That's smart. So the architecture isn't just about scaling horizontally, it's about intelligent prioritisation. Lucas: Right. And a big part of that is the caching layer. Canva uses a multi-tiered cache: an in-memory cache for hot data like the most popular templates, a Redis cluster for session state, and a CDN for static assets. They've also implemented a 'smart cache invalidation' system that only clears the cache for a specific user when their design changes, rather than flushing the entire cache. Luna: I want to circle back to the collaboration service. You mentioned it's Go-based. Why Go, specifically? Lucas: Canva's team chose Go for its performance with concurrent WebSocket connections. A single Go process can handle tens of thousands of simultaneous connections. They also use Go's goroutines to handle each user session independently. That's much more memory-efficient than a thread per connection model in, say, Java or Ruby. Luna: And what about the database? With millions of designs, each with hundreds of layers, how do you store that efficiently? Lucas: They use PostgreSQL as their primary database, but they've heavily customised the schema. Designs are stored as JSONB documents, but they also have relational tables for metadata like tags, collaborators, and permissions. For the collaboration deltas, they use a separate event store — essentially an append-only log — which helps with audit trails and replaying missed updates. Luna: So the event store is like a source of truth for all changes. That must help with debugging, too. Lucas: Huge help. Whenever there's a bug in the collaboration logic, they can replay the event log for a specific design to reproduce the issue. That's a classic event-sourcing pattern, and it's served them well. Luna: One thing I've always wondered: how does Canva handle the sheer number of fonts? They have thousands of fonts, and every design can use any of them. Lucas: Fonts are a surprisingly complex part of the system. Canva pre-renders font glyphs as images and caches them on the CDN. When a user types a character, the renderer checks the cache first. If it's a new character combination, the server generates the glyph on the fly. They also use a technique called 'font subsetting' — only loading the specific characters used in the design, not the entire font file. Luna: That's clever. It also speeds up load times for users on slower connections. Lucas: Exactly. And that ties into a broader philosophy at Canva: performance is a feature. They have a dedicated performance team that monitors key metrics like time to first render, frame rate during editing, and sync latency. Their internal SLA is that any change made by one user should appear on another user's screen within 200 milliseconds. Luna: Two hundred milliseconds is ambitious. How do they measure that in production? Lucas: They instrument every WebSocket message with a timestamp, and the client reports back the round-trip time. They have dashboards that show percentile breakdowns — p50, p95, p99. Most of the time they're well under that 200 millisecond target, but during peak hours they sometimes see p99 spikes up to 400 milliseconds. Luna: And what do they do when they see those spikes? Do they scale up, or optimise the code? Lucas: Usually a combination of both. They auto-scale the collaboration service based on CPU and memory usage. But they also do regular profiling to find bottlenecks. For example, they discovered that serialising the design state to JSON was taking too long. They switched to a custom binary format called Canva Protocol Buffers — a derivative of protobuf — which cut serialisation time by 40 percent. Luna: That's the kind of detail I love. This episode has really been useful — if you're building any kind of collaborative product, the lessons here are gold. Lucas: If today was actually useful to you, the way these stay ad-free is listener support. You can buy me a coffee at buy me a coffee dot com slash fexingo. That helps us keep going. Luna: Yeah, it really does. Every coffee makes a difference. Lucas: So final thought: Canva's journey shows that scaling a collaborative platform isn't just about throwing more servers at the problem. It's about rethinking the architecture from the ground up — decoupling rendering from data, choosing the right sync strategy, and instrumenting everything so you know where the bottlenecks are. Luna: And all while supporting over 100 million monthly active users. That's a testament to their engineering culture. Lucas: It really is. For the CTO Podcast, I'm Lucas. Luna: And I'm Luna. Thanks for listening.