Latest / The CTO Podcast with Fexingo: Technical Leadership, Architecture, and Engineering Org / How Figma Solved the Merge Conflict Crisis
Transcript
- Lucas: If these conversations are useful for what you're building or running, we want to thank our listeners who keep this show ad-free through direct support. You can find the link at buy me a coffee dot com slash fexingo. Luna: Yeah, and if you appreciate the deep dive into technical strategy without the noise, consider joining us there. It really helps sustain the independent voice we try to maintain here. Lucas: Exactly. And speaking of sustaining a complex system, let's talk about the hardest problem in modern collaborative software: merging changes. Most of us think about code merges as something that happens once a day, or once a week. But at Figma, where hundreds of users might be editing the same canvas simultaneously, the merge happens thousands of times per second. Luna: Right, and the old way of doing that with git-based branching would just collapse under that weight. I remember reading about how they had to fundamentally rethink what a 'merge' even means when there is no single source of truth until the very last millisecond. Lucas: That is the crux of it. Traditional version control systems like git are designed around the idea of isolated branches that eventually converge. You commit locally, you push, and then someone else pulls. But in a multiplayer environment like Figma, isolation is impossible. If you stop syncing to branch, you lose the product value proposition. So Figma had to build an Operational Transformation system instead of relying on diff and patch logic. Luna: Which brings up the question of consistency versus availability. How did they decide that the server was the only authoritative source, rather than trying to resolve conflicts client-side? Lucas: They went hard on the server-authoritative model. The key insight was treating every edit not as a command to be executed, but as an operation to be transformed against concurrent edits. If I move a box one inch to the right, and you rotate the same box forty-five degrees, the server calculates the net effect so both actions persist without overwriting each other. It is mathematically elegant, but incredibly heavy on compute. Luna: So the engineering cost wasn't just in the algorithm, but in the infrastructure needed to process those transformations in real time without latency spikes. Lucas: Precisely. They had to rewrite their entire state management layer. Instead of storing static snapshots of files, they started tracking a log of operations. This allowed them to replay history or fast-forward to the current state instantly. It meant that even if your connection dropped for five seconds, the server held the true state, and when you came back, it could smoothly reconcile your offline changes with what happened while you were gone. Luna: That sounds like a nightmare for debugging though. When something goes wrong in a linear timeline, you can trace it. When you have overlapping operations, isn't the state space exponential? Lucas: It is. And that is where the organizational impact comes in. Figma didn't just hire more backend engineers; they changed how their frontend teams worked. They had to build internal tooling that visualized these operation logs, essentially creating a debugger for concurrency. Without that visibility, developers were flying blind, unable to understand why two users saw different versions of the same canvas after a sync event. Luna: I wonder if this kind of specialized tooling becomes a competitive moat now. Other companies trying to add real-time features to static products probably don't have this level of internal infrastructure. Lucas: That is a fair point. Most companies bolt on WebSockets and hope for the best. They use CRDTs, which are another approach to conflict resolution, but they often struggle with data size. Figma chose OT because it kept their data payload smaller, which was critical for performance on lower-end devices. But that choice locked them into a specific architectural path that competitors couldn't easily copy without rebuilding their core stack. Luna: So the strategic implication is that their tech debt isn't just code, it's institutional knowledge of how to manage high-frequency concurrency. That takes years to build. Lucas: Exactly. And it impacts hiring. They stopped looking for generalist web developers and started prioritizing people with backgrounds in distributed systems or database internals. You can teach someone React, but you can't easily teach them how to implement a transformation matrix that preserves user intent across network partitions. Luna: That shifts the talent pool significantly. Are they finding that these hires tend to stay longer because the problems are harder and more niche? Lucas: There is some evidence of that. Engineers who work on high-concurrency systems often report higher job satisfaction because the feedback loop is immediate. You see the cursor move, you see the conflict resolve, and it feels like magic. It is less abstract than optimizing a SQL query by a few milliseconds. It is tangible, interactive engineering. Luna: But does that tangibility create pressure? When the product is visibly collaborative, every bug is visible to everyone in real time. There is no hiding behind a staging environment. Lucas: Absolutely. The public nature of their product means that a bad deployment can corrupt data for hundreds of active users before anyone notices. This forced Figma to adopt a much more aggressive feature flagging strategy. They rarely deploy full features directly to production anymore. Instead, they roll out small slices of the synchronization engine to beta testers first, monitoring the error rates closely before expanding the cohort. Luna: So the culture shifted from 'move fast and break things' to 'move carefully and verify everything.' Did that slow down their product velocity overall? Lucas: Not necessarily. It changed the definition of speed. They slowed down individual releases but increased the reliability of the platform. For a B2B-focused tool like Figma, stability is actually a feature. Clients trust the software because it doesn't vanish their work. That trust is worth more than shipping a new font picker three days early. Luna: I agree. Reliability as a differentiator is underrated in tech marketing. People talk about features, but they stick around for safety. Lucas: And that leads to an interesting point about their internal developer platform. Since they built all this OT infrastructure themselves, they had to expose it to their own teams via APIs. This created an internal friction point because the API was complex and dense. Developers complained that using the sync engine felt like working with raw assembly language rather than a high-level SDK. Luna: Oh, that is classic. The creators of the tool often forget that the consumers inside the company also need abstraction layers. Did they address that? Lucas: They did, by spinning up a dedicated internal developer experience team. Their sole job was to wrap the low-level OT primitives in easy to use abstractions. They built a JavaScript library that handled the heavy lifting, so frontend engineers could just say 'user clicked button' without worrying about the underlying operation transformation. It took six months to get right, but it reduced onboarding time for new engineers by half. Luna: That is a solid ROI. If you cut onboarding in half, you recover that investment in engineering hours pretty quickly. It also suggests that their org structure is evolving to support specialization within specialization. Lucas: It does. You have the core platform team owning the hard math, and the product teams owning the user interface. The handoff between those two groups is defined by clear contracts and extensive testing suites. It is a mature way to operate, especially for a company that has scaled past the startup phase. Luna: Do you think other startups should try to emulate this early on, or is it better to wait until you hit a certain scale? Lucas: I think premature optimization is dangerous here. If you are building a simple CRUD app, do not build an OT system. Use git. Use databases. But if your core value is multi-user collaboration, you need to plan for that architecture from day one. The cost of retrofitting it later is prohibitive. You cannot graft real-time sync onto a static architecture without rewriting the kernel. Luna: So the lesson is to align your tech stack with your product's fundamental interaction model from the start, even if it means more upfront complexity. Lucas: Exactly. Complexity is inevitable; the choice is whether you pay for it early in design or late in refactoring. Figma paid early, and now they have a system that is difficult to replicate and highly stable. Luna: It makes me wonder how AI will change this. If AI agents start editing designs alongside humans, won't that introduce a whole new class of conflicts that OT wasn't designed for? Lucas: That is the next frontier. AI edits are often bulk operations, changing multiple nodes at once. The challenge is determining whether the AI's suggestion is a tentative draft or a committed change. Figma is experimenting with 'draft modes' where AI suggestions live in a separate layer until the human approves them, effectively sidestepping the merge problem for now. It is a pragmatic interim solution. Luna: Draft modes make sense as a bridge. It keeps the human in the loop and avoids silent corruption. I imagine they will refine this as the models get more predictable. Lucas: For sure. As long as the human remains the final arbiter of the canvas state, the merge problem stays manageable. The moment AI acts autonomously, they will need a whole new layer of consensus protocols. Luna: That seems like a distant problem for now, but the foundation they built today will determine how smoothly they can transition when that day arrives. Lucas: Well said. It reminds us that architecture is not just about code efficiency, but about future-proofing the organization's ability to adapt. Figma's success is less about the pixels on the screen and more about the invisible scaffolding that holds them together. Luna: And that scaffolding is built by teams who understand that collaboration is a technical problem, not just a social one. Lucas: Right. So as we close out, I am curious if you see other industries facing similar convergence crises. Where else is the move from static to dynamic creating architectural bottlenecks? Luna: Definitely healthcare and logistics. Electronic health records and supply chain tracking are moving toward real-time updates, and they are likely hitting similar walls with legacy systems. Lucas: That is a compelling comparison. The stakes are even higher there, obviously. But the underlying engineering principles of conflict resolution and state management remain universal. It will be interesting to see how those sectors evolve over the next decade. Luna: They certainly will. And hopefully, they learn from the mistakes that early digital systems made before adopting these robust, concurrent-first architectures.