US 12,468,333 B2
Distributed in-memory timer queues
Christopher Lintz, Franktown, CO (US); Fawad Halim, Addison, IL (US); and Krishna Tushar Dharaiya, San Francisco, CA (US)
Assigned to Twilio Inc., San Francisco, CA (US)
Filed by Twilio Inc., San Francisco, CA (US)
Filed on Dec. 29, 2023, as Appl. No. 18/400,742.
Prior Publication US 2025/0216890 A1, Jul. 3, 2025
Int. Cl. G06F 1/10 (2006.01)
CPC G06F 1/10 (2013.01) 20 Claims
OG exemplary drawing
 
1. A method comprising:
distributing a plurality of queues across a plurality of nodes, the plurality of queues including a first queue, the first queue corresponding to timer expirations for a tenant, time bucket, and shard, wherein a sorted set includes references to unacknowledged timers for a tenant and shard;
creating a plurality of processes, each of the plurality of processes configured to be a unique consumer of the distributed plurality of queues,
creating a first consumer group and a second consumer group within each of the plurality of processes, the first consumer group corresponding to the first queue, the second consumer group corresponding to the sorted set; and
using the plurality of processes to consume the first queue with the first consumer group and the second queue with the second consumer group.