ELSEIF
Your brief EB
285 stories from 89 feeds 175 clusters Refreshed 1 minute ago next pull 17:06

ARCHITECTURE Signal 427

Canva Shares S3 Based Architecture for Session Revocation Across Hundreds of Millions of Sessions

Canva replaced database lookups with an S3-backed in-memory revocation cache to scale session invalidation for hundreds of millions of active sessions.

WHY IT MATTERS

Engineers running authentication at scale can now consider S3 as a durable, low-cost store for revocation data instead of adding another database tier. The shift removes a deployment bottleneck and cuts memory use, but requires careful chunking and concurrency control. Teams must weigh the operational simplicity of S3 against the complexity of managing in-memory indexes across many gateways.

Written by elseif from the cluster below · every claim links back to a source

The three things worth knowing

01

Revocation records are stored as compact 16-byte binary objects in S3, reducing memory footprint by 87.5 %.

02

Application gateways download and search sorted in-memory arrays instead of querying a central database.

03

Conditional GETs and PUTs on S3 objects handle concurrency without requiring a separate coordination service.

THE READ

What the cluster adds up to.

ORIGINAL ANALYSIS

Canva’s redesign eliminates a critical bottleneck: every authentication request no longer hits a shared database. Instead, each gateway instance holds a local, in-memory index of revoked sessions. The index is built from immutable S3 objects that are downloaded on demand. This change removes the need for a high-availability database tier dedicated to revocation lookups, reducing infrastructure cost and deployment latency.

The trade-off is operational complexity. Gateways must maintain a sliding 12-hour window of revocation data, split into 30-minute chunks. Each chunk is a sorted array of 16-byte records, enabling fast binary search. Conditional GETs ensure gateways fetch only changed chunks, while conditional PUTs let asynchronous workers merge new revocations without conflicts. The design assumes S3’s eventual consistency is acceptable for revocation propagation, which may not hold for stricter real-time requirements.

Memory savings come from the compact binary format and the use of sorted arrays. A chunk containing one million revocations occupies only 16 MB, making it feasible to keep the entire window in memory. However, the approach stops working if the revocation rate exceeds the worker’s 2,000 revocations per second limit or if the 12-hour window is too short for operational needs. Teams must also handle cache reconstruction during gateway restarts, which relies on S3 availability.

The architecture shifts load from database reads to S3 writes and network transfers. Database load now scales with revocation write throughput rather than the number of gateways, making it more predictable. However, S3 costs and latency become new variables. The design also assumes that gateways can tolerate the delay of downloading new chunks, which may not be true for ultra-low-latency applications. Engineers must validate that the chosen chunk size and window duration fit their traffic patterns.

Canva’s choice of S3 over Redis highlights a preference for durability and operational simplicity. S3 eliminates the need to manage another datastore, but introduces new failure modes, such as S3 outages or throttling. The design also relies on ZooKeeper for leader election, though it is not required for correctness. Teams adopting this pattern must weigh the benefits of reduced database load against the added complexity of managing in-memory indexes and S3-based coordination.

Written by elseif from the cluster below · checked for specifics the sources never contained

THE CLUSTER

Same story, 1 feed.

ORDERED BY FIRST SEEN
InfoQ Canva Shares S3 Based Architecture for Session Revocation Across Hundreds of Millions of Sessions Open ↗