IP Library › Granted Patent US 12,748,674
Granted Patent B2
US 12,748,674 · App. 19/006,020 · Granted Sep 29, 2026

Accurate global eventual counting

Inventors: Varun Khaitan (San Francisco, CA); Joseph Lynch (Gaithersburg, MD); Rajiv Shringi (Fremont, CA)
Assignee: NETFLIX, INC.
G06F11/3075G06F9/542G06F11/3082G06F11/3086G06F40/284G06F2201/835G06F2201/88
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,748,674
App. No.
19/006,020
Granted
Sep 29, 2026
Kind
B2
Abstract

In various embodiments, a computer-implemented method comprises receiving, from a first endpoint device, a first event during a first time period, modifying an event log to include a record associated with the first event, causing a rollup queue to include a request to count a first count value associated with the first event, and generating, in a second time period subsequent to the first time period, a counter value associated with at least the first event based on the rollup queue and the event log.

Claims (77)

1 . A computer-implemented method, comprising:

receiving a first event;

modifying an event log to include a record associated with the first event;

adding, based on the first event, a request to a queue; and

generating a counter value associated with at least the first event based on the queue and the event log.

2 . The computer-implemented method of claim 1 , wherein:

the event log includes a set of immutable events;

a first partition of the event log is not appended after a threshold time period; and

generating the counter value includes aggregating a set of count values in the first partition after the threshold time period.

3 . The computer-implemented method of claim 2 , wherein each record included in the event log includes a globally-unique idempotency token that includes (i) a unique identifier, and (ii) a timestamp.

4 . The computer-implemented method of claim 2 , further comprising:

determining that the threshold time period has elapsed;

deduplicating, based on a set of idempotency tokens, a set of records included in a first partition of the event log to generate a deduplicated set of records, wherein the set of records includes the record; and

generating an updated count value based on the deduplicated set of records, wherein the updated count value is included in the counter value.

5 . The computer-implemented method of claim 1 , further comprising:

receiving a second message that includes the first event;

appending a second record associated with the first event to the event log, wherein the record and the second record include a globally-unique token; and

deduplicating the record and the second record based on the globally-unique token.

6 . The computer-implemented method of claim 1 , further comprising:

receiving a request message;

determining that the request message includes a request for the first event;

retrieving, from the event log, the record; and

transmitting, to an endpoint device associated with the request message, a response that includes a first count value included in the queue and retrieved from the record.

7 . The computer-implemented method of claim 1 , further comprising:

receiving a request message;

determining that the request message includes a request for the counter value;

retrieving the counter value; and

transmitting, to an endpoint device associated with the request message, a response that includes the counter value.

8 . The computer-implemented method of claim 7 , wherein the counter value is stored in at least one of (i) an event cache, or (ii) a rollup table.

9 . The computer-implemented method of claim 7 , wherein retrieving the counter value overlaps with writing the record to the event log.

10 . The computer-implemented method of claim 1 , wherein a first count value included in the queue comprises one of (i) a negative value, or (ii) a value of 2 or higher.

11 . One or more non-transitory computer-readable storage media storing instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of:

receiving, from a first endpoint device, a first event during a first time period;

modifying an event log to include a record associated with the first event;

causing a rollup queue to include a request to count a first count value associated with the first event;

generating, in a second time period subsequent to the first time period, a counter value associated with at least the first event based on the rollup queue and the event log;

determining that a threshold time period has elapsed;

upon determining that the threshold time period has elapsed, deduplicating a set of records included in a first partition of the event log to generate a deduplicated set of records, wherein:

the deduplicated set of records includes the record, and

the deduplicating is based on a set of idempotency tokens; and

generating an updated count value based on the deduplicated set of records, wherein the updated count vale is included in the counter value.

12 . The one or more non-transitory computer-readable storage media of claim 11 , wherein each record included in the event log includes an idempotency token that includes (i) a unique identifier, and (ii) a timestamp.

