GithubHelp home page GithubHelp logo

hotkeyworker's Introduction

HotKeyWorker

简介

针对Redis集群读热点的解决方案,主要参考分布式缓存服务Tair的热点数据散列机制

问题描述

以Redis为代表性的缓存系统具有广泛的应用,而针对大量的数据时会采用Redis集群的方式。 目前往往采用一致性哈希算法,保证存储的较为均匀并且在增加或减少节点时可以减少需要移动的Key。

因此,在进行hash时,相同的Key必然得到一样的hash值,存储在固定节点上。
这样,在出现热点场景时(如秒杀,weibo的热点新闻)大量访问集群中的某特定节点造成单点故障。

解决思路

在热点出现时,若能将访问流量分散到整个集群各个节点,就可以避免这种问题。

在每个Redis存储实例都配备一个HotAgent,主要进行热点Key的识别和存储。 修改客户端,当集群热点Key出现时,每次需要读取数据时,首先判断是否是一个热点Key,如果是直接从对应的HotAgent读取。

目前进展

实现第一个demo。
以redis-cli作为客户端,在此基础上进行改写,

ToDo

对接口更加充分的Jedis进行修改,作为可实际使用的客户端。
在HotAgent增加查询接口,后期可直接通过web页面展示/监控HotKey。

hotkeyworker's People

Contributors

kangyijie5473 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

liuyan20149295

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.