天天看點

分布式緩存開源架構Flasher介紹

寫在前面

今天給大家推薦款國内某一線電商平台Redis分布式緩存架構。

推薦理由:

日均通路量100億.QPS:157W。包含57項業務。

也是工作3-5年以上的程式員必看的源碼資料,千萬别錯過。

分布式緩存開源架構Flasher介紹

Flasher特點

1、基于Jedis Cluster開發的用戶端支援Redis Cluster叢集。

2、對被調用方(用戶端)侵入極少,上手極快。

3、支援動态增加節點,用戶端自動感覺。

4、支援用戶端驗證與攔截。 token

5、異步監控調用資料,支援異步上報。

6、友善管理有效的區分業務系統。

7、支援Falcon協定. 監控系統

架構圖:

分布式緩存開源架構Flasher介紹
分布式緩存開源架構Flasher介紹
分布式緩存開源架構Flasher介紹
分布式緩存開源架構Flasher介紹

接入代碼

1、maven依賴

com.tl.flasher

flasher

0.0.5-snapshots

2、配置Spring依賴

class=“com.tl.flasher.spring.RedisClusterConnectionFactory”>

class=“com.tl.flasher.impl.RedisClusterImpl”>

3、監控資料上報

4、Java測試

@RunWith(SpringJUnit4ClassRunner.class)

@ContextConfiguration(locations = {"/application-tlcache.xml"})

public class TlCache {

@Autowired

IRedis iredis;

@Test

public void testKey(){

iredis.set(“trade”, “monkey” , “2019”);

iredis.get(“trade”,“monkey”));

}

}

開源位址:

https://gitee.com/ym-monkey/flasher

繼續閱讀