13 . The one or more non-transitory computer-readable storage media of claim 11 , further storing instructions that, when executed by the one or more processors, cause the one or more processors to perform the steps of:

determining that the request to count a first count value associated with the first event is included in the rollup queue;

aggregating, based on the request included in the rollup queue, a set of records included in the event log to generate a count value update, wherein the set of records includes the first count value; and

updating the counter value based on the count value update, wherein the counter value is stored in an event cache.

14 . The one or more non-transitory computer-readable storage media of claim 13 , further storing instructions that, when executed by the one or more processors, cause the one or more processors to perform the steps of:

generating a rollup count entry that includes the count value update and a rollup timestamp; and

updating a rollup table to include the rollup count entry and the rollup timestamp.

15 . The one or more non-transitory computer-readable storage media of claim 11 , wherein the first count value comprises one of (i) a negative value, or (ii) a value of 2 or higher.

16 . The one or more non-transitory computer-readable storage media of claim 11 , further comprising instructions that cause the one or more processors to further perform the steps of:

receiving, by an Internet exchange (IX) point in a first region from a set of endpoint devices, a set of events made by a plurality of users, wherein the set of events includes the first event;

appending a set of records associated with the set of events to a local event log; and

replicating the set of events included in the local event log by appending the set of events to the event log.

17 . A system comprising:

a memory storing a global event counter application; and

a processor coupled to the memory that executes the global event counter application by performing the steps of:

receiving, from a first endpoint device, a first event during a first time period;

modifying an event log to include a record associated with the first event;

causing a rollup queue to include a request to count a first count value associated with the first event;

generating, in a second time period subsequent to the first time period, a counter value associated with at least the first event based on the rollup queue and the event log;

determining that the request to count a first count value associated with the first event is included in the rollup queue;

aggregating, based on the request included in the rollup queue, a set of records included in the event log to generate a count value update, wherein the set of records includes the first count value; and

updating the counter value based on the count value update, wherein the counter value is stored in an event cache.

18 . The system of claim 17 , wherein the processor further executes the global event counter application to perform the steps of:

determining that a threshold time period has elapsed;

upon determining that the threshold time period has elapsed, deduplicating a set of records included in a first partition of the event log to generate a deduplicated set of records, wherein:

the deduplicated set of records includes the record,

each record included in the event log includes an idempotency token that includes (i) a unique identifier, and (ii) a timestamp, and

the deduplicating is based on a set of idempotency tokens; and

generating an updated count value based on the deduplicated set of records, wherein the updated count vale is included in the counter value.

19 . The system of claim 17 , wherein each record included in the event log includes an idempotency token that includes (i) a unique identifier, and (ii) a timestamp.

20 . The system of claim 17 , wherein the processor further executes the global event counter application to perform the steps of:

receiving, from the first endpoint device, a request message;

determining that the request message includes a request for the counter value;

retrieving the counter value; and

