sentinel 整合dubbo限流

相关依赖

        <!-- 服务注册与发现 --><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId></dependency><!-- dubbo服务调用 --><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-dubbo</artifactId></dependency><!-- sentinel dubbo限流 --><dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-apache-dubbo-adapter</artifactId></dependency><!-- 数据上传到sentinel控制台 --><dependency><groupId>com.alibaba.csp</groupId><artifactId>sentinel-transport-simple-http</artifactId></dependency>

限流原理

在服务端、消费端添加filter实现限流

                 

# dubbo/org.apache.dubbo.rpc.Filter
sentinel.dubbo.provider.filter=com.alibaba.csp.sentinel.adapter.dubbo.SentinelDubboProviderFilter
sentinel.dubbo.consumer.filter=com.alibaba.csp.sentinel.adapter.dubbo.SentinelDubboConsumerFilter
dubbo.application.context.name.filter=com.alibaba.csp.sentinel.adapter.dubbo.DubboAppContextFilter

SentinelDubboProviderFilter:服务端限流过滤器

@Activate(group = {"provider"}
)
public class SentinelDubboProviderFilter extends BaseSentinelDubboFilter {public SentinelDubboProviderFilter() {RecordLog.info("Sentinel Apache Dubbo provider filter initialized", new Object[0]);}String getMethodName(Invoker invoker, Invocation invocation, String prefix) {return DubboUtils.getMethodResourceName(invoker, invocation, prefix);}String getInterfaceName(Invoker invoker, String prefix) {return DubboUtils.getInterfaceName(invoker, prefix);}public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {String origin = DubboAdapterGlobalConfig.getOriginParser().parse(invoker, invocation);if (null == origin) {origin = "";}Entry interfaceEntry = null;Entry methodEntry = null;String prefix = DubboAdapterGlobalConfig.getDubboProviderResNamePrefixKey();String interfaceResourceName = this.getInterfaceName(invoker, prefix);String methodResourceName = this.getMethodName(invoker, invocation, prefix);Result var10;try {ContextUtil.enter(methodResourceName, origin);interfaceEntry = SphU.entry(interfaceResourceName, 2, EntryType.IN);methodEntry = SphU.entry(methodResourceName, 2, EntryType.IN, invocation.getArguments());Result result = invoker.invoke(invocation);if (result.hasException()) {Tracer.traceEntry(result.getException(), interfaceEntry);Tracer.traceEntry(result.getException(), methodEntry);}var10 = result;return var10;} catch (BlockException var15) {var10 = DubboAdapterGlobalConfig.getProviderFallback().handle(invoker, invocation, var15);} catch (RpcException var16) {Tracer.traceEntry(var16, interfaceEntry);Tracer.traceEntry(var16, methodEntry);throw var16;} finally {if (methodEntry != null) {methodEntry.exit(1, invocation.getArguments());}if (interfaceEntry != null) {interfaceEntry.exit();}ContextUtil.exit();}return var10;}
}

SentinelDubboConsumerFilter:消费端限流过滤器

