- 博客(2)
- 收藏
- 关注
原创 Robin六种常用负载均衡算法源码解析
1 经典轮询算法在这里插入代码片//Robin的负载均衡原理为 请求服务=请求次数%服务个数。//请求计数器private AtomicInteger nextServerCyclicCounter;public Server choose(ILoadBalancer lb, Object key) { if (lb == null) { log.warn("no load balancer"); return null;
2021-02-28 11:18:37
1141
4
原创 kafka学习笔记--DefaultPartitioner默认分区器源码理解
目前学习kafka中,在学习生产者分区策略时看了下默认分区器的源码,对于生产者分区理解加深了一些。废话不多说了,上代码//// Source code recreated from a .class file by IntelliJ IDEA// (powered by Fernflower decompiler)//package org.apache.kafka.clients.producer.internals;import java.util.List;import java
2020-12-13 19:10:26
660
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人