上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 70 下一页
该文被密码保护。 阅读全文
posted @ 2022-09-26 10:07 codestacklinuxer 阅读(26) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2022-09-25 21:07 codestacklinuxer 阅读(6) 评论(0) 推荐(0)
摘要: 以前一直听说过一致性hash,今天处理bug需要用到一致性hash,所以就看下: 寻找一种有一致性的代理方案: 对同一个 keykey 的所有读写请求都必须一致地分配给同一个后端节点。 同时,分配的负载应该尽量均衡。 换句话讲, 我们需要寻找一种映射函数, 把随机到来的字符串 keykey ,一致地 阅读全文
posted @ 2022-09-21 22:26 codestacklinuxer 阅读(26) 评论(0) 推荐(0)
摘要: 整型的Hash算法使用的是Thomas Wang's 32 Bit / 64 Bit Mix Function ,这是一种基于位移运算的散列方法。基于移位的散列是使用Key值进行移位操作。通常是结合左移和右移。每个移位过程的结果进行累加,最后移位的结果作为最终结果。这种方法的好处是避免了乘法运算,从 阅读全文
posted @ 2022-09-21 22:15 codestacklinuxer 阅读(56) 评论(0) 推荐(0)
摘要: tcp_timewait_state_process(struct inet_timewait_sock *tw, struct sk_buff *skb, const struct tcphdr *th) { /* * Now real TIME-WAIT state. * * RFC 1122: 阅读全文
posted @ 2022-09-19 16:40 codestacklinuxer 阅读(41) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2022-09-16 11:31 codestacklinuxer 阅读(97) 评论(0) 推荐(0)
摘要: 等待所有线程运行起来,其代码如下所示: 主线程代码: static int init_count = 0; static pthread_mutex_t init_lock; static pthread_cond_t init_cond; /* Wait for all the threads t 阅读全文
posted @ 2022-09-15 22:25 codestacklinuxer 阅读(25) 评论(0) 推荐(0)
摘要: 以前有篇文章记录过hash算法相关文章hash Hash函数的应用 错误校正 使用一个散列函数可以很直观的检测出数据在传输时发生的错误。在数据的发送方,对将要发送的数据应用散列函数,并将计算的结果同原始数据一同发送。在数据的接收方,同样的散列函数被再一次应用到接收到的数据上,如果两次散列函数计算出来 阅读全文
posted @ 2022-09-15 21:27 codestacklinuxer 阅读(33) 评论(0) 推荐(0)
摘要: 1 阅读全文
posted @ 2022-09-03 12:23 codestacklinuxer 阅读(11) 评论(0) 推荐(0)
摘要: 今天打流测试出现大量的FIN_WAIT1状态,可知主动关闭没有收到ack, 有个问题是?这个状态会维持多长时间?? 参考这几篇博客: 修改重传次数&& 超时重传最大时间 TCP的定时器 查看tcp_write_timeout 中部分的代码有检测sock_dead状态下的超时时间 if (sock_f 阅读全文
posted @ 2022-08-26 16:58 codestacklinuxer 阅读(166) 评论(0) 推荐(0)
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 70 下一页