transmitting, to the first endpoint device, a response that includes the counter value.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 14, 2025
From: KHAITAN, VARUN; LYNCH, JOSEPH; SHRINGI, RAJIV
To: NETFLIX, INC.
Reel/Frame 070834/0629 →
Continuity (2)
Continuation 17683818 · Mar 1, 2022
Related Publication 20250208967A1 · Jun 26, 2025
References Cited (61)
US 6507852B1 · Dempsey · 2003 [cited by examiner]
US 7315863B2 · Kambo · 2008 [cited by examiner]
US 7519797B1 · Stiehl · 2009 [cited by examiner]
US 7529979B2 · Dombrowa · 2009 [cited by examiner]
US 8413169B2 · Grabs et al. · 2013 [cited by applicant]
US 8751529B2 · Zhang et al. · 2014 [cited by applicant]
US 8788254B2 · Peloski · 2014 [cited by examiner]
US 8855970B2 · Sethumadhavan · 2014 [cited by examiner]
US 8904063B1 · Sandstrom · 2014 [cited by examiner]
US 8924692B2 · Knauth · 2014 [cited by examiner]
US 9329972B2 · Halverson · 2016 [cited by examiner]
US 9647905B1 · Pittman · 2017 [cited by examiner]
US 9983968B2 · Gwozdz · 2018 [cited by examiner]
US 10324817B2 · Norrie · 2019 [cited by examiner]
US 10740211B2 · Brown · 2020 [cited by examiner]
US 10776196B2 · Ohana · 2020 [cited by examiner]
US 10810103B2 · Lin · 2020 [cited by examiner]
US 11016824B1 · Wells et al. · 2021 [cited by applicant]
US 11061569B2 · Hallak et al. · 2021 [cited by applicant]
US 11182478B2 · Viscuso et al. · 2021 [cited by applicant]
US 11288161B2 · Togawa · 2022 [cited by applicant]
US 11645114B2 · Oliveirinha et al. · 2023 [cited by applicant]
US 11775495B2 · Kavanagh et al. · 2023 [cited by applicant]
US 12181995B2 · Khaitan · 2024 [cited by examiner]
US 20020174083A1 · Hellerstein · 2002 [cited by examiner]
US 20050144532A1 · Dombrowa · 2005 [cited by examiner]
US 20090038001A1 · Bozak et al. · 2009 [cited by applicant]
US 20120023432A1 · Aguren · 2012 [cited by examiner]
US 20120284221A1 · Shelton · 2012 [cited by examiner]
US 20120303481A1 · LouisN'jai · 2012 [cited by examiner]
US 20130135119A1 · Swope, III · 2013 [cited by examiner]
US 20140245082A1 · Halverson et al. · 2014 [cited by applicant]
US 20140337491A1 · Barreto · 2014 [cited by examiner]
US 20140344718A1 · Rapaport · 2014 [cited by examiner]
US 20150081706A1 · Elmqvist Wulcan · 2015 [cited by examiner]
US 20150089286A1 · Knauth et al. · 2015 [cited by applicant]
US 20170060660A1 · Gondi et al. · 2017 [cited by applicant]
US 20180097687A1 · Brown · 2018 [cited by applicant]
US 20180157544A1 · Brown · 2018 [cited by examiner]
US 20180165173A1 · Lin · 2018 [cited by examiner]
US 20180285226A1 · Norrie · 2018 [cited by examiner]
US 20190042323A1 · Shotton · 2019 [cited by examiner]
US 20190098037A1 · Shenoy et al. · 2019 [cited by applicant]
US 20190163603A1 · Brown et al. · 2019 [cited by applicant]
US 20190205221A1 · Taubler · 2019 [cited by examiner]
US 20190258730A1 · Obradovic et al. · 2019 [cited by applicant]
US 20190287003A1 · Sercinoglu et al. · 2019 [cited by applicant]
US 20190340057A1 · Brown · 2019 [cited by examiner]
US 20200201699A1 · Yu et al. · 2020 [cited by applicant]
US 20200327103A1 · Anand · 2020 [cited by examiner]
US 20200372113A1 · Thomas · 2020 [cited by applicant]
US 20200394159A1 · Hurley et al. · 2020 [cited by applicant]
US 20210012238A1 · Gao · 2021 [cited by examiner]
US 20210191798A1 · Zhang · 2021 [cited by examiner]
US 20210397499A1 · Pronk et al. · 2021 [cited by applicant]
US 20220121507A1 · Jha et al. · 2022 [cited by applicant]
US 20220413982A1 · Roy et al. · 2022 [cited by applicant]
US 20230123509A1 · Wolf et al. · 2023 [cited by applicant]
CN 115495424A · 2022 [cited by applicant]
CN 116701091A · 2023 [cited by applicant]
EP 2239664B1 · 2017 [cited by examiner]