You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To finish the installation please set up a cloud scheduler job to call the controller function every minute. You can do it by running the following gcloud command.
**DESCRIPTION**: Auto-scalable counters for your app.
4
+
5
+
6
+
**FEATURES**:
7
+
8
+
- Zero configuration, one mod for all your app needs
9
+
- Automatically scales from 0 updates/sec to at least 10k updates/sec
10
+
- Efficient for very low traffic counters
11
+
- Handles gracefully bursts of up to thousands updates/sec
12
+
- Can support thousands of updates/sec per counter and millions of counters in an app
13
+
- Works well offline and provides latency compensation
14
+
- Counter updates are immediately visible locally even though the main counter is eventually updated
15
+
16
+
17
+
**DETAILS**: This mod allows you to increment any fields in your documents at arbitrary rate.
18
+
19
+
Client SDK, instead of incrementing the field directly, increments their own shard in `_counter_shards_` subcollection. A background task is periodically aggregating these shards and eventually rolling them up to the main counters.
20
+
21
+
There are three cloud functions that orchestrate shard aggregations:
22
+
1. A `worker` function is responsible for monitoring and aggregating a range of shards. There may be 0 or hundreds of workers running concurrently to scale up to large workloads
23
+
2. A `controller` function runs every minute and monitors the health of the workers. It can scale up and down the number of workers as needed and recover a worker on failure.
24
+
3. A `onWrite` function triggers every time a shard is written and runs one-time aggregation. This improves latency for low workloads where no workers is running. To improve efficiency there's only one instance of this function running at any given time (`maxInstances` is set to 1).
0 commit comments