Giter Club home page Giter Club logo

imooc-coupon's Introduction

imooc-coupon

Redis Pipeline详解

一.pipeline出现的背景

redis客户端执行一条命令分为4个过程:

发送命令->命令排队->命令执行->返回结果

这个过程称为Round trip time(简称RTP,往返时间),mget,mset有效节约了RTT,但大部分命令(如hgetall,并没有mhgettall)不支持批量操作,需要消耗N次RTT,这个时候需要pipeline来解决这个问题

Pipeline 指的是管道技术,指的是客户端允许将多个请求依次发送给服务器,过程中而不需要等待请求的回复,在最后一并读取结果即可。

Ribbon和Feign

微服务之间的服务调用

Ribbon 包括了两个部分:负载均衡算法+app_name 转具体的ip:port

Feign:定义接口,并在接口上添加注解,消费者通过调用接口的形式进行服务消费

Hystrix:服务雪崩是熔断器解决的最核心的问题

Hystrix的三个特性:断路器机制,FallBack,资源隔离

断路器机制:当Hystrix Command 请求后端服务失败数量超过一个阀值比例,断路器会切换到开路状态

FallBack:降级回滚策略

资源隔离:不同的微服务调用使用不同的线程池来管理

imooc-coupon's People

Contributors

boneshade avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.