I've noticed that sometimes i get the following warning message marked with red color:
Hot key warning (memcache compute units) / You have significant load concentrated across only 4 values
The first key has 56% Percentage of traffic, and the following 3 have 6-7%. My question is: is this a major issue? What impact does it have on app performance ? (if the values in memcache disappear, they will be loaded from datastore )
I have 108 items in memcache, with a total cache size of 286KiB
It is a memcache best practice to distribute the load across your memcache keyspace
Distribute load across your memcache keyspace. Having a single or small set of memcache items represent a disproportionate amount of traffic will hinder your app from scaling. This applies to both operations/sec and bandwidth. The problem can often be alleviated by explicit sharding of your data. For example, a frequently updated counter can be split among several keys, reading them back and summing only when a total is needed. Likewise, a 500K piece of data that must be read on every HTTP request can be split across multiple keys and read back using a single batch API call. (Even better would be to cache the value in instance memory.) For dedicated memcache, the peak access rate on a single key should be 1-2 orders of magnitude less than the per-GB rating.
https://cloud.google.com/appengine/docs/adminconsole/memcache
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With