@Activate(group = {"consumer"}
)
public class SentinelDubboConsumerFilter extends BaseSentinelDubboFilter {public SentinelDubboConsumerFilter() {RecordLog.info("Sentinel Apache Dubbo consumer filter initialized", new Object[0]);}String getMethodName(Invoker invoker, Invocation invocation, String prefix) {return DubboUtils.getMethodResourceName(invoker, invocation, prefix);}String getInterfaceName(Invoker invoker, String prefix) {return DubboUtils.getInterfaceName(invoker, prefix);}public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {InvokeMode invokeMode = RpcUtils.getInvokeMode(invoker.getUrl(), invocation);return InvokeMode.SYNC == invokeMode ? this.syncInvoke(invoker, invocation) : this.asyncInvoke(invoker, invocation);}private Result syncInvoke(Invoker<?> invoker, Invocation invocation) {Entry interfaceEntry = null;Entry methodEntry = null;String prefix = DubboAdapterGlobalConfig.getDubboConsumerResNamePrefixKey();String interfaceResourceName = this.getInterfaceName(invoker, prefix);String methodResourceName = this.getMethodName(invoker, invocation, prefix);Result var9;try {interfaceEntry = SphU.entry(interfaceResourceName, 2, EntryType.OUT);methodEntry = SphU.entry(methodResourceName, 2, EntryType.OUT, invocation.getArguments());Result result = invoker.invoke(invocation);if (result.hasException()) {Tracer.traceEntry(result.getException(), interfaceEntry);Tracer.traceEntry(result.getException(), methodEntry);}var9 = result;return var9;} catch (BlockException var14) {var9 = DubboAdapterGlobalConfig.getConsumerFallback().handle(invoker, invocation, var14);} catch (RpcException var15) {Tracer.traceEntry(var15, interfaceEntry);Tracer.traceEntry(var15, methodEntry);throw var15;} finally {if (methodEntry != null) {methodEntry.exit(1, invocation.getArguments());}if (interfaceEntry != null) {interfaceEntry.exit();}}return var9;}private Result asyncInvoke(Invoker<?> invoker, Invocation invocation) {LinkedList<SentinelDubboConsumerFilter.EntryHolder> queue = new LinkedList();String prefix = DubboAdapterGlobalConfig.getDubboConsumerResNamePrefixKey();String interfaceResourceName = this.getInterfaceName(invoker, prefix);String methodResourceName = this.getMethodName(invoker, invocation, prefix);try {queue.push(new SentinelDubboConsumerFilter.EntryHolder(SphU.asyncEntry(interfaceResourceName, 2, EntryType.OUT), (Object[])null));queue.push(new SentinelDubboConsumerFilter.EntryHolder(SphU.asyncEntry(methodResourceName, 2, EntryType.OUT, 1, invocation.getArguments()), invocation.getArguments()));Result result = invoker.invoke(invocation);result.whenCompleteWithContext((r, throwable) -> {Throwable error = throwable;if (throwable == null) {error = (Throwable)Optional.ofNullable(r).map(Result::getException).orElse((Object)null);}while(!queue.isEmpty()) {SentinelDubboConsumerFilter.EntryHolder holder = (SentinelDubboConsumerFilter.EntryHolder)queue.pop();Tracer.traceEntry(error, holder.entry);this.exitEntry(holder);}});return result;} catch (BlockException var8) {while(!queue.isEmpty()) {this.exitEntry((SentinelDubboConsumerFilter.EntryHolder)queue.pop());}return DubboAdapterGlobalConfig.getConsumerFallback().handle(invoker, invocation, var8);}}private void exitEntry(SentinelDubboConsumerFilter.EntryHolder holder) {if (holder.params != null) {holder.entry.exit(1, holder.params);} else {holder.entry.exit();}}static class EntryHolder {private final Entry entry;private final Object[] params;public EntryHolder(Entry entry, Object[] params) {this.entry = entry;this.params = params;}}
}

BaseSeninelDubboFilter

public abstract class BaseSentinelDubboFilter implements Filter {public BaseSentinelDubboFilter() {}abstract String getMethodName(Invoker var1, Invocation var2, String var3);abstract String getInterfaceName(Invoker var1, String var2);
}

Filter

@SPI
public interface Filter {Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException;public interface Listener {void onResponse(Result appResponse, Invoker<?> invoker, Invocation invocation);void onError(Throwable t, Invoker<?> invoker, Invocation invocation);}
}

使用示例

**********

服务端

application.yml

spring:application:name: nacos-providercloud:nacos:discovery:server-addr: localhost:8848dubbo:#registry:# address: spring-cloud://localhost:8848protocol:name: dubboport: 20880

HelloService

public interface HelloService {String hello();
}

HelloServiceImpl

