愿星光伴随你左右


  • 首页

  • todo

  • 思考

  • life

  • food

  • OS

  • lua

  • redis

  • Golang

  • C

  • TCP/IP

  • ebpf

  • p4

  • OpenVPN

  • IPSec

  • L2TP

  • DNS

  • distributed

  • web

  • OpenWRT

  • 运维

  • Git

  • 鸟哥的私房菜

  • IT杂谈

  • 投资

  • About Me

  • 友情链接

  • FTP

  • 搜索
close

分布式系统的Raft算法

时间: 2021-09-03   |   分类: 分布式   cs   面试     |   阅读: 1839 字 ~4分钟

  过去, Paxos一直是分布式协议的标准,但是Paxos难于理解,更难以实现,Google的分布式锁系统Chubby作为Paxos实现曾经遭遇到很多坑。

阅读全文 »

More Redis internals: Tracing a GET & SET

时间: 2021-09-02   |   分类: redis     |   阅读: 3629 字 ~8分钟

原文链接

MARCH 10, 2011

img

In my previous article, I took a superficial look at how Redis starts up and prepares itself to process commands. In this article, I’ll follow a GET and a SET command as they move from client through the server and back. The GET will be for a key that doesn’t exist, and the SET will set that key. Then I’ll look quickly at a subsequent GET and how it differs.

阅读全文 »

under the hood

时间: 2021-09-01   |   分类: redis     |   阅读: 3752 字 ~18分钟

by Paul Smith (@paulsmith)

Redis logo

How does the Redis server work?

I was curious to learn more about Redis’s internals, so I’ve been familiarizing myself with the source, largely by reading and jumping around in Emacs. After I had peeled back enough of the onion’s layers, I realized I was trying to keep track of too many details in my head, and it wasn’t clear how it all hung together. I decided to write out in narrative form how an instance of the Redis server starts up and initializes itself, and how it handles the request/response cycle with a client, as a way of explaining it to myself, hopefully in a clear fashion. Luckily, Redis has a nice, clean code base that is easy to read and follow along. Armed with a TAGS file, my $EDITOR, and GDB, I set out to see how it all works under the hood. (Incidentally, I was working with the Redis code base as of commit b4f2e41. Of course, internals such as I outline below are subject to change. However, the broad architecture of the server is unlikely to change very much, and I tried to keep that in mind as I went along.)

阅读全文 »

深入理解Linux IO模型(二)

时间: 2021-08-26   |   分类: os   cs     |   阅读: 5457 字 ~11分钟

深入理解Linux IO模型(二)

原创 Pearl Pearl的仲夏夜之梦 6月13日

为何使用epollselect的缺陷epoll的提出epoll的原理数据结构实现原理高效原因epoll的API创建epoll控制epoll等待epoll使用epoll API触发方式水平触发(Level Triggered, LT)边缘触发(Edge Triggered, ET)两者对比Reference

阅读全文 »

深入理解Linux IO模型(一)

时间: 2021-08-26   |   分类: os   cs     |   阅读: 9420 字 ~19分钟

深入理解Linux IO模型(一)

原创 Pearl Pearl的仲夏夜之梦 6月12日

Linux IO模型是后端工程师的必备技能。从以往的面试中看,部分后端开发人员对它的理解停留在调API的层面,我自己也理解欠缺。最近系统学习了一下,整理了此文。本文参考了一些文章,放在本文最后,大家可以直接去看这些文章,值得阅读。

阅读全文 »

Redis的47连环炮,试试你能看住几个 -面前复习

时间: 2021-08-26   |   分类: redis   db   cs   面试     |   阅读: 16255 字 ~33分钟

写在前面

大家好,我是老田,前面我们已经分享了五篇连环炮文章,今天我们继续。今天我们接着来聊聊Redis。Redis已经成为我们开发者必备技能之一了,同时面试也是必问的。下面就来对Redis进行一个总结,然后赠送43连环炮。

阅读全文 »

redis基础数据结构skiplist

时间: 2021-08-25   |   分类: redis     |   阅读: 3617 字 ~8分钟

以下内容转载自csdn-Knight0xffff

太长不看版

  • 跳跃表是有序集合的底层实现之一, 除此之外它在 Redis 中没有其他应用。
  • 每个跳跃表节点的层高都是 1 至 64 之间的随机数
  • 层高越高出现的概率越低,层高为i的概率为( 1 − p ) ∗ p i − 1 , ( p = 1 / 4 ) (1-p) * p^{i-1}, (p=1/4)(1−p)∗p**i−1,(p=1/4)。
  • 跳跃表中,分值可以重复, 但对象成员唯一。分值相同时,节点按照成员对象的大小进行排序。

本篇解析基于redis 5.0.0版本,本篇涉及源码文件为t_zset.c, server.h。

阅读全文 »

操作系统基础56-磁盘调度算法

时间: 2021-08-25   |   分类: os   cs     |   阅读: 3188 字 ~7分钟

操作系统基础56-磁盘调度算法

2021-02-08 02:15·重学IT的老猫

操作系统的职责之一是有效使用硬件。对于磁盘驱动器,满足这个要求具有较快的访问速度和较宽的磁盘带宽。 对于磁盘,访问时间包括两个主要部分:

阅读全文 »
44 45 46 47 48 49 50 51 52

日志
分类
标签
RSS 订阅
GitHub
© 2009 - 2025
粤ICP备2021068940号-1 粤公网安备44011302003059
0%