Jeremy Shuang's blog


  • Home

  • Archives

  • Tags

Comparison of mainstream distributed storage systems-Redis vs Elasticsearch

Posted on 2018-08-01 |

上一篇文章总计了 Zookeeper vs Kafka 对于分布式系统存在的问题的处理方式,今天来聊聊 Redis 和 Elasticsearch。

Redis

Node Role

Redis 中 roles 有:

  • Master
    • 负责数据的读写
    • 对 slave 的健康监听是通过 sentinel 实现的
  • Slave
    • slave 启动时,slaveof host port,即会去连接该 master 服务器
    • slave 可以配置是否参与写,一般建议只参与读
Read more »

Comparison of mainstream distributed storage systems-Zookeeper vs Kafka

Posted on 2018-07-20 |

今天计划将 Kafka, Elasticsearch, Redis, Zookeeper 放到一起来聊一聊。为什么要将这几个 Components 放一起比较呢,因为本质上来说,他们都是存储数据的:

  • Kafka 存消息数据
  • Redis 存缓存数据
  • Elasticsearch 存搜索数据
  • Zookeeper 通过 like-file-system 存配置信息
Read more »

分布式存储:Partition 细节

Posted on 2018-06-20 |

Partition

分片是指将大的数据集按一定规则拆分成小的数据集,来降低数据量增长过大时带来的问题。方式大体来说有两种:哈希分布 & 顺序分布。很多时候要根据具体业务选择分片方式。 Partition 的好处:

  1. improves performance(write): by limiting the amount of data to be examined and by locating related data in the same partition
  2. improves availability: by allowing partitions to fail independently, increasing the number of nodes that need to fail before availability is sacrificed

需要解决的问题:

  1. 自动负载均衡。分布式存储系统需要自动识别负载高的节点,当某台机器的负载高时,自动将其上的部分数据迁移到其他机器。
  2. 一致性:分片后数据可能分布在不同存储服务器上,无法使用数据库自带的单机事务,需通过分布式应用事务一致性模型来解决
Read more »

分布式存储:Replication 细节

Posted on 2018-06-02 |

distributed application system & distributed storage system 为了解决相似的问题:

  1. Performance
  2. Availability (and fault tolerance) 提出相似的解决方案:
    • 拆微服务 = 数据分片(partitioning)
    • 服务冗余 = 数据备份(replication)
Read more »

Cache Design Pattern

Posted on 2018-05-01 |

前几天总结了 Redis 的基本功能及使用技巧,今天计划从缓存的全局角度总结下知识点。 缓存的使用场景:

  • 开销大的,需要复杂计算的数据
  • 请求量大的数据
Read more »

Raft Consensus Algorithm

Posted on 2018-04-25 |
Read more »

Redis:Not only the distributed cache system

Posted on 2018-04-25 |

What is Redis?

Redis 特点:

  • 内存型、非关系型数据库
  • C 语言实现
  • 单线程架构 & I/O 多路复用模型
  • 丰富的数据结构
  • 支持 persistence
  • 支持 replication(master-slaves)
  • 支持 partition(cluster)
  • 支持 ha 高可用(sentinel)
Read more »

Zookeeper 分布式协调

Posted on 2018-04-02 |

本文部分参考自:《ZooKeeper: Distributed process coordination》 Apache ZooKeeper, a distributed coordination service for distributed systems. Zookeeper 最初是由 Yahoo 公司开发的,主要用于支持 robust distributed system,后期贡献给了 Apache 基金会。不像单体应用,在分布式系统中各个节点间的 Coordinating 是困难的。Zookeeper 正是为了解决分布式系统的协调工作(coordinating task),它通过提供通用的功能,让 application developers 能专注于自身的业务功能,而不用过多的关注分布式系统的协调。

Read more »

Kafka总结

Posted on 2018-03-07 |

Read more »

Learning to Rank

Posted on 2018-01-11 |

现状

传统意义上的企业级搜索是通过像 Lucence 以及基于它而开发的 Solr / Elasticsearch 来实现的。目前我们的搜索功能已经从 Solr 迁移到 Elasticsearch。Elasticsearch 内部有几种不同的算法来评估相关度(relevance):TF-IDF、BM25、BM25F等。

Read more »
1 2 3
Jeremy Shuang

Jeremy Shuang

hello world

27 posts
1 categories
RSS
© 2018 Jeremy Shuang
Powered by Jekyll
Theme - NexT.Muse