@DubboService
public class HelloServiceImpl implements HelloService {@Overridepublic String hello() {return "hello";}
}

DemoApplication

@EnableDubbo  //开启dubbo
@SpringBootApplication
public class DemoApplication {public static void main(String[] args) {SpringApplication.run(DemoApplication.class, args);}}

**********

消费端

application.yml

spring:application:name: nacos-consuemrcloud:nacos:discovery:server-addr: localhost:8848dubbo:protocol:name: dubboport: 20881server:port: 8081

HelloService

public interface HelloService {String hello();
}

HelloController

@RestController
public class HelloController {@DubboReferenceprivate HelloService helloService;@RequestMapping("/hello")public String hello(){System.out.println(helloService.hello());return "success";}
}

DemoApplication

@EnableDubbo
@SpringBootApplication
public class DemoApplication {public static void main(String[] args) {SpringApplication.run(DemoApplication.class, args);}}

**********

本地限流配置

CustomFlowRule

public class CustomFlowRule implements InitFunc {@Overridepublic void init() throws Exception {List<FlowRule> flowRules = new ArrayList<>();FlowRule flowRule = new FlowRule();flowRule.setResource("com.example.demo.service.HelloService");  //限制接口,对所有的接口方法限流(加总限流)//flowRule.setResource("com.example.demo.service.HelloService:hello()");//单个接口方法限流//flowRule.setResource("com.example.demo.service.HelloService:hello(java.lang.String)");//单个接口方法限流,方法有参数flowRule.setCount(1);flowRule.setGrade(RuleConstant.FLOW_GRADE_QPS);flowRule.setControlBehavior(RuleConstant.CONTROL_BEHAVIOR_DEFAULT);flowRules.add(flowRule);FlowRuleManager.loadRules(flowRules);}
}

META-INF/services/com.alibaba.csp.sentinel.init.InitFunc

com.example.demo.rule.CustomFlowRule

jmeter 测试

2022-03-31 13:13:34.076  INFO 3296 --- [           main] o.a.d.config.bootstrap.DubboBootstrap    :  [DUBBO] DubboBootstrap has started., dubbo version: 2.7.8, current host: 192.168.5.12
2022-03-31 13:13:34.077  INFO 3296 --- [           main] com.example.demo.DemoApplication         : Started DemoApplication in 3.577 seconds (JVM running for 4.167)
2022-03-31 13:13:35.001  WARN 3296 --- [client.listener] a.c.d.m.r.DubboServiceMetadataRepository : Current application will subscribe all services(size:2) in registry, a lot of memory and CPU cycles may be used, thus it's strongly recommend you using the externalized property 'dubbo.cloud.subscribed-services' to specify the services
2022-03-31 13:13:39.904  INFO 3296 --- [nio-8081-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2022-03-31 13:13:39.904  INFO 3296 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2022-03-31 13:13:39.920  INFO 3296 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 16 ms
hello
2022-03-31 13:13:39.980 ERROR 3296 --- [nio-8081-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: SentinelBlockException: FlowException] with root causejava.lang.RuntimeException: SentinelBlockException: FlowExceptionat com.alibaba.csp.sentinel.slots.block.BlockException.block(BlockException:0) ~[sentinel-core-1.8.0.jar:1.8.0]2022-03-31 13:13:40.000 ERROR 3296 --- [nio-8081-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: SentinelBlockException: FlowException] with root causejava.lang.RuntimeException: SentinelBlockException: FlowExceptionat com.alibaba.csp.sentinel.slots.block.BlockException.block(BlockException:0) ~[sentinel-core-1.8.0.jar:1.8.0]2022-03-31 13:13:40.005 ERROR 3296 --- [nio-8081-exec-3] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: SentinelBlockException: FlowException] with root causejava.lang.RuntimeException: SentinelBlockException: FlowExceptionat com.alibaba.csp.sentinel.slots.block.BlockException.block(BlockException:0) ~[sentinel-core-1.8.0.jar:1.8.0]2022-03-31 13:13:40.010 ERROR 3296 --- [nio-8081-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: SentinelBlockException: FlowException] with root causejava.lang.RuntimeException: SentinelBlockException: FlowExceptionat com.alibaba.csp.sentinel.slots.block.BlockException.block(BlockException:0) ~[sentinel-core-1.8.0.jar:1.8.0]2022-03-31 13:13:40.015 ERROR 3296 --- [nio-8081-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: SentinelBlockException: FlowException] with root causejava.lang.RuntimeException: SentinelBlockException: FlowExceptionat com.alibaba.csp.sentinel.slots.block.BlockException.block(BlockException:0) ~[sentinel-core-1.8.0.jar:1.8.0]2022-03-31 13:13:40.019 ERROR 3296 --- [nio-8081-exec-6] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: SentinelBlockException: FlowException] with root causejava.lang.RuntimeException: SentinelBlockException: FlowExceptionat com.alibaba.csp.sentinel.slots.block.BlockException.block(BlockException:0) ~[sentinel-core-1.8.0.jar:1.8.0]2022-03-31 13:13:40.024 ERROR 3296 --- [nio-8081-exec-7] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: SentinelBlockException: FlowException] with root causejava.lang.RuntimeException: SentinelBlockException: FlowExceptionat com.alibaba.csp.sentinel.slots.block.BlockException.block(BlockException:0) ~[sentinel-core-1.8.0.jar:1.8.0]2022-03-31 13:13:40.028 ERROR 3296 --- [nio-8081-exec-8] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: SentinelBlockException: FlowException] with root causejava.lang.RuntimeException: SentinelBlockException: FlowExceptionat com.alibaba.csp.sentinel.slots.block.BlockException.block(BlockException:0) ~[sentinel-core-1.8.0.jar:1.8.0]2022-03-31 13:13:40.032 ERROR 3296 --- [nio-8081-exec-9] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: SentinelBlockException: FlowException] with root causejava.lang.RuntimeException: SentinelBlockException: FlowExceptionat com.alibaba.csp.sentinel.slots.block.BlockException.block(BlockException:0) ~[sentinel-core-1.8.0.jar:1.8.0]

