(For hot data only on game servers) There are three types of Cache Design on the game server: In-process cache-for example, Java's ehcahe,
In-process cache-use session cache to customize and distributed cache through basic language types and basic collection frameworks-such as redis and memcahced.
These three types have their own advantages. They can be used independently or in combination based on different application scenarios.
Using a third-party framework for In-process caching and custom session caching has a fast and efficient effect to a certain extent, but it is not conducive to distributed processing and uses distributed caching.
To some extent, it may cause Io bottlenecks. Some people try to combine the advantages of the two to make such a cache, such as the open-source j2cache.
In terms of game framework structure design, customization based on application scenarios is the most reliable and ideal.
Generally, in-process caching + distributed caching are considered. In this way, the data is directly cached in the process cache, and the data is stored in the distributed cache ?!
Is it necessary to use distributed cache to make it look high !? . Or recently, it was said that Shenma redis (memcache) is very popular, so it is easy to use it directly ?!!!
The author's point of view is that in-process cache + distributed cache is a basic design concept, but the specific application scenarios are clearly defined.
Welcome to discussion
Discussion on the cache design scheme in game servers