Thinking Redis not want to use a distributed caching scheme

       Redis has now become the standard solution for Java projects caching scheme and the vast majority of scenes, but I am doing a new project, the project may initially want to appear when very small clusters, probably two application servers, but do distributed cache, at least to save the login data, at this time if the Redis, it will inevitably need to build a Redis server, but also a little bit of a waste of trouble, we must build a maintenance monitoring, the need to provide near-proprietary memory space for Redis server, this time had to think, how much memory is appropriate, single node will not crash? Change Redis cluster? . . . Simply do not have? After a big project and then change it back Redis? So think about meditation in full swing Redis, caching scheme does not seem to cloud over native applications, ideal for cloud native application should look like it?

       No server: server means like Redis, the need to build a server, you need to manage, you need to configure the so-called clusters, cluster monitoring needs to be done. The cloud itself is a native application cluster, the cluster itself can be found on interoperability, is itself a form of cluster server through the service;

       Decentralized : no center node by node cluster automatically (node) and group (group) distributed cache to store data, the data may be stored in a copy of the node, thought hdfs distributed file storage is similar, multi-node multi-copy save;

       Distributed computing: Hadoop distributed computing using Map / reduce the advantage of local computing saved locally, taking to achieve the basic point data storage is done on the same node in the calculation, then the results collected in a distributed computing. Our theoretical ideal cloud distributed caching solution should also have such capacity, we need to calculate the cached data, then the data stored in itself is calculated by a node when the data stored in the calculation.

       Smart Persistence: dynamic data block by the persistent cache cluster management easier, rather than the whole database Redis or persistent, even if fragmentation is fixed and can not only be based on the decision-making persistent data sheets and clusters of cases persistence time.

       

       In this ideal cloud native application caching scheme the way we use the cache should be like this, we only need to introduce the project to build a corresponding jar package, like a map to use as a distributed cache, the other is referred to frame themselves processing, whether we are a beginning or later many nodes, we have the rest. Our applications can be combined spring cloud registration center or zk achieve service discovery, this case is calculated by the intelligent caching framework joint decision-making and access to call data cache, but also the full application memory space, think about all the cool depending on the application server memory situation, you Tell me what you think of it? Welcome message exchange! There are like-minded friends to join us to develop a framework put forward a big news now! - Shi Longgang

                     

Guess you like

Origin blog.51cto.com/3126597/2423509
Recommended