**********

控制台限流配置

启动sentinel dashboard

java -Dserver.port=8000 -Dcsp.sentinel.dashboard.server=localhost:8000 -Dproject.name=sentinel-dashboard -jar sentinel-dashboard.jar参数说明:
-Dserver.port=8080:指定控制台启动端口
-Dcsp.sentinel.dashboard.server:指定控制台地址和端口
-Dproject.name=sentinel-dashboard:指定控制台项目名称

nacos-provider添加启动参数

-Dserver.port=8080 -Dcsp.sentinel.dashboard.server=localhost:8000 -Dproject.name=nacos-provider

nacos-consumer添加启动参数

-Dserver.port=8081 -Dcsp.sentinel.dashboard.server=localhost:8000 -Dproject.name=nacos-consumer

sentinel控制台

jmeter 测试

2022-03-31 13:38:51.158  INFO 3815 --- [           main] com.example.demo.DemoApplication         : Started DemoApplication in 3.814 seconds (JVM running for 4.334)
2022-03-31 13:38:52.060  WARN 3815 --- [client.listener] a.c.d.m.r.DubboServiceMetadataRepository : Current application will subscribe all services(size:2) in registry, a lot of memory and CPU cycles may be used, thus it's strongly recommend you using the externalized property 'dubbo.cloud.subscribed-services' to specify the services
2022-03-31 13:38:58.567  INFO 3815 --- [erverWorker-4-1] o.a.d.r.t.netty4.NettyServerHandler      :  [DUBBO] The connection of /192.168.5.12:53422 -> /192.168.5.12:20881 is established., dubbo version: 2.7.8, current host: 192.168.5.12
2022-03-31 13:39:11.710  INFO 3815 --- [nio-8081-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2022-03-31 13:39:11.710  INFO 3815 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2022-03-31 13:39:11.726  INFO 3815 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 16 ms
hello
hello
2022-03-31 13:39:34.726 ERROR 3815 --- [nio-8081-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: SentinelBlockException: FlowException] with root causejava.lang.RuntimeException: SentinelBlockException: FlowExceptionat com.alibaba.csp.sentinel.slots.block.BlockException.block(BlockException:0) ~[sentinel-core-1.8.0.jar:1.8.0]2022-03-31 13:39:34.732 ERROR 3815 --- [nio-8081-exec-6] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: SentinelBlockException: FlowException] with root causejava.lang.RuntimeException: SentinelBlockException: FlowExceptionat com.alibaba.csp.sentinel.slots.block.BlockException.block(BlockException:0) ~[sentinel-core-1.8.0.jar:1.8.0]2022-03-31 13:39:34.737 ERROR 3815 --- [nio-8081-exec-7] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: SentinelBlockException: FlowException] with root causejava.lang.RuntimeException: SentinelBlockException: FlowExceptionat com.alibaba.csp.sentinel.slots.block.BlockException.block(BlockException:0) ~[sentinel-core-1.8.0.jar:1.8.0]2022-03-31 13:39:34.742 ERROR 3815 --- [nio-8081-exec-8] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: SentinelBlockException: FlowException] with root causejava.lang.RuntimeException: SentinelBlockException: FlowExceptionat com.alibaba.csp.sentinel.slots.block.BlockException.block(BlockException:0) ~[sentinel-core-1.8.0.jar:1.8.0]2022-03-31 13:39:34.746 ERROR 3815 --- [nio-8081-exec-9] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: SentinelBlockException: FlowException] with root causejava.lang.RuntimeException: SentinelBlockException: FlowExceptionat com.alibaba.csp.sentinel.slots.block.BlockException.block(BlockException:0) ~[sentinel-core-1.8.0.jar:1.8.0]2022-03-31 13:39:34.751 ERROR 3815 --- [io-8081-exec-10] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: SentinelBlockException: FlowException] with root causejava.lang.RuntimeException: SentinelBlockException: FlowExceptionat com.alibaba.csp.sentinel.slots.block.BlockException.block(BlockException:0) ~[sentinel-core-1.8.0.jar:1.8.0]2022-03-31 13:39:34.755 ERROR 3815 --- [nio-8081-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: SentinelBlockException: FlowException] with root causejava.lang.RuntimeException: SentinelBlockException: FlowExceptionat com.alibaba.csp.sentinel.slots.block.BlockException.block(BlockException:0) ~[sentinel-core-1.8.0.jar:1.8.0]2022-03-31 13:39:34.759 ERROR 3815 --- [nio-8081-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: SentinelBlockException: FlowException] with root causejava.lang.RuntimeException: SentinelBlockException: FlowExceptionat com.alibaba.csp.sentinel.slots.block.BlockException.block(BlockException:0) ~[sentinel-core-1.8.0.jar:1.8.0]

