Hi All,
Below is an article that I understand to be the canonical example for sharding counters with Google datastore.
I have 2 questions:
- Can you programmatically track Entity write contention? I would like to dynamically increase shard sizes as required to minimise the number of contended writes (e.g. threshold that can be increased based on median, 95PCTL, etc).
- Is it a bad idea to eagerly "preallocate" counters in the IncreaseShards function so that GetMulti can be used?
For pt 2 I would see IncreaseShards do the following in a transaction:
- Read current config.
- PutMulti of missing counters (num new - num current).
- Put new shard config.
And Count could replace the Query/Run with GetMulti which I assume is more efficient/faster.
Is it true that because eager loading is not presented as an option it is less robust and due to locking, latency, consistency/visibility, whatever?
Kind regards,
Nathan