摘要: SPECIFICATION OF NODE'S ROLE(节点定义) NodeRole Spec Provider The provider exposes remote services 提供者暴露远端服务 Consumer The consumer calls the remote servic 阅读全文
posted @ 2020-11-02 10:55 ZhiJi&Ethan 阅读(329) 评论(0) 推荐(0) 编辑
摘要: Before the advent of large-scale services, an application might just exposes or references remote service by using RMI or Hessian, the call is done by 阅读全文
posted @ 2020-10-28 15:14 ZhiJi&Ethan 阅读(279) 评论(0) 推荐(0) 编辑
摘要: With the fast development of Internet, the scale of web applications expands unceasingly, and finally we find that the traditional vertical architectu 阅读全文
posted @ 2020-10-27 18:00 ZhiJi&Ethan 阅读(69) 评论(0) 推荐(0) 编辑
摘要: First, what is high concurrency High concurrency is one of the factors that must be considered in the architecture design of the Internet Distributed 阅读全文
posted @ 2020-07-03 17:03 ZhiJi&Ethan 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Get an overview of data structures and algorithms and how they work together in your Java programs Java programmers use data structures to store and o 阅读全文
posted @ 2020-07-03 11:51 ZhiJi&Ethan 阅读(422) 评论(0) 推荐(0) 编辑
摘要: 前言 2016年3月修改,结合自己的工作和平时学习的体验重新谈一下为什么要进行代码优化。在修改之前,我的说法是这样的: 就像鲸鱼吃虾米一样,也许吃一个两个虾米对于鲸鱼来说作用不大,但是吃的虾米多了,鲸鱼自然饱了。 代码优化一样,也许一个两个的优化,对于提升代码的运行效率意义不大,但是只要处处都能注意 阅读全文
posted @ 2020-07-03 10:54 ZhiJi&Ethan 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 我周围的人几乎都认为二分查找很简单,但事实真的如此吗?二分查找真的很简单吗?并不简单。看看 Knuth 大佬(发明 KMP 算法的那位)怎么说的: Although the basic idea of binary search is comparatively straightforward, t 阅读全文
posted @ 2020-07-03 10:52 ZhiJi&Ethan 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 为了避免出现服务的雪崩,我们需要对服务做容灾处理。 常规的服务容灾处理思路有: 资源隔离 超时设定 服务降级 服务限流 其中每种思路又可以有不同的解决方案。 比如资源隔离可以通过将不同的服务发布在独立的docker容器或服务器中,这样即使一个服务出现问题,也不会殃及池鱼。 服务降级和服务限流可以通过 阅读全文
posted @ 2020-07-03 10:46 ZhiJi&Ethan 阅读(813) 评论(0) 推荐(0) 编辑
摘要: 在《高可用服务设计之二:Rate limiting 限流与降级》的应用级限流中,介绍了多种方法例如: 1、使用guava提供工具库里的RateLimiter类(内部采用令牌捅算法实现)进行限流 2、使用Java自带delayqueue的延迟队列实现(编码过程相对麻烦,此处省略代码) 3、使用Redi 阅读全文
posted @ 2020-07-03 10:45 ZhiJi&Ethan 阅读(1134) 评论(0) 推荐(0) 编辑
摘要: 转至:https://www.cnblogs.com/duanxz/p/3465559.html 限流知识《高可用服务设计之二:Rate limiting 限流与降级》 在微服务架构中,我们将系统拆分成了一个个的服务单元,各单元间通过服务注册与订阅的方式互相依赖。由于每个单元都在不同的进程中运行,依 阅读全文
posted @ 2020-07-03 10:43 ZhiJi&Ethan 阅读(278) 评论(0) 推荐(0) 编辑