sentinel 整合dubbo限流相关推荐

  1. Sentinel整合Dubbo限流实战

    Sentinel整合Dubbo限流实战 创建provider项目 添加jar依赖 <dependency><artifactId>sentinel-api</artifa ...

  2. Spring Cloud入门-Sentinel实现服务限流、熔断与降级(Hoxton版本)

    文章目录 Spring Cloud入门系列汇总 摘要 Sentinel简介 安装Sentinel控制台 创建sentinel-service模块 限流功能 创建RateLimitController类 ...

  3. Spring Cloud Alibaba基础教程:使用Sentinel实现接口限流

    点击蓝色"程序猿DD"关注我哟 加个"星标",不忘签到哦 最近管点闲事浪费了不少时间,感谢网友们的留言提醒. 及时纠正路线,继续跟大家一起学习Spring Cl ...

  4. Gateway配合sentinel自定义限流_你知道如何使用阿里Sentinel实现接口限流吗?

    Nacos作为注册中心和配置中心的基础教程,到这里先告一段落,后续与其他结合的内容等讲到的时候再一起拿出来说,不然内容会有点跳跃.接下来我们就来一起学习一下Spring Cloud Alibaba下的 ...

  5. sentinel 集群限流

    sentinel 集群限流 官网:https://sentinelguard.io/zh-cn/docs/cluster-flow-control.html 集群限流 集群限流:一个服务在多个机器上部 ...

  6. 快速体验 Sentinel 集群限流功能,只需简单几步

    ️ Pic by Alibaba Tech on Facebook 集群限流 可以限制某个资源调用在集群内的总 QPS,并且可以解决单机流量不均导致总的流控效果不佳的问题,是保障服务稳定性的利器. S ...

  7. sentinel限流_微服务架构进阶:Sentinel实现服务限流、熔断与降级

    摘要 Spring Cloud Alibaba 致力于提供微服务开发的一站式解决方案,Sentinel 作为其核心组件之一,具有熔断与限流等一系列服务保护功能,本文将对其用法进行详细介绍. Senti ...

  8. Sentinel vs Hystrix 限流对比,该如何选择?

    Sentinel 是阿里中间件团队开源的,面向分布式服务架构的轻量级高可用流量控制组件,主要以流量为切入点,从流量控制.熔断降级.系统负载保护等多个维度来帮助用户保护服务的稳定性. 大家可能会问:Se ...

  9. Sentinel微服务限流、熔断、降级介绍(一)

    概述 在互联网应用中,会有很多突发性的高并发访问场景,比如双11大促.秒杀等.这些场景最大的特点就是访问量会远远超出系统所能够处理的并发数. 在没有任何保护机制的情况下,如果所有的流量都进入服务器,很 ...

