Canva's S3-Based Session Revocation Architecture: Scaling to Millions of Sessions (2026)

Canva's innovative approach to session revocation architecture showcases a thoughtful balance between scalability, performance, and simplicity. By leveraging Amazon S3 for storing revocation data, Canva has achieved impressive results, including improved deployment speed, reduced database infrastructure, and a significant 87.5% reduction in the memory footprint of its revocation cache. This strategic choice of S3 over Redis demonstrates Canva's commitment to avoiding unnecessary data stores while ensuring durable storage for revocation data.

The core of Canva's design revolves around the use of compact, immutable records stored in Amazon S3. Each revocation is represented as a 16-byte binary record containing a principal and timestamp. This approach allows for direct in-memory searches using sorted arrays, significantly reducing the cache footprint. Gateways employ conditional GETs to download changed chunks and discard data older than 12 hours, ensuring efficient data management.

One of the key advantages of this architecture is the ability to reconstruct local revocation state without relying on a database. This feature not only enhances recovery capabilities but also simplifies deployment processes. Canva's worker tasks, capable of processing over 2,000 revocations per second, further solidify the system's efficiency and reliability.

However, the discussion on Reddit highlights an alternative approach, suggesting the use of a refresh token scheme with short access token lifetimes. Canva engineer Llew Vallis responds by emphasizing the benefits of keeping revocation data in memory, as frequent token refreshes could increase database load and dependency on the database during refresh operations. This perspective underscores the importance of considering trade-offs in system design.

The migration to the new architecture has led to a more streamlined and efficient session revocation system for Canva. The reduction in database load, improved deployment speed, and predictable scalability demonstrate the success of this approach. Canva's testing of multiple implementations on real infrastructure further validates the chosen design's ability to meet scalability requirements, even under demanding workloads involving hundreds of thousands of revocations in a single array.

In conclusion, Canva's session revocation architecture showcases a thoughtful and innovative approach to managing authentication and revocation data. By leveraging Amazon S3 and optimizing data storage and retrieval, Canva has achieved a balance between performance, scalability, and simplicity. This design not only meets the platform's current needs but also provides a solid foundation for future growth and development.

Canva's S3-Based Session Revocation Architecture: Scaling to Millions of Sessions (2026)

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Arielle Torp

Last Updated:

Views: 6182

Rating: 4 / 5 (41 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Arielle Torp

Birthday: 1997-09-20

Address: 87313 Erdman Vista, North Dustinborough, WA 37563

Phone: +97216742823598

Job: Central Technology Officer

Hobby: Taekwondo, Macrame, Foreign language learning, Kite flying, Cooking, Skiing, Computer programming

Introduction: My name is Arielle Torp, I am a comfortable, kind, zealous, lovely, jolly, colorful, adventurous person who loves writing and wants to share my knowledge and understanding with you.