Founded in 2021, Liveblocks enables software developers to easily add pre-built collaborative features to their apps. Developers can quickly incorporate commenting, multi-person editing, notifications, AI copiloting, live cursors, and other customizable features into their software.
App users today increasingly expect those collaborative capabilities. Whether they are designing a new website or attending a livestream event, users want to contribute their feedback and interact with others in real time, no matter where everyone is located.
Liveblocks enables software engineering teams to meet those user expectations and avoid the time-consuming work of creating collaborative app features themselves. To further streamline development, Liveblocks provides a fully hosted, scalable WebSocket infrastructure for building and running collaborative capabilities.
In constructing the collaborative experience, the Liveblocks team initially used AWS EC2 containers with a MongoDB database. But it was difficult to scale WebSocket servers and database storage with the containers. โWe needed a more scalable approach to support real-time collaboration,โ says Olivier Foucherot, senior software developer at Liveblocks.
Just when the Liveblocks team began searching for an alternative approach, a new solution appeared. โCloudflare released Durable Objects at just the right time for us,โ says Foucherot. โIt is the perfect solution for supporting real-time collaborative use cases.โ
Cloudflare Durable Objects are Cloudflare Workers that combine compute with durable storage, streamlining how organizations build and run stateful serverless apps. By allowing teams to avoid a piecemeal approach, Durable Objects fundamentally changes how modern, full-stack applications are developed. Objects are automatically provisioned close to users to minimize latency, and organizations can provision millions of them around the world.
โThere is not currently another out-of-the-box solution that does what Durable Objects does,โ says Jonathan Rowny, principal software engineer at Liveblocks. โAnd if there seems to be one, itโs probably just hosted on Durable Objects.โ
Using Durable Objects, Liveblocks built โroomsโ for real-time collaboration. โWhen app users connect to a room over WebSocket, they are forwarded to a Durable Object, which contains the state of the room,โ says Rowny. โWhen someone provides an update, everyone connected to the room sees it. Developers donโt have to worry about CRDTs (conflict-free replicated data types), operational transforms, or anything like that. They just connect users directly to Durable Objects for real-time features.โ
Along with Durable Objects, the Liveblocks team is capitalizing on several other Cloudflare capabilities to support the companyโs platform. For example, the Liveblocks team uses Cloudflare R2 object storage to store essential information from collaborative work, such as attachments included with comments in a collaborative app and document version histories. In addition, the team uses Cloudflare Queues, which is integrated with Cloudflare Workers, to provide reliable application message queues.
Meanwhile, Cloudflare Workers KV helps the team enhance platform performance. โWe use Workers KV to provide a cache for edge users,โ says Rowny. โBy looking up data quickly, Workers KV allows us to skip another round trip to our databases.โ
For these and other capabilities, the Liveblocks team selected the Cloudflare enterprise plan early on. โCloudflareโs enterprise plan gives us access to the most advanced enterprise tools,โ says Rowny. โWe also like maintaining a stable, predictable spending model.โ
Providing real-time collaboration capabilities requires extremely low latency between Liveblocks collaborative rooms and end users. Fortunately, Durable Objects are available across Cloudflareโs massive network.
โCloudflare Durable Objects are automatically provisioned geographically close to where they are first requested, so end users experience very low latency,โ says Rowny. โFor our live cursors feature, weโre able to show cursors moving at 60 frames per second, which is incredibly fast โ and thatโs thanks to the Cloudflare global network.โ
By building on the highly scalable Cloudflare platform, Liveblocks has been able to support a fast-growing customer base cost-effectively. โWe might process up to half a billion messages through Workers in a 24-hour period,โ says Rowny. โBut weโve been able to control our costs with Cloudflare.โ
Cloudflareโs WebSocket Hibernation capability helps keep costs low by eliminating billable duration charges during periods of inactivity. โWe can have a collaborative room that is live โ still pinging Cloudflare, with users still connected. If nothing is happening in that room, it will hibernate,โ says Rowny. โThe hibernation capability reduces our costs and enables us to keep our prices low, which is a huge competitive advantage.โ
WebSocket Hibernation also simplifies billing โ for both Liveblocks and their customers. โWe can bill for monthly active users and not have to worry about passing along compute minutes to customers,โ says Rowny. โAs a result, our customers can more easily anticipate their monthly costs. It would not be as simple on any other platform.โ
Using the Cloudflare Developer Platform has helped Liveblocks grow, efficiently, as a business. โWe have a very small team of 10 engineers at Liveblocks,โ says Foucherot. โWeโre able to keep that team small and efficient because of Cloudflare.โ
โWithout Cloudflare, hosting WebSocket servers might have required at least four additional people just for management,โ says Rowny. โUsing Durable Objects, we can provide serverless capabilities without a dedicated team for managing the environment. Meanwhile, our existing team can focus less on administration and more on innovation.โ
Looking ahead, the Liveblocks team is eager to explore additional Cloudflare capabilities and services for developers. For example, Workers for Platforms would enable the company to give their customers greater flexibility for how they use Liveblocks. โWith Workers for Platforms, developers could more easily deploy customized versions of features to their own workspaces,โ says Rowny.
The team is also looking forward to implementing logging and observability functionality within Workers. โGaining more visibility into our environment while simplifying logging would be amazing for us,โ says Rowny.
In the meantime, the Liveblocks team continues to eliminate obstacles for developers to deliver collaborative apps with a serverless architecture. โMany developers have anxieties about the hidden costs of serverless,โ says Rowny. โCloudflare eliminates those anxieties. By using Cloudflare, we can maximize the benefits of the serverless approach for organizations and help their developers stay focused on innovation.โ

Constructed a platform that provides pre-built collaboration features for app development
Reduced latency for real-time collaboration with Cloudflareโs global network
Scaled to support nearly half a billion WebSocket messages per day
Avoided expanding engineering staff by 40% for management
โCloudflare released Durable Objects at just the right time for us. It is the perfect solution for supporting real-time collaborative use cases.โ
Olivier Foucherot
Senior Software Developer
โWithout Cloudflare, hosting WebSocket servers might have required at least four additional people just for management. Using Durable Objects, we can provide serverless capabilities without a dedicated team for managing the environment.โ
Jonathan Rowny
Principal Software Engineer