最新文章

  1. Introduction to Objects
  2. Android 实现边听边录音探究
  3. boundingRect函数
  4. SQL发HTML页脚怎么写,SQL Server中发送HTML格式邮件的方法
  5. 全排列算法原理和实现
  6. Oracle把逗号分割的字符串转换为可放入in的条件语句的字符数列
  7. redis 存储数据不设置过期时间 会自动过期吗_Redis-数据淘汰策略持久化方式(RDB/AOF)Redis与Memcached区别...
  8. P3810 【模板】三维偏序(陌上花开)
  9. Linux:多进程、多线程服务器的实现解析(有图有代码有真相!!!)
  10. 用C#实现软件自动更新
  11. System.Runtime.InteropServices浅见
  12. scanner 获取控制台信息_Java使用Scanner类进行控制台输入实现方法
  13. webmail lite php,自建webmail网页客户端
  14. java 替换回车换行符
  15. zoj 3228 覆盖及非覆盖串的多次匹配
  16. [Linux] linux命令总结之dig命令
  17. 【Tools】haneWIN NFS Server 1.2.10 注册机(亲测有效)
  18. windows11 怎么使用IE浏览器,修改edge参数来实现
  19. Re-ID Driven Localization Refinement for Person Search
  20. python3*1**3 表达式输出结果为_22 % 3 表达式输出结果为________

热门文章

  1. weui.js java_WEUI控件JS用法
  2. c# FTP服务器文件上传下载等操作
  3. Google优化工具Timeline的使用(Chrome 57已经改为performance(性能模板))
  4. 研究生周报(第九周)
  5. IP地址、子网掩码、网络号、主机号、网络地址、主机地址以及ip段详解
  6. HTML5 Audio API
  7. Windows Sever 2008 备份与恢复
  8. 源码 -- Cocoachina游戏特效大赛 – cocos2d/cocos2dx 演示程序
  9. Markdown特殊符号
  10. java线程饥饿原理,Java线程饥饿和锁的公平性「译」