A powerful flow control component enabling reliability, resilience and monitoring for microservices. (面向云原生微服务的高可用流控防护组件)

Overview

Sentinel Logo

Sentinel: The Sentinel of Your Microservices

Travis Build Status Codecov Maven Central License Gitter

Introduction

As distributed systems become increasingly popular, the reliability between services is becoming more important than ever before. Sentinel takes "flow" as breakthrough point, and works on multiple fields including flow control, traffic shaping, circuit breaking and system adaptive protection, to guarantee reliability and resilience for microservices.

Sentinel has the following features:

  • Rich applicable scenarios: Sentinel has been wildly used in Alibaba, and has covered almost all the core-scenarios in Double-11 (11.11) Shopping Festivals in the past 10 years, such as “Second Kill” which needs to limit burst flow traffic to meet the system capacity, message peak clipping and valley fills, circuit breaking for unreliable downstream services, cluster flow control, etc.
  • Real-time monitoring: Sentinel also provides real-time monitoring ability. You can see the runtime information of a single machine in real-time, and the aggregated runtime info of a cluster with less than 500 nodes.
  • Widespread open-source ecosystem: Sentinel provides out-of-box integrations with commonly-used frameworks and libraries such as Spring Cloud, Dubbo and gRPC. You can easily use Sentinel by simply add the adapter dependency to your services.
  • Polyglot support: Sentinel has provided native support for Java, Go and C++.
  • Various SPI extensions: Sentinel provides easy-to-use SPI extension interfaces that allow you to quickly customize your logic, for example, custom rule management, adapting data sources, and so on.

Features overview:

features-of-sentinel

Documentation

See the Sentinel for the document website.

See the 中文文档 for document in Chinese.

See the Wiki for full documentation, examples, blog posts, operational details and other information.

Sentinel provides integration modules for various open-source frameworks (e.g. Spring Cloud, Apache Dubbo, gRPC, Spring WebFlux, Reactor) and service mesh. You can refer to the document for more information.

If you are using Sentinel, please leave a comment here to tell us your scenario to make Sentinel better. It's also encouraged to add the link of your blog post, tutorial, demo or customized components to Awesome Sentinel.

Ecosystem Landscape

ecosystem-landscape

Quick Start

Below is a simple demo that guides new users to use Sentinel in just 3 steps. It also shows how to monitor this demo using the dashboard.

1. Add Dependency

Note: Sentinel requires JDK 1.8 or later.

If you're using Maven, just add the following dependency in pom.xml.

<!-- replace here with the latest version -->
<dependency>
    <groupId>com.alibaba.csp</groupId>
    <artifactId>sentinel-core</artifactId>
    <version>1.8.1</version>
</dependency>

If not, you can download JAR in Maven Center Repository.

2. Define Resource

Wrap your code snippet via Sentinel API: SphU.entry(resourceName). In below example, it is System.out.println("hello world");:

try (Entry entry = SphU.entry("HelloWorld")) {
    // Your business logic here.
    System.out.println("hello world");
} catch (BlockException e) {
    // Handle rejected request.
    e.printStackTrace();
}
// try-with-resources auto exit

So far the code modification is done. We've also provided annotation support module to define resource easier.

3. Define Rules

If we want to limit the access times of the resource, we can set rules to the resource. The following code defines a rule that limits access to the resource to 20 times per second at the maximum.

List<FlowRule> rules = new ArrayList<>();
FlowRule rule = new FlowRule();
rule.setResource("HelloWorld");
// set limit qps to 20
rule.setCount(20);
rule.setGrade(RuleConstant.FLOW_GRADE_QPS);
rules.add(rule);
FlowRuleManager.loadRules(rules);

For more information, please refer to How To Use.

4. Check the Result

After running the demo for a while, you can see the following records in ~/logs/csp/${appName}-metrics.log.{date} (When using the default DateFileLogHandler).

|--timestamp-|------date time----|-resource-|p |block|s |e|rt  |occupied
1529998904000|2018-06-26 15:41:44|HelloWorld|20|0    |20|0|0   |0
1529998905000|2018-06-26 15:41:45|HelloWorld|20|5579 |20|0|728 |0
1529998906000|2018-06-26 15:41:46|HelloWorld|20|15698|20|0|0   |0
1529998907000|2018-06-26 15:41:47|HelloWorld|20|19262|20|0|0   |0
1529998908000|2018-06-26 15:41:48|HelloWorld|20|19502|20|0|0   |0
1529998909000|2018-06-26 15:41:49|HelloWorld|20|18386|20|0|0   |0

p stands for incoming request, block for blocked by rules, s for success handled by Sentinel, e for exception count, rt for average response time (ms), occupied stands for occupiedPassQps since 1.5.0 which enable us booking more than 1 shot when entering.

This shows that the demo can print "hello world" 20 times per second.

More examples and information can be found in the How To Use section.

The working principles of Sentinel can be found in How it works section.

Samples can be found in the sentinel-demo module.

5. Start Dashboard

Note: Java 8 is required for building or running the dashboard.

Sentinel also provides a simple dashboard application, on which you can monitor the clients and configure the rules in real time.

dashboard

For details please refer to Dashboard.

Trouble Shooting and Logs

Sentinel will generate logs for troubleshooting and real-time monitoring. All the information can be found in logs.

Bugs and Feedback

For bug report, questions and discussions please submit GitHub Issues.

Contact us via Gitter or Email.

Contributing

Contributions are always welcomed! Please refer to CONTRIBUTING for detailed guidelines.

You can start with the issues labeled with good first issue.

Credits

Thanks Guava, which provides some inspiration on rate limiting.

And thanks for all contributors of Sentinel!

Who is using

These are only part of the companies using Sentinel, for reference only. If you are using Sentinel, please add your company here to tell us your scenario to make Sentinel better :)

Alibaba Group AntFin Taiping Renshou 拼多多 爱奇艺 Shunfeng Technology 二维火 Mandao 文轩在线 客如云 亲宝宝 杭州光云科技 金汇金融 闪电购

Comments
  • rule.setResource(resourceName)中的resourceName关于前后空格是否trim在系统中处理不一致

    rule.setResource(resourceName)中的resourceName关于前后空格是否trim在系统中处理不一致

    Issue Description

    例如:假设存在资源“/hello/test”,在配置中心或者设置规则时resourceName带了空格"[n ]/hello/test[n]"(方括号标识空格,n表示若干),则在dashboard上无法明显看出,但是当修改该资源的其它属性时,由于https://github.com/alibaba/Sentinel/blob/0059b1a42dc938d8467d334088ed29ec0164930b/sentinel-dashboard/src/main/java/com/taobao/csp/sentinel/dashboard/view/FlowControllerV1.java#L168 这行代码会trim掉空格,就会导致资源名称悄悄发生了改变,保存之后刚好可以匹配,流控生效,但是若修改配置中心中该规则的配置,这条不带空格的规则也会跟着变化,导致看起来配置中心的规则已生效,实际情况是修改并未生效,此时资源名称又变回了带空格的,因此无法匹配,而且相当难以发现,实际上整个流程中产生了两条规则,但是它们却并没有以两条的形式展示出来,而且用户点击了编辑按钮,资源名也无法编辑,也不应生成新的规则,令人相当困惑 Type: bug report

    Describe what happened (or what feature you want)

    dashboard修改规则时去除了资源名称前后的空格导致规则发生了变化但是却又未在界面上有所区分

    Describe what you expected to happen

    资源名称要么都不处理空格,要么整个系统中都要统一处理空格

    How to reproduce it (as minimally and precisely as possible)

    1. 将wiki中如何使用的例子中定义资源的语句修改为带空格的即可,rule.setResource(" HelloWorld");
    2. 观察dashboard发现规则未生效
    3. 点击流控规则,编辑HelloWorld规则,不作任何修改,直接保存,发现规则已生效

    Tell us your environment

    win 10,idea,jdk 8,sentinel 1.4

    Anything else we need to know?

    no

    kind/enhancement area/dashboard 
    opened by techzealot 33
  • @SentinelResource stay controller Can use,but service can not use

    @SentinelResource stay controller Can use,but service can not use

    Hello, why can this annotation be used in controller, but not in service ,I found that the breakpoint in the controller would follow the invokeResourceWithSentinel method in the SentinelResourceAspect class, but the service would not follow the invokeResourceWithSentinel method.controller and service are both in one project

    @SentinelResource(value = "hello3", blockHandler = "handleException", blockHandlerClass = {ExceptionUtil.class})
    @RequestMapping("/hello3")
    public Map<String,Object> test2() {
    Map<String,Object> map=new HashMap<>();
    map.put("method","test2");
    map.put("msg","自定义限流逻辑处理");
    return map;
    }
    
    @Service
    public class TestServiceImpl implements TestService {
    protected transient final Logger log = LoggerFactory.getLogger(getClass());
    
    @SentinelResource(value = "hello3", blockHandler = "handleException", blockHandlerClass = {ExceptionUtil.class})
    @Override
    public Map<String,Object> test(String str) {
        System.out.println("str=" + str);
        Map<String,Object> map=new HashMap<>();
        map.put("method","test2");
        map.put("msg","自定义限流逻辑处理");
        return  map;
    }
    
    kind/question area/annotation 
    opened by liduanwen 32
  • Is that possible to config log destination to stdout in container environment

    Is that possible to config log destination to stdout in container environment

    Issue Description

    Type: feature request

    Describe what happened (or what feature you want)

    In container environment, we desire output log to stdout, so that we can collection log with EFK, but I cannot find a config option

    Describe what you expected to happen

    Output log to stdout

    How to reproduce it (as minimally and precisely as possible)

    Tell us your environment

    Kubernetes

    Anything else we need to know?

    kind/discussion area/logging 
    opened by sherwinwangs 25
  • Make the slot as the SPI interface and add a @Order annotation for define slot order

    Make the slot as the SPI interface and add a @Order annotation for define slot order

    Describe what this PR does / why we need it

    Make it easier to add custorm slot and arrange its order for users.

    Does this pull request fix one issue?

    Fixes #316

    Describe how you did it

    1.Add a @Order annotation and define the order of default slots from -9000 to -1000 NodeSelectorSlot: -9000 ClusterBuilderSlot: -8000 LogSlot: -7000 StatisticSlot: -6000 ParamFlowSlot: -5000 SystemSlot: -4000 AuthoritySlot: -3000 FlowSlot: -2000 DegradeSlot: -1000

    2.Add a loadOrderedInstanceList(Class<T>) method in SpiLoader, to Load the ordered instance list by SPI

    3.Modify the DefaultSlotChainBuilder new XxxSlot changed to using SpiLoader.loadOrderedInstanceList(ProcessorSlot.class);

    Describe how to verify it

    Add unit test

    Special notes for reviews

    Please review its feasibility in this way, if it is okay, maybe the InitOrder can also use Order annotation instead, for similar logic, the InitOrder and InitExecutor didn't modified at present.

    kind/enhancement size/L 
    opened by cdfive 24
  • 客户端连接Sentinel Dashboard更换域名后不同步刷新问题

    客户端连接Sentinel Dashboard更换域名后不同步刷新问题

    版本:1.6.3 问题:我有很多个应用已经连接到Sentinel,用的是域名+LVS -> 具体IP. Sentinel换了机房,需要申请新的LVS去挂载新的IP,老的LVS下线并且域名挂载新LVS完毕后,到客户端发现客户端的日志一直有心跳报错,显示域名解析到的LVS还是老LVS,没有隔一断时间尝试连接和感知新LVS的功能. 如果想要快速解决,得客户端重启应用才行.

    想问的是这种场景有没有快速解决方案?因为我也不清楚SimpleHttpClient这个类长连接什么时候才能自动刷新连接,或许如果不重启就不会刷新的情况.

    所以求助各位大神看看有没有办法不让客户端重启就能刷新连接. 谢谢

    kind/question 
    opened by cookiejoo 22
  • Sentinel 1.7.1 版本,SpringMVC模式后台报错

    Sentinel 1.7.1 版本,SpringMVC模式后台报错

    版本:

    SpringBoot:2.2.6.RELEASE SpringCloud:Hoxton.SR3 SpringCloud Alibaba:2.2.0.RELEASE Sentinel:1.7.1 JDK:1.8 运行环境:undertow

    使用Demo里面的案例来配置了自动埋点

        @Override
        public void addInterceptors(InterceptorRegistry registry) {
             SentinelWebMvcConfig config = new SentinelWebMvcConfig();
              config.setBlockExceptionHandler(new TimeBlockExceptionHandler());
              config.setHttpMethodSpecify(true);
              registry.addInterceptor(new SentinelWebInterceptor(config)).addPathPatterns("/**");
        }
    

    然后流量控制没有问题,但是后台一直在报错

    2020-04-09 14:02:37.735 ERROR [system,fa92d2578e7f1288,fa92d2578e7f1288,false] 24904 --- [ XNIO-1 task-19] o.s.web.servlet.HandlerExecutionChain    : HandlerInterceptor.afterCompletion threw exception
    
    com.alibaba.csp.sentinel.ErrorEntryFreeException: The order of entry exit can't be paired with the order of entry, current entry in context: </menus>, but expected: </menus>
    	at com.alibaba.csp.sentinel.CtEntry.exitForContext(CtEntry.java:80)
    	at com.alibaba.csp.sentinel.CtEntry.trueExit(CtEntry.java:108)
    	at com.alibaba.csp.sentinel.CtEntry.exit(CtEntry.java:61)
    	at com.alibaba.csp.sentinel.Entry.exit(Entry.java:79)
    	at com.alibaba.csp.sentinel.adapter.spring.webmvc.AbstractSentinelInterceptor.traceExceptionAndExit(AbstractSentinelInterceptor.java:122)
    	at com.alibaba.csp.sentinel.adapter.spring.webmvc.AbstractSentinelInterceptor.afterCompletion(AbstractSentinelInterceptor.java:87)
    	at org.springframework.web.servlet.HandlerExecutionChain.triggerAfterCompletion(HandlerExecutionChain.java:179)
    	at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1136)
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1057)
    	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
    	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:503)
    	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
    	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
    	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
    	at brave.servlet.TracingFilter.doFilter(TracingFilter.java:67)
    	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
    	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
    	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
    	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    	at org.springframework.cloud.sleuth.instrument.web.ExceptionLoggingFilter.doFilter(ExceptionLoggingFilter.java:50)
    	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
    	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    	at brave.servlet.TracingFilter.doFilter(TracingFilter.java:84)
    	at org.springframework.cloud.sleuth.instrument.web.LazyTracingFilter.doFilter(TraceWebServletAutoConfiguration.java:138)
    	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
    	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    	at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:109)
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
    	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
    	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
    	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
    	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
    	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
    	at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
    	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
    	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
    	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
    	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
    	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
    	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
    	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
    	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269)
    	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78)
    	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133)
    	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130)
    	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
    	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
    	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)
    	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78)
    	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:99)
    	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:376)
    	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at java.lang.Thread.run(Thread.java:748)
    
    kind/question area/integrations 
    opened by coolyujiyu 22
  • can't print log to sentinel-record.log file with log4j JDK logging adapter

    can't print log to sentinel-record.log file with log4j JDK logging adapter

    Describe what happened (or what feature you want)

    I use nacos as dynamic rule center, and change rule in nacos console, i also receive the new rule, but can't see anything in sentinel-record.log file, is there some special config params?

    There are 2 record log file, they are empty all:

    -rw-r--r-- 1 work work    0 Aug  8 13:27 sentinel-record.log.2019-08-08.0
    -rw-r--r-- 1 work work    0 Aug  8 13:27 sentinel-record.log.2019-08-08.0.lck
    

    But the metrics.log is right.

    And more, I run the code on my computer, and can see log, but deploy it to server, it will not.

    Tell us your environment

    Nacos client version is 1.0.0 Sentinel version is 1.6.2

    kind/question area/logging 
    opened by RojerAlone 22
  • REST API pattern UrlCleaner同一处理

    REST API pattern UrlCleaner同一处理

    Issue Description

    Type: feature request

    Describe what happened (or what feature you want)

    对于Spring MVC或者Spring Boot应用中存在大量的@PathVariable 注解,对于这类相关的url能否给个默认的实现处理?

    Currently the CommonFilter of sentinel-web-servlet extract url path as resource, which does not work well for REST APIs with path variables. Sentinel provides a UrlCleaner interface to do URL cleaning, but it's tedious to parse URL patterns and implement UrlCleaner manually. So are there any good solutions for this kind of cases?

    目前自己提供的解决方案: 扩展UrlCleaner,获取容器中的所有映射路径,每次请求时,做动态匹配

    kind/enhancement good first issue area/integrations 
    opened by xiejiashuai 21
  • Can't link app to the dashboard

    Can't link app to the dashboard

    Issue Description

    My application is not visible in the left sidebar of the sentinel dashboard I have gone through the documentation multiple times. Still not able to connect

    Describe what you expected to happen

    I expected the application to be visible in the left sidebar

    How to reproduce it (as minimally and precisely as possible)

    1. Started the sentinel dashboard Output of the java process (670984618 79519 1585 0 9:42AM ttys012 6:31.06 /usr/bin/java -Dserver.port=7070 -Dcsp.sentinel.dashboard.server=localhost:7070 -Dproject.name=sentinel -jar target/sentinel-dashboard.jar)
    2. Started my application with added dependancy
          <dependency>
              <groupId>com.alibaba.csp</groupId>
              <artifactId>sentinel-transport-simple-http</artifactId>
              <version>1.6.3</version>
          </dependency>
      

    And tried with 2 different jvm parameters 1st Config

    -Dproject.name=api -Dcsp.sentinel.dashboard.server=localhost:7070 -Dcsp.sentinel.app.type=1 -Dcsp.sentinel.api.port=8710
    

    2nd Config

    -Dproject.name=api -Dcsp.sentinel.dashboard.server=localhost:7070 -Dcsp.sentinel.app.type=1 -Dcsp.sentinel.api.port=8719
    
    1. Hit my application through curls

    Output of logs/csp

    -rw-r--r--    1 nitish.goyal  1312973762    81383 Aug 24 14:09 sentinel-metrics.log.2019-08-24
    -rw-r--r--    1 nitish.goyal  1312973762    17600 Aug 24 14:09 sentinel-metrics.log.2019-08-24.idx
    -rw-r--r--    1 nitish.goyal  1312973762   455270 Aug 24 14:09 command-center.log.2019-08-24.0
    -rw-r--r--    1 nitish.goyal  1312973762      238 Aug 24 13:57 io-phonepe-api-Api-metrics.log.2019-08-24.7
    -rw-r--r--    1 nitish.goyal  1312973762       64 Aug 24 13:57 io-phonepe-api-Api-metrics.log.2019-08-24.7.idx
    -rw-r--r--    1 nitish.goyal  1312973762    32793 Aug 24 13:54 sentinel-record.log.2019-08-24.0.1
    drwxr-xr-x  165 nitish.goyal  1312973762     5280 Aug 24 13:54 .
    -rw-r--r--    1 nitish.goyal  1312973762      455 Aug 24 13:54 command-center.log.2019-08-24.0.1
    -rw-r--r--    1 nitish.goyal  1312973762        0 Aug 24 13:54 command-center.log.2019-08-24.0.1.lck
    -rw-r--r--    1 nitish.goyal  1312973762        0 Aug 24 13:54 sentinel-record.log.2019-08-24.0.1.lck
    -rw-r--r--    1 nitish.goyal  1312973762     7810 Aug 24 13:53 sentinel-record.log.2019-08-24.0
    

    Output of io-phonepe-api-Api-metrics.log.2019-08-24.7

    PP-C02WK225G8WN:csp nitish.goyal$ cat io-phonepe-api-Api-metrics.log.2019-08-24.7
    1566635068000|2019-08-24 13:54:28|foxtrot-qps|1|0|0|0|0|0
    1566635073000|2019-08-24 13:54:33|foxtrot-qps|0|0|1|0|4900|0
    1566635241000|2019-08-24 13:57:21|foxtrot-qps|1|0|0|0|0|0
    1566635247000|2019-08-24 13:57:27|foxtrot-qps|0|0|1|0|4900|0
    

    After all these steps, I am still not able to see my application in the left sidebar I only see one application as sentinel-dashboard

    Kindly help me figure out how to get my application on the console

    kind/question area/dashboard area/configuration 
    opened by nitishgoyal13 20
  • Fixes Issues #1696 添加持久化支持,可选持久化选项:nacos、apollo、zookeeper ; 修改 README.md 说明文档

    Fixes Issues #1696 添加持久化支持,可选持久化选项:nacos、apollo、zookeeper ; 修改 README.md 说明文档

    Signed-off-by: jiajiangnan [email protected]

    Fixes Issues #1696 1、添加持久化支持,可选持久化选项:nacos、apollo、zookeeper 2、修改 README.md 和 Sentinel_Dashboard_Feature.md 说明文档

    Describe what this PR does / why we need it

    Extended persistence module. We can persistent the configs of rules into config-center like nacos,apollo,zookeeper. It can make sure the rule configs could make work even if we restart the sentinel-dashbord or sentinel client in applications. Now,this PR is also adapte to the web views,the views is not needed to modify at all.

    Does this pull request fix one issue?

    Fixes Issues #1696

    Describe how you did it

    1、Add config items in springboot config files such as application.properties. These config items is the settings that config-center needed. When sentinel-dashboard is starting, Spring will identify which config-center is configed, or used the memory as the default store. 2、All kinds of config-center has it's self Rules ManageClient which constructed by @configuration, but only one will be construct by sentinel-dashboard started because the @configuration has condition. The only one is that be configed in application.preperties. We can manage the rules through ManageClient. 3、There is a condition sentences to ensure that the old code still worked. If the item added in application is memory, then use the default "sentinelApiClient", else use the Client constructed by @configuration.

    Describe how to verify it

    Before: 1、add the following config items in application.properties: datasource.provider=nacos datasource.provider.nacos.server-addr=ip:port 2、run sentinel-dashboard 3、application which inclues sentinel-client ,config to the same config-center

    After: 1、manage rules in sentinel-dashboard, search the configs in config-center, do some request in application which inclues sentinel-client 2、manage rules in config-center, search the rules in dashboard, do some request in application which inclues sentinel-client 3、Because of this PR has adapt the default memory store,and also adapt the web view, so we can test directly in the old web pages.

    Special notes for reviews

    1、this PR has adapt the default memory store,and also adapt the web view, so we can test directly in the old web pages.

    area/dashboard size/XXL 
    opened by jnan806 19
  • fix the method of dashboard invoking cluster api

    fix the method of dashboard invoking cluster api

    Describe what this PR does / why we need it

    被限流服务使用集群限流嵌入模式(Embedded)时,在dashborad的集群流控->新增Token Server页面,点击保存按钮后调用被限流节点以下两个api时,应该用get请求,否则会报empty data错误 http://ip:port/cluster/client/modifyConfig http://ip:port/cluster/server/modifyFlowConfig

    被限流服务为springboot应用,使用如下依赖: org.springframework.cloud spring-cloud-starter-alibaba-sentinel 0.9.0.RELEASE

    com.alibaba.csp sentinel-cluster-client-default 1.6.1

    com.alibaba.csp sentinel-cluster-server-default 1.6.1

    area/dashboard 
    opened by Yisaki 19
  • Sentinel DataSource 是否考虑增加一个基于Spring Resource的数据源

    Sentinel DataSource 是否考虑增加一个基于Spring Resource的数据源

    Issue Description

    image

    目前sentinel支持的数据源相对比较全面 , 但是似乎对于Spring Resource方式的数据加载没有做支持 (只提供了FileRefreshableDataSourceFileInJarReadableDataSource 两种方式)

    主要是Spring Boot 打成Jar包后运行时,不能直接使用读文件的时候去加载文件数据 , 虽然目前提供的FileInJarReadableDataSource可以读到Jar里面的文件内容,但FileInJarReadableDataSource在Spring Boot中用起来似乎显得很奇怪 (Spring Boot项目需要获取当前自己正在运行的Jar包路径,然后拼接对应的文件地址) , 如果sentinel配置文件是在其他Jar包里面那获取可能就更麻烦了.

    https://github.com/alibaba/spring-cloud-alibaba/issues/3033 https://github.com/alibaba/spring-cloud-alibaba/issues/462

    Describe what you expected to happen

    是否考虑新增一个支持 Spring Resource 方式的数据源加载方式 , 这样对于Spring Boot项目的对接实际上会友好很多 , 第三方框架要对接sentinel直接传入一个Resource对象即可 .

    opened by ruansheng8 0
  • 网关限流添加api分组后无法找到服务

    网关限流添加api分组后无法找到服务

    Issue Description

    Type: bug report

    Describe what happened (or what feature you want)

    当我没有在网关添加api分组的时候,一切正常, 当我在网关中添加了api分组,启动网关之后,控制台无法看到网关服务。 When I did not add an API group to the gateway, everything was normal, When I add an api group to the gateway and start the gateway, the dashboard cannot see the gateway service.

    这是我在GatewayConfig中添加的api分组 This is the api group I added in GatewayConfig

        @PostConstruct
        public void doInit() {
            initCustomizedApis();
        }
    
        private void initCustomizedApis() {
            Set<ApiDefinition> definitions = new HashSet<>();
            ApiDefinition api1 = new ApiDefinition("custom_system")
                    .setPredicateItems(new HashSet<ApiPredicateItem>() {{
                        add(new ApiPathPredicateItem().setPattern("/system/sysUser/list"));
                        add(new ApiPathPredicateItem().setPattern("/system/sysOnline/**")
                                .setMatchStrategy(SentinelGatewayConstants.URL_MATCH_STRATEGY_PREFIX));
                    }});
            definitions.add(api1);
            GatewayApiDefinitionManager.loadApiDefinitions(definitions);
        }
    

    Describe what you expected to happen

    How to reproduce it (as minimally and precisely as possible)

    1. sentinel version 1.8.5
    2. spring cloud alibaba version 2021.0.4.0
    3. fastjson version 2.0.10
    4. jdk version 1.8
    5. 其他配置和文档一致(Other configurations are consistent with the documents)

    Tell us your environment

    Windows11

    Anything else we need to know?

    opened by q876625596 0
  • dubbo泛化调用和正常调用,配置熔断参数有差异吗

    dubbo泛化调用和正常调用,配置熔断参数有差异吗

    Issue Description

    Type: bug report or feature request

    Describe what happened (or what feature you want)

    Describe what you expected to happen

    How to reproduce it (as minimally and precisely as possible)

    Tell us your environment

    Anything else we need to know?

    kind/question area/integrations 
    opened by caochengxiang 0
  • Fix test failure under JDK 17 | 修复 JDK 17 下测试框架及用例报错的问题

    Fix test failure under JDK 17 | 修复 JDK 17 下测试框架及用例报错的问题

    Issue Description

    Type: bug report

    Describe what happened (or what feature you want)

    The test cases will fail under JDK 17, due to JDK-compatibility of some test frameworks (e.g. PowerMock).

    JDK 17 下测试用例会失败,部分原因是我们测试框架不支持 JDK 17 导致的(可能是版本太低,或确实不支持)。欢迎社区修复解决。

    Some error messages:

    com.alibaba.csp.sentinel.slots.statistic.base.LeapArrayTest
    
    java.lang.ExceptionInInitializerError
    	at jdk.internal.reflect.GeneratedSerializationConstructorAccessor4.newInstance(Unknown Source)
    	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
    	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
    	at org.objenesis.instantiator.sun.SunReflectionFactoryInstantiator.newInstance(SunReflectionFactoryInstantiator.java:48)
    	at org.objenesis.ObjenesisBase.newInstance(ObjenesisBase.java:73)
    	at org.mockito.internal.creation.instance.ObjenesisInstantiator.newInstance(ObjenesisInstantiator.java:19)
    	at org.mockito.internal.creation.bytebuddy.SubclassByteBuddyMockMaker.createMock(SubclassByteBuddyMockMaker.java:47)
    	at org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker.createMock(ByteBuddyMockMaker.java:25)
    	at org.powermock.api.mockito.mockmaker.PowerMockMaker.createMock(PowerMockMaker.java:41)
    	at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:35)
    	at org.mockito.internal.MockitoCore.mock(MockitoCore.java:62)
    	at org.mockito.Mockito.mock(Mockito.java:1908)
    	at org.powermock.api.mockito.internal.mockcreation.DefaultMockCreator.createMethodInvocationControl(DefaultMockCreator.java:108)
    	at org.powermock.api.mockito.internal.mockcreation.DefaultMockCreator.doCreateMock(DefaultMockCreator.java:61)
    	at org.powermock.api.mockito.internal.mockcreation.DefaultMockCreator.createMock(DefaultMockCreator.java:53)
    	at org.powermock.api.mockito.internal.mockcreation.DefaultMockCreator.mock(DefaultMockCreator.java:40)
    	at org.powermock.api.mockito.PowerMockito.mockStatic(PowerMockito.java:62)
    	at com.alibaba.csp.sentinel.test.AbstractTimeBasedTest.<init>(AbstractTimeBasedTest.java:43)
    	at com.alibaba.csp.sentinel.slots.statistic.base.LeapArrayTest.<init>(LeapArrayTest.java:29)
    	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
    	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
    	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
    	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.createTestInstance(PowerMockJUnit44RunnerDelegateImpl.java:197)
    	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.createTest(PowerMockJUnit44RunnerDelegateImpl.java:182)
    	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:204)
    	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:160)
    	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:134)
    	at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
    	at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
    	at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:136)
    	at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:117)
    	at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:57)
    	at org.powermock.modules.junit4.PowerMockRunner.run(PowerMockRunner.java:59)
    	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
    	at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
    	at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
    	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
    	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
    	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
    Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make private static void java.lang.System.initPhase1() accessible: module java.base does not "opens java.lang" to unnamed module @2e5d6d97
    	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
    	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
    	at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
    	at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
    	at org.powermock.reflect.internal.WhiteboxImpl.doGetAllMethods(WhiteboxImpl.java:1499)
    	at org.powermock.reflect.internal.WhiteboxImpl.getAllMethods(WhiteboxImpl.java:1473)
    	at org.powermock.reflect.internal.WhiteboxImpl.getMethods(WhiteboxImpl.java:1741)
    	at org.powermock.reflect.internal.WhiteboxImpl.getMethods(WhiteboxImpl.java:1780)
    	at org.powermock.reflect.internal.WhiteboxImpl.getBestMethodCandidate(WhiteboxImpl.java:999)
    	at org.powermock.core.MockInvocation.findMethodToInvoke(MockInvocation.java:58)
    	at org.powermock.core.MockInvocation.init(MockInvocation.java:35)
    	at org.powermock.core.MockInvocation.<init>(MockInvocation.java:22)
    	at org.powermock.core.MockGateway.doMethodCall(MockGateway.java:155)
    	at org.powermock.core.MockGateway.methodCall(MockGateway.java:138)
    	at com.alibaba.csp.sentinel.util.TimeUtil.<init>(TimeUtil.java:99)
    	at com.alibaba.csp.sentinel.util.TimeUtil.<clinit>(TimeUtil.java:79)
    	... 42 more
    

    Tell us your environment

    JDK 17, Sentinel 2.0.0-SNAPSHOT

    good first issue area/test 
    opened by sczyh30 0
  • Sentinel GraalVM SPI 重复加载问题 | Duplicate SPI loading problem under GraalVM

    Sentinel GraalVM SPI 重复加载问题 | Duplicate SPI loading problem under GraalVM

    Issue Description

    Spring Boot使用 sentinel-core模块时,打包成native镜像 , spi被加载了2次

    How to reproduce it (as minimally and precisely as possible)

    1. 复现demo
    package com.demo;
    
    import com.alibaba.csp.sentinel.Entry;
    import com.alibaba.csp.sentinel.SphU;
    import com.alibaba.csp.sentinel.slots.block.BlockException;
    import com.alibaba.csp.sentinel.slots.block.RuleConstant;
    import com.alibaba.csp.sentinel.slots.block.flow.FlowRule;
    import com.alibaba.csp.sentinel.slots.block.flow.FlowRuleManager;
    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;
    
    import java.util.ArrayList;
    import java.util.List;
    
    @SpringBootApplication
    public class NativeDemoApp {
    
        private static final String RES_KEY = "test";
    
        public static void main(String[] args) {
            SpringApplication.run(NativeDemoApp.class, args);
            init();
            System.out.println("========== 开始执行测试方法 ==========");
            for (int i = 0; i < 3; i++) {
                String result = test(i);
                System.out.println(String.format("========== 第%s次执行结果: %s ==========", i + 1, result));
            }
        }
    
        public static void init() {
            System.out.println("========== 开始加载sentinel规则... ==========");
            List<FlowRule> rules = new ArrayList<FlowRule>();
            FlowRule rule1 = new FlowRule();
            rule1.setResource(RES_KEY);
            // Set max qps to 20
            rule1.setCount(1);
            rule1.setGrade(RuleConstant.FLOW_GRADE_QPS);
            rule1.setLimitApp("default");
            rules.add(rule1);
            FlowRuleManager.loadRules(rules);
            System.out.println("========== sentinel规则加载完成! ==========");
        }
    
    
        public static String test(int i) {
            Entry entry = null;
            try {
                entry = SphU.entry(RES_KEY);
            } catch (BlockException ex) {
                return "BlockException...";
            } finally {
                if (entry != null) {
                    entry.exit();
                }
            }
            return "调用成功!";
        }
    
    
    }
    
    

    Maven 相关配置

        <properties>
            <java.version>17</java.version>
            <sentinel.version>1.8.6</sentinel.version>
        </properties>
        <dependencies>
        
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
            </dependency>
            
            <dependency>
                <groupId>com.alibaba.csp</groupId>
                <artifactId>sentinel-core</artifactId>
                <version>${sentinel.version}</version>
            </dependency>
        
        
        </dependencies>
        
        <build>
            <plugins>
                <plugin>
                    <groupId>org.graalvm.buildtools</groupId>
                    <artifactId>native-maven-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <configuration>
                        <jvmArguments>
                            -agentlib:native-image-agent=config-merge-dir=src/main/resources/META-INF/native-image/
                        </jvmArguments>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    
    1. 执行mvn -Pnative spring-boot:run 来生成反射文件
    2. 执行 mvn -Pnative native:compile 生成native镜像
    3. 生成后执行对应的镜像可以看到以下错误
    **2023-01-03T19:11:36.354+08:00  INFO 20736 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
    2023-01-03T19:11:36.354+08:00  INFO 20736 --- [           main] com.demo.NativeDemoApp                   : Started NativeDemoApp in 0.124 seconds (process running for 0.129)
    ========== 开始加载sentinel规则... ==========
    INFO: Sentinel log output type is: file
    INFO: Sentinel log charset is: utf-8
    INFO: Sentinel log base directory is: C:\Users\ruanx\logs\csp\
    INFO: Sentinel log name use pid is: false
    INFO: Sentinel log level is: INFO
    ========== sentinel规则加载完成! ==========
    ========== 开始执行测试方法 ==========
    com.alibaba.csp.sentinel.spi.SpiLoaderException: [com.alibaba.csp.sentinel.init.InitFunc]Found repeat alias name for com.alibaba.csp.sentinel.metric.extension.MetricCallbackInit and com.alibaba.csp.sentinel.metric.extension.MetricCallbackInit,SPI configuration file=META-INF/services/com.alibaba.csp.sentinel.init.InitFunc
            at com.alibaba.csp.sentinel.spi.SpiLoader.fail(SpiLoader.java:525)
            at com.alibaba.csp.sentinel.spi.SpiLoader.load(SpiLoader.java:383)
            at com.alibaba.csp.sentinel.spi.SpiLoader.loadInstanceListSorted(SpiLoader.java:169)
            at com.alibaba.csp.sentinel.init.InitExecutor.doInit(InitExecutor.java:46)
            at com.alibaba.csp.sentinel.Env.<clinit>(Env.java:36)
            at com.alibaba.csp.sentinel.SphU.entry(SphU.java:85)
            at com.demo.NativeDemoApp.test(NativeDemoApp.java:63)
            at com.demo.NativeDemoApp.main(NativeDemoApp.java:40)
    Exception in thread "main" com.alibaba.csp.sentinel.spi.SpiLoaderException: [com.alibaba.csp.sentinel.slotchain.SlotChainBuilder]Found repeat alias name for com.alibaba.csp.sentinel.slots.DefaultSlotChainBuilder and com.alibaba.csp.sentinel.slots.DefaultSlotChainBuilder,SPI configuration file=META-INF/services/com.alibaba.csp.sentinel.slotchain.SlotChainBuilder
            at com.alibaba.csp.sentinel.spi.SpiLoader.fail(SpiLoader.java:525)
            at com.alibaba.csp.sentinel.spi.SpiLoader.load(SpiLoader.java:383)
            at com.alibaba.csp.sentinel.spi.SpiLoader.loadFirstInstanceOrDefault(SpiLoader.java:229)
            at com.alibaba.csp.sentinel.slotchain.SlotChainProvider.newSlotChain(SlotChainProvider.java:44)
            at com.alibaba.csp.sentinel.CtSph.lookProcessChain(CtSph.java:205)
            at com.alibaba.csp.sentinel.CtSph.entryWithPriority(CtSph.java:136)
            at com.alibaba.csp.sentinel.CtSph.entry(CtSph.java:176)
            at com.alibaba.csp.sentinel.CtSph.entry(CtSph.java:315)
            at com.alibaba.csp.sentinel.SphU.entry(SphU.java:85)
            at com.demo.NativeDemoApp.test(NativeDemoApp.java:63)
            at com.demo.NativeDemoApp.main(NativeDemoApp.java:40)**
    

    预期正确的执行结果:

    2023-01-03T19:17:15.920+08:00  INFO 21724 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
    2023-01-03T19:17:15.926+08:00  INFO 21724 --- [           main] com.demo.NativeDemoApp                   : Started NativeDemoApp in 1.057 seconds (process running for 1.52)
    ========== 开始加载sentinel规则... ==========
    ========== sentinel规则加载完成! ==========
    ========== 开始执行测试方法 ==========
    ========== 第1次执行结果: 调用成功! ==========
    ========== 第2次执行结果: BlockException... ==========
    ========== 第3次执行结果: BlockException... ==========
    

    Tell us your environment

    Windows 11 , JDK17 , Spring Boot 3.0

    Anything else we need to know?

    是由于mvn -Pnative spring-boot:run 这一步在reflect-config.json文件会添加以下配置

    // 这里省略其他相关配置
    {
      "name":"com.alibaba.csp.sentinel.slots.DefaultSlotChainBuilder",
      "methods":[{"name":"<init>","parameterTypes":[] }]
    }
    

    从而导致SPI被加载了2次

    如果省略 mvn -Pnative spring-boot:run 这一步(reflect-config.json文件中不包含上面的反射配置) , 直接执行 mvn -Pnative native:compile 生成native镜像 , 则程序符合预期.

    目前想到的解决方案是修改SpiLoader.java line:399 的判断逻辑 , 对于重复的加载的类将错误改为警告

                        if (classMap.containsKey(aliasName)) {
                            Class<? extends S> existClass = classMap.get(aliasName);
                            fail("Found repeat alias name for " + clazz.getName() + " and "
                                    + existClass.getName() + ",SPI configuration file=" + fullFileName);
                        }
    
    help wanted area/spi 
    opened by ruansheng8 5
Releases(1.8.6)
  • 1.8.6(Oct 26, 2022)

    This release ships with a few enhancements and bug fixes.

    Furthermore, Sentinel OpenSergo data-source has been beta-available (com.alibaba.csp:sentinel-datasource-opensergo:0.1.0-beta), which enables developers to configure Sentinel rules with OpenSergo fault-tolerance CRD in a unified way (under Kubernetes, with OpenSergo control plane).

    Features / Enhancements

    • Add id field in Rule entity and record rule ID in block log (#2853)

    Bug Fixes

    • Fix Dubbo SPI path bug in Dubbo 3.x adapter (#2822)
    • Fix the bug that SpiLoader#closeResources may not record the exception when error occurs (#2890)

    Dashboard

    • Improve IP validation in SentinelApiClient and rule controllers

    Thanks for all contributors: @AlbumenJ, @hongpy, @icodening, @PepoRobert, @sczyh30, @ZhongJinHacker

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.8.6.jar(21.63 MB)
  • 1.8.5(Aug 9, 2022)

    Features / Enhancements

    • Add adapter for Apache Dubbo 3.x (#2789)
    • Auto-extract value from ParamFlowArgument when blocked in ParamFlowSlot (#2776)

    Dashboard

    • Refactor IP verify logic in MachineRegistryController to support JDK 17 (#2694)
    • Fix deprecated Spring config key in application.properties (#2713)

    Dependencies

    • Upgrade fastjson to 1.2.83_noneautotype

    Thanks for all contributors: @AlbumenJ, @benyamin2014, @icodening, @jgzl, @sczyh30, @zuohl

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.8.5.jar(21.63 MB)
    sentinel-envoy-rls-token-server-1.8.5.jar(12.34 MB)
  • 1.8.4(Apr 12, 2022)

    Features / Enhancements

    • Add interceptor SPI for transport command handler (#2587)
    • Add log level configuration support for common logs (#2514)
    • Improve AuthorityRuleManager: replace the rule map instead of clear-then-insert when updating rules (#2655)

    Bug Fixes

    • Fix param args missing bug in fireExit of StatisticSlot (#2523)
    • Fix maxQueueingTimeoutMs checking logic in GatewayRuleManager#isValidRule (#2609)
    • Fix DynamicSentinelProperty synchronized listener set iterator race-condition problem (#2519)
    • Use CopyOnWriteArraySet for cluster ConnectionGroup#connectionSet to avoid iterator fast-fail (#2559)

    Integrations

    • Add support for customizing ConfigurableRequestItemParser for Spring Cloud Gateway and Zuul adapter (#2542)
    • Use unified entrance context name by default in Spring WebFlux adapter (#2610)

    Dashboard

    • Fix incorrect alert message for intervalMs validation in circuit breaker rule dialog (#2483)
    • Fix the bug that removing token servers may fail when there are multiple servers with the same IP (#2591)

    Dependencies

    • Update Spring Boot starter to 2.5.12 for Sentinel dashboard
    • Upgrade nacos-client to 1.4.2 for sentinel-datasource-nacos

    Thanks for all contributors: @brotherlu-xcq, @code-ferry, @DollarB, @howiekang, @icodening, @Reagan1947, @Roger3581321, @sczyh30, @tain198127, @zhaoxinhu, @zhuyou1234

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.8.4.jar(21.61 MB)
  • 1.8.3(Dec 31, 2021)

    Features / Enhancements

    • Add support for Envoy RLS v3 API in sentinel-cluster-server-envoy-rls token server module (#2336)
    • Add metric exporter extension for exporting Sentinel metrics via JMX (#2275)

    Bug Fixes

    • Fix inbound QPS mode of system rule: use passQps instead of completeQps and support batchCount (#2455)
    • Fix the bug that legacy API matchers in ScGatewayApiMatcherManager were not removed after the API group has been removed (#2436)

    Integrations

    • Add ACL token support for Consul data-source (#2307)

    Dashboard

    • Fix dashboard logo problem when customizing the context-path of the backend (#2253)
    • Add IP validation in API of MachineRegistryController

    Thanks for all contributors: @brotherlu-xcq, @chenzhiguo, @sczyh30, @shaohsiung, @su787910081, @winjaychan, @wucheng1997, @xiaojun207, @xianwdong

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.8.3.jar(20.36 MB)
  • 1.8.2(Jul 6, 2021)

    Features / Enhancements

    • Improve performance of TimeUtil adaptively in different load conditions (#1746)
    • Support private-level blockHandler/fallback method for @SentinelResource annotation (#2163)
    • Add sentinel-transport-spring-mvc module (Spring Web as command center) (#1957)
    • Support Redis cluster mode in Redis data-source extension (#1751)
    • Support config from system env in SentinelConfig and polish TransportConfig in transport-common module (#2154)
    • Make all backend thread pools daemon (#2181)

    Dashboard

    • Improve support for customizing auth-related implementations (#2059)

    Dependencies

    • Upgrade Netty to 4.1.48.Final in sentinel-cluster modules

    Thanks for all contributors: @Amitbhave, @Anilople, @brotherlu-xcq, @cdfive, @drgnchan, @goodjava, @gvma, @huakai-zhang, @jasonjoo2010, @jiajiangnan, @JJFly-JOJO, @JerryChin, @liqiangz, @quaff, @Roger3581321, @ShubhamPalriwala, @Slideee, @SparkLee, @sczyh30, @shenbaoyong, @ss-superman, @VegetaPn, @wutingjia, @wuwen5, @zhangyunan1994

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.8.2.jar(20.36 MB)
  • 1.8.1(Feb 4, 2021)

    NOTE: Since 1.8.1, Sentinel requires JDK 1.8 or higher version.

    Features / Enhancements

    • Refactor SpiLoader and enhance SPI mechanism (#1383)
    • Add basic cluster concurrency limiting implementation in token server module (#1631)
    • Add Motan RPC adapter implementation (#1825)
    • Improve default block fallback logic in Dubbo 2.6.x adapter to avoid serialization problem (#1794)
    • Support setting flush interval of the metric log via SentinelConfig property (#1919)
    • Support both HTTP and HTTPS protocol in transport heartbeat module (#1896)
    • Make token client NettyTransportClient.getCurrentId() thread safe (#1707)

    Bug fixes

    • Fix NPE bug when updating gateway flow rules and param flow rules before the route/API has been requested once (#1729, #1901)
    • Fix the bug that getServletPath() may return empty when matching URL in Zuul 1.x adapter (#1605)
    • Fix the problem that requests will never be blocked when slowRatioThreshold = 100% (#1779)

    Dashboard

    • Add statIntervalMs field in DegradeRule dialog (#1781)
    • Add support for matching path pattern like /xx/** in authFilterExcludeUrls (#1971)
    • Fix issue of memory leak in real-time monitoring page (#1905)
    • Improve MetricFetcher under concurrent conditions (#1918)

    Dependencies

    • Upgrade fastjson to 1.2.75
    • Upgrade snakeyaml to 1.26 in sentinel-cluster-server-envoy-rls module

    Thanks for all contributors: @brothelul, @cdfive, @dani3lWong, @evasnowind, @HelloCoCooo, @jasonjoo2010, @JiangZian, @JieGz, @John-Chan, @liuming-dev, @mikawudi, @nickChenyx, @odidev, @polarbear567, @PeineLiang, @samuelxw, @sczyh30, @vipweihua, @wzg923, @xierunzi, @xierunzi, @xuande, @yunfeiyanggzq, @zcai2, @zhangkai253, @zhangxn8, @zhouyongshen

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.8.1.jar(20.25 MB)
  • v1.8.0(Aug 21, 2020)

    This nouveau release ships with countless features and improvements, specifically for circuit breaking. We've made progress on refactoring and improving circuit breaking feature, including arbitrary statistic duration support, half-open recovery, enhanced slow request ratio strategy, state change observer and more. We've also brought various versatile integrations including Java EE (JAX-RS and CDI), Quarkus and HTTP client (Apache HttpClient and OkHttp), which could cover more developers.

    Features / Enhancements

    • Refactor degrade hierarchy with new circuit breaker mechanism and improve strategy (support arbitrary statistic duration, support half-open recovery, add slow request ratio strategy) (#1490, #1645)
    • Support setting project.name via the properties file and deprecate legacy config path (#1412, #1437)
    • Refactor the mechanism of recording exception (on completed) and polish Tracer (#1420)
    • Support setting class-level defaultFallback for annotation extension (#1493)
    • Add JAX-RS integration module (#1396)
    • Add annotation extension for Java EE CDI (#1541)
    • Add Sentinel annotation and JAX-RS plugins for Quarkus (#1542)
    • Add Apache HttpClient integration module (#1455)
    • Add OkHttp integration module (#1456)
    • Add Eureka data-source extension (#1502)
    • Add exceptionPredicate in Tracer for customized exception filtering logic (#1496)
    • Improve purge mechanism for deprecated ParameterMetric (#1372)
    • Support customized origin parser in Dubbo 2.6.x/2.7.x adapter and polish config mechanism (#1555, #1572, #1617)
    • Add support for extracting parameter value from complex object (#1491)
    • Add extended interface for metric extension hook to support distinguishing traffic type (#1665)
    • Improve default fallback for Apache Dubbo 2.7.x adapter (#1680)
    • Add per-Entry exit handler (whenTerminate) support (#1645)
    • Optimize the order of slots in ProcessorSlot SPI config (#1649)

    Bug fixes

    • Fix sentinel-apache-dubbo-adapter full GC bug (#1431)
    • Fix the bug that may cause ErrorEntryFreeException when forwarding requests in sentinel-spring-webmvc-adapter (#1533, #1681)
    • Fix the bug of extracting request cookie in Spring Cloud Gateway adapter (#1400)
    • Fix the bug of misplaced locks in ContextUtil and ClusterNode (#1429)

    Dashboard

    • Refactor degrade frontend/controller and adapt to new circuit breaking features
    • Fix the bug that cookie may have conflict with web applications under the same domain (#1443)
    • Fix historical version compatibility problem for auth checking via localStorage (#1473)

    Dependencies

    • Upgrade fastjson to 1.2.71, nacos-client to 1.3.0 (in sentinel-datasource-nacos module)

    Thanks for all contributors: @Billzaifei, @cdfive, @chenzhiguo, @CodingSinger, @DogBaoBao, @jasonjoo2010, @J-Cod3r, @JiangZian, @John-Chan, @joooohnli, @linlinisme, @liqiangz, @pleasecheckhere2016, @PeineLiang, @RGaius, @sczyh30, @seasidesky, @wavesZh, @xiby, @Yanghf123, @yunfeiyanggzq, @zhaoyuguang, @zhenxianyimeng

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.8.0.jar(20.25 MB)
  • 1.7.2(Apr 8, 2020)

    In this version, we've brought breaking changes about the slot SPI mechanism. The slot chain builder SPI has been deprecated (legacy classes were reserved for compatibility). Now Sentinel will take ProcessorSlot itself as SPI. Note that the slot might be stateful, so Sentinel will still build different new slot chains for each resource.

    Furthermore, a new Logger SPI mechanism is introduced for flexible logging extension. The default RecordLog implementation is still based on java.util.logging, and developers could introduce dependencies of logging integration module to adapt to existing logging libraries (e.g. slf4j). See here for more details.

    Features / Enhancements

    • Add SOFARPC adapter module (#1307)
    • Add Zuul 2.x gateway adapter module (#1138)
    • Refactor: Make ProcessorSlot itself as SPI and deprecate legacy slot chain builder (#411)
    • Add new Logger SPI to support flexible logging extension mechanism and add general JUL adapter for Logger SPI (#1307, #1338)
    • Polish placeholders in logging content to slf4j convention (#1342)
    • Add slf4j logging extension (#1344)
    • Add "web-context-unify" config in Spring WebMVC adapter to support "chain" relation flow strategy (#1328)
    • Improve Dubbo 2.7.5 compatibility problem in sentinel-apache-dubbo-adapter (#1296)
    • Force modifyRule command handler to fail if an incompatible old fastjson found (#1377)
    • Calculate both process and system CPU usage to support single process running in container environment (#1204)
    • Improve the logs when the heartbeat response indicates failure (#1303)

    Bug fixes

    • Fix NPE bug in Tracer when context size exceeds the limit (#1293)
    • Fix the parsing issue in large post request for sentinel-transport-simple-http (#1255)
    • Fix the bug that context was not released when blocked in Spring Web adapter (#1353)
    • Fix timezone problem of sentinel-block.log
    • Fix incorrect name resolving cache issue in sentinel-transport-simple-http (resolved in #926 more details in #1583)

    Dashboard

    • Improve the compatibility on the Content-Type header of POST request (#1260)
    • Enhance reliability and performance of InMemoryMetricsRepository (#1319)
    • Support setting value pattern for client IP and host in gateway flow rule dialog (#1325)
    • Hide advanced options in flow rule dialog when cluster mode is selected (#1367)
    • Fix NoNodeException problem of FlowRuleZookeeperProvider sample (#1352)

    Thanks for the contributors: @cdfive, @echooymxq, @jasonjoo2010, @jy2156121, @linlinisme, @mantuliu, @olof-nord, @sczyh30, @tianhaowhu, @wavesZh, @WongTheo, @xue8, @zhaoyuguang

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.7.2.jar(20.24 MB)
    sentinel-envoy-rls-token-server-1.7.2.jar(12.13 MB)
  • 1.7.1(Dec 25, 2019)

    Features / Enhancements

    • Add Sentinel Spring Web MVC adapter module (#1104)
    • Improve async invocation support for Dubbo 2.7.2+ in sentinel-apache-dubbo-adapter (#1124)
    • Support configuration for the heartbeat API path in transport module (#515)
    • Refactor: Get the max allowed RT directly from SentinelConfig.statisticMaxRt() to avoid implicit dependency chain (#1173)
    • Support setting config file path via system environment and improve error handling in SentinelConfigLoader

    Bug fixes

    • Fix the incorrect logic of handling the end separator of the log directory in LogBase (#1172)
    • Fix Content-Type matching bug in sentinel-transport-simple-http module (#1207)
    • Fix the incorrect logic of getting maxSuccessQps in StatisticNode (#1196)

    Dashboard

    • Improve the ACL checking mechanism and add @AuthAction annotation support (#1042)
    • Change the charset of UrlEncodedFormEntity to UTF-8 in SentinelApiClient to support non-ASCII characters (#1207)

    Thanks for the contributors: @agensi, @CodingSinger, @fangwentong, @hongjiev, @kaizi2009, @lkxiaolou, @nick-tan, @zhaoyuguang, @zhenxianyimeng

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.7.1.jar(20.22 MB)
    sentinel-envoy-rls-token-server-1.7.1.jar(12.09 MB)
  • 1.7.0(Nov 12, 2019)

    In this version, Sentinel provides an Envoy Global RLS implementation using Sentinel token server, so that Envoy service mesh could leverage the distributed flow control capability of Sentinel. See here for details.

    Since 1.7.0, Sentinel supports configuration via arbitrary properties files. We could set the path of the properties file with the -Dcsp.sentinel.config.file property item. See here for more details.

    Features / Enhancements

    • Add Sentinel Envoy RLS token server implementation (#1139)
    • Support arbitrary configuration properties file path for Sentinel (#804)
    • Improve the SPI ClassLoader mechanism to handle more complex scenarios (#1088)
    • Add support for resource classification and polish adapters (#1142)
    • Support customized block page HTTP status in sentinel-web-servlet-adapter (#1112)
    • Make rtSlowRequestAmount and minRequestAmount in DegradeRule configurable (#789)
    • Make maxParamByteSize configurable in ParamFlowRequestDataWriter of cluster client module and fix bugs (#823)
    • Improve Node and Metric interface to support conditional metric retrieval (#1115)
    • Support adding prefix to Dubbo service resource name in Sentinel Dubbo Adapter (#859)
    • Improve annotation aspect to support throwing original exception in fallback and blockHandler (#986)
    • Add Etcd DataSource extension (#1018)
    • Add Consul DataSource integration module (#979)
    • Add Spring Cloud Config data source extension (#899)
    • Improve the checking logic of SystemRule and enhance SystemRuleManager (#1050)
    • Support registering writable data-source for GatewayFlowRule and customized ApiDefinition (#1057)
    • Add init parameter to support unifying web context name in Sentinel Web CommonFilter (#1111)
    • Support URL exclusion using UrlCleaner in Spring WebFlux adapter (#1049)
    • Reuse connections of the same address in ZooKeeper data-source (#788)
    • Dependency update: fastjson to 1.2.62, nacos-client to 1.1.4, apollo-client to 1.5.0

    Bug fixes

    • Fix the bug that resource name displayed in ClusterNode-related command APIs for SphU.entry(method) is incorrect (#1078)
    • Fix hookOnCancel handing logic in SentinelReactorSubscriber (#1089)
    • Fix the bug of getting the wrong current flow QPS in ClusterFlowChecker (#972)
    • Fix the numeric overflow bug of ping response data in the cluster module (#844)
    • Fix the bug of wrong RT and exception tracing in sentinel-grpc-adapter (#291 and #995)
    • Fix the bug that the Zuul adapter does not exit the entry with parameters (#1148)

    Dashboard

    • Add version info in the left top of dashboard (#1015)
    • Support configuration for disabling login (#1004)

    Thanks for the contributors: @aq0706, @ballenwen, @cat-coco, @chenledong, @CodingSinger, @complone, @cookiejoo, @fangjian0423, @HaojunRen, @huangxfchn, @lhl4546, @linlinisme, @lkxiaolou, @wangybgit, @wavesZh, @ycx627954927, @zhangyide, @zhaoyuguang, @0704681032

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.7.0.jar(20.21 MB)
    sentinel-envoy-rls-token-server-1.7.0.jar(12.09 MB)
  • 1.6.3(Jul 30, 2019)

    This version provides entire support for managing API gateway flow rules and customized API groups in Sentinel dashboard.

    Features / Enhancements

    • Add support for managing gateway flow rules and customized API group in Sentinel dashboard (#869)
    • Add support for excluding some URLs in Web Servlet CommonFilter (#914)
    • Add Ordered interface support for Spring Cloud Gateway filter (#937)
    • Support displaying SystemRule of CPU usage strategy in the dashboard (#927)
    • Use the unified context name in Web Servlet filter (#944)

    Bug fixes

    • Fix the empty value matching problem in GatewayParamParser (#937)

    Thanks for the contributors: @cdfive, @Crazy10552, @jasonjoo2010, @linlinisme, @lym-ifae

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.6.3.jar(20.14 MB)
  • 1.6.2(Jun 19, 2019)

    Features / Enhancements

    • Add support for request item pattern matching in API gateway flow control (#842)
    • Support parsing cookie as request items in API gateway flow control (#814)
    • Add support for logging into console for common logs (#836)

    Bug fixes

    • Fix the parsing bug for command name that contains multiple slash in sentinel-transport-netty-http module (#817)
    • Fix the bug that numeric overflow might occur when refilling tokens in ParamFlowChecker (#838)

    Dashboard

    • Improve the edit dialog for FlowRule and ParamFlowRule (#845)
    • Update frontend dependencies in package.json to fix vulnerabilities
    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.6.2.jar(20.06 MB)
  • 1.6.1(May 23, 2019)

    Features / Enhancements

    • Refactor API gateway common module to separate converted rules from other rule managers (#758)
    • Separate parameter metric storage from ParamFlowSlot and improve ParamFlowRuleUtil
    • Refactor FlowRuleChecker to improve code reuse
    • Add SPI extension for Sentinel internal statistics (#730)
    • Add exceptionsToTrace and exceptionsToIgnore support in Tracer (#766)
    • Make SentinelConfig.loadProps() thread-safe using CopyOnWriteArraySet (#706)
    • Add CPU usage and system load to metric collecting command API (#749)
    • Add getCpuUsageThreshold() method in SystemRuleManager (#770)

    Bug fixes

    • Fix the bug that parameters are not carried when exiting entries in SentinelReactorSubscriber
    • Fix the bug that Chinese characters are malformed in response body of ZuulBlockFallbackProvider (#737)

    Dashboard

    • Add ZooKeeper flow rule dynamic publisher sample (#714)

    Thanks for the contributors: @haofangyuan, @jasonjoo2010, @kexianjun, @threedr3am, @yikangfeng, @yinjihuan

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.6.1.jar(20.29 MB)
  • 1.6.0(Apr 25, 2019)

    Breaking Changes

    In 1.6.0, we refactored the statistic and flow control algorithm of parameter flow control. The old mechanism (LRU map + sliding window for the parameter) has been replaced by an algorithm like token bucket. Now parameter flow rule supports setting statistic interval (intervalSec), burst count (burst), traffic shaping mode (controlBehavior, currently supports default mode and throttling mode).

    We've refactored and improved fallback support for @SentinelResource annotation to make it more understandable and common. See the document for more information.

    Since 1.6.0, all API gateway adapter will be based on the sentinel-api-gateway-adapter-common module. There are some changes for Sentinel Zuul Adapter. In previous versions, the adapter will mark all serviceId and API path as resources. Since 1.6.0, the adapter will regard all route ID (aka. proxy) and customized API groups (defined in API gateway common module) as resources.

    Features / Enhancements

    • Refactor rule, statistic and flow checking implementation for parameter flow control and support throttling traffic shaping mode (#677)
    • Add sentinel-api-gateway-adapter-common module for universal gateway rule and API definition management
    • Add Sentinel Spring Cloud Gateway adapter module and implementation (#695)
    • Refactor and improve Sentinel Zuul Adapter (#698)
    • Refactor and improve fallback support for @SentinelResource annotation (#693)
    • Support passing acquireCount and parameters to entry via SentinelReactorSubscriber in Sentinel Reactor Adapter (#630)
    • Support parsing HTTP POST request in sentinel-transport-netty-http and sentinel-transport-simple-http (#620)
    • Add FileInJarReadableDataSource to support reading config file in jar (#646)
    • Add @SpiOrder annotation and improve SPI loader to support loading SPI with highest precedence
    • Make CommandCenterProvider and HeartBeatSenderProvider choose the instance with highest precedence by default (#675)
    • Add exceptionsToIgnore configuration support in @SentinelResource annotation (#683)
    • Add appType property field in SentinelConfig (#696)

    Bug fixes

    • Fix the NPE bug when passing null args to SphU.entry() and paramIdx is negative (#642)

    Dashboard

    • Add a simple login page to support basic auth in Sentinel dashboard (#659)
    • Refinement and support HTTP POST request for update operations in SentinelApiClient (#620)
    • Fix CountDownLatch wait timeout in MetricFetcher when machine is dead (#645)

    Thanks for the contributors: @cdfive, @dqing0, @jasonjoo2010, @luoxn28, @paulkennethkent, @shxz130, @yikangfeng, @zhaixiaoxiang

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.6.0.jar(20.28 MB)
  • 1.5.1(Mar 27, 2019)

    This version provides some bug fixes and enhancements.

    Features / Enhancements

    • Add exceptionsToTrace configuration support in @SentinelResource annotation (#543)
    • Enhancements for handling Error in InitExecutor and LogBase (#613)
    • Improve ZookeeperDataSource to deal with bad connection when initializing (#597)
    • Add compatible adapter module sentinel-apache-dubbo-adapter for Apache Dubbo 2.7.x and above (#619)
    • Apply Alibaba p3c pmd plugin/rules and fix/ignore all violations of priority 1 (#574)
    • Improve field naming in ApolloDataSource (#593)

    Bug fixes

    • Fix deadlock bug in Env static initialization (#610)
    • Fix bug of exiting entry with parameters in SentinelResourceAspect

    Thanks for the contributors: @blindpirate, @beston123, @cdfive, @lawrencewu, @zhousiliang163

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.5.1.jar(20.24 MB)
  • 1.5.0(Mar 14, 2019)

    Breaking Changes

    Since 1.5.0, the minimum JDK version has been updated to 1.7. JDK 1.6 is no longer supported.

    There are some changes in Node interface: the return type of xxxQps methods (e.g. passQps, blockQps) has been changed from long to double to be more accurate.

    In 1.5.0 we added common occupy mechanism in LeapArray so that Sentinel can occupy future buckets of the sliding window to support "final pass for prioritized requests when QPS exceeds the threshold". The Sph.entryWithPriority(xxx) method will take effect now in local flow control mode.

    Features / Enhancements

    • Update minimum JDK version to 1.7 (for all modules)
    • Refactor Node interface: change return type of QPS get method to double (#564)
    • Add occupy mechanism for future buckets of sliding window to support "prioritized requests" (#568)
    • Add occupiable LeapArray support and code refactor/rearrangement
    • Add Sentinel Reactor module to support reactive integration (#545)
    • Add adapter module and implementation for Spring WebFlux (#556)
    • Add try-with-resources support for Entry class (#550)
    • Add an ApiCommandHandler to list all available commands and description (#491)
    • Add CPU usage checking support in system protection rule (#484)
    • Add a CommandCenterProvider to resolve and cache the CommandCenter instance (#409)
    • Automatically de-duplicate rules when loading rules (#571)
    • Support recording total inbound traffic data in metric file (#555)
    • Support passing args in Sph.entryWithPriority(xxx)
    • Allow negative paramIndex as reversed-order index in ParamFlowRule (#549)
    • Add AuthInfo parameter in the constructor of ZooKeeperDataSource to support ACL (#508)
    • Carry appName in FetchClusterServerInfo command
    • Optimize circuit breaking state transformation using CAS in DegradeRule (#538)
    • Improve sleeping-based tests to be more stable and optimize slow tests (#546)
    • Change default value of avgUsedTokens to zero to be more meaningful in DefaultController (#460)
    • Update fastjson dependency version to 1.2.56 (for sentinel-datasource-extension)
    • Update apollo-client version to 1.3.0 and add support for removing listener in sentinel-datasource-apollo (#562)

    Bug fixes

    • Fix SimpleDateFormat concurrent issue in CspFormatter of sentinel-core (#548)
    • Fix Dubbo-related dependencies in sentinel-dubbo-demo (#534)

    Dashboard

    • Support automatic/manual removal of unhealthy machines and disconnected applications in dashboard (#168)
    • Add basic interface for authentication and authorization in Sentinel dashboard (#503)
    • Improve management for foreign-app stand-alone token server in cluster page
    • Remove G2 lib tracking in frontend of Sentinel dashboard (#527)
    • Fix concurrent error in InMemoryMetricsRepository of the dashboard (#488)
    • Add Apollo flow rule publisher sample in Sentinel dashboard (#535)

    Thanks for the contributors: @all4you, @ATAXGT, @cdfive, @HaojunRen, @hantianwei, @jasonjoo2010, @MickMo, @mjaow, @nick-tan, @xburning, @yikangfeng, @yklove

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.5.0.jar(20.24 MB)
  • 1.4.2(Feb 20, 2019)

    Features / Enhancements

    • Add Zuul 1.x adapter module for Sentinel (#188, @tigerMoon)
    • Add catch throwable logic in ClusterStateManager to detect fatal error when loading SPI
    • Add back thread count metric type support for parameter flow control
    • Carry the triggered rule in subclasses of BlockException (#469)
    • Support tracing exception count for specific entry or context in Tracer
    • Add volatile in double-checked locking field in ClusterBuilderSlot (@mjaow)
    • Improve ClusterServerConfigManager in sentinel-cluster-server-default and add basic test cases
    • Remove slf4j dependency in sentinel-annotation-aspectj module
    • Improve and fix bugs for ConnectionManager and add test cases
    • Update Nacos SDK version to 0.8 in Nacos data-source extension module and update Nacos namespace demo (#474, @yanlinly)
    • HashMap init optimize when adding new ClusterNode to cluster node map (#465, @luoxn28)
    • Make build faster by reducing fixed waiting time in tests (#449, @aalmiray)
    • Add some unit test for StatisticNode, ClusterNode and DefaultNodeBuilder class (#423, @cdfive)
    • Update dependency version of fastjson and jacoco-maven-plugin

    Bug fixes

    • Fix negative waitTime bug in RateLimiterController (fixes #420)
    • Fix zero-count divide overflow bug in RateLimiterController (#461, @mjaow)
    • Fix error value type and rename variable in EntranceNode class (#457, @mjaow)
    • Fix NPE bug when creating connection group in ConnectionManager of token server (#467)
    • Fix NPE bug when adding event count concurrently for different parameter values in ParamMapBucket (#494)
    • Fix bug of calculating param size and amount in ParamFlowRequestDataWriter of Sentinel cluster (#495)

    Dashboard

    • Rename dashboard package name from com.taobao.* to com.alibaba.* (#435)
    • Make fallbackToLocalWhenFail of cluster rule configurable in Sentinel dashboard (#370, @cdfive)
    • Fix data model problem in edit dialog of Sentinel dashboard (#370, @cdfive)
    • Add healthyMachineCount and totalCount information in sidebar of Sentinel dashboard (#376, @jz0630)
    • Change text of p_qps and b_qps to be more intuitive in monitoring page (#398, @Arlmls)
    • When clicking the first-level menu of sidebar, don't jump to the home page (#422, @cdfive)

    Thanks for the contributors: @aalmiray, @all4you, @Arlmls, @cdfive, @jz0630, @kangyl, @kexianjun, @Leishunyu, @luoxn28, @mjaow, @pig4cloud, @tigerMoon, @wangjunwei87, @yanlinly

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.4.2.jar(20.20 MB)
  • 1.4.1(Jan 4, 2019)

    This is a milestone version that provides enhancements for cluster flow control.

    Features / Enhancements

    • Improve Sentinel dashboard for cluster flow control management (#384)
    • Support multiple tokens per request entry (#380)
    • Improve retry and stop control logic in cluster token client
    • Improve cluster state manager to modify cluster mode more flexible
    • Enhance config and log for cluster token client
    • Improve namespace register logic for embedded cluster token server mode
    • Add cluster embedded mode handling logic for parameter flow checker
    • Add basic monitoring command API for cluster token server
    • Upgrade nacos-client version and construct NacosDataSource by Properties (#348, @fangjian0423)
    • Make the default statistic max RT value TIME_DROP_VALVE configurable (#292, @cdfive)
    • Rearrange the constructor of LeapArray to match with interval and sampleCount property
    • Refinement for heartbeat logic in sentinel-transport related module
    • Polish cluster flow control demo to be more instructive
    • Add some unit test for sentinel-transport-netty-http module (#321, @cdfive)

    Bug fixes

    • Fix bug in search logic of metric files (#331)
    • Fix wrong empty check in FlowRuleApiPublisher of Sentinel dashboard (#353, @foreveryang321)

    Thanks for the contributors: @allencloud, @canglang1973, @cdfive, @fangjian0423, @foreveryang321, @jz0630, @YoungHu

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.4.1.jar(20.19 MB)
  • 1.4.0(Dec 14, 2018)

    This is a significant milestone version that provides cluster flow control feature.

    Note: The cluster flow control module requires JDK 1.7 or later versions.

    Features / Enhancements

    • Add cluster flow control interface and default implementation (#257, #294)
      • Add basic token client and server interface in Sentinel Core
      • Add cluster common module for common interface, entity and registry
      • Add cluster client module for default token client implementation (using Netty as transport library)
      • Add cluster server module for default token server implementation
      • Add basic cluster config and rule management mechanism
      • Support flexible transformation of cluster mode (between client and embedded server)
      • Add basic support for cluster mode in Sentinel dashboard (#302)
    • Add prioritized entry support in ProcessorSlot and SphU (#255)
    • Add "warmup with rate limiting" implementation for traffic shaping (#220)
    • Add HTTP-method level flow control support in Sentinel Web Servlet Filter (#282, @ro9er)
    • Add client ip property in transport common module to resolve ip problem in Docker env (#261, @nick-tan)
    • Optimize the click sensitivity of dashboard's sidebar menu (#268, @cdfive)
    • Extract annotation support base class for customized AOP extensions (#223, #214, @bitonly)
    • Extract flow rule checker from FlowRule (#234)
    • Improve log info and condition about fetching metrics in Sentinel dashboard (#219, @xcaspar)

    Bug fixes

    • Fix padding issue of charts in monitoring page of Sentinel dashboard (fixes #251, @cdfive)
    • Support parameters in entry of Sentinel annotation support to enable parameter flow control
    • Support automatic exception tracing in Sentinel annotation support

    Thanks for the contributors: @bitonly, @canglang1973, @cdfive, @nick-tan, @ro9er, @xcaspar

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.4.0.jar(20.14 MB)
  • 1.3.0(Oct 30, 2018)

    This is a production-ready GA version including enhancements for Sentinel dashboard and some other enhancements / bug fixes.

    Features / Enhancements

    • Add support for configuring authority rules and parameter rules in Sentinel Dashboard (#176, #189)
    • Add support for degrading by exception count per minute (#174)
    • @SentinelResource annotation supports method name as default resource name (#187)
    • Enhance rule checking in rule managers and Sentinel Dashboard (#202)
    • Support config the log base directory via system property
    • Support config whether the log name contains pid
    • Support to retry when port specified has been used in sentinel-transport-netty-http (#161, @jasonjoo2010)
    • LogBase support variable arguments (#161, @jasonjoo2010)

    Bug fixes

    • Fix bug for wrong coordinate scaling of QPS chart (passed/blocked) in monitoring page of Sentinel Dashboard (fixes #22, @jasonjoo2010)
    • Fix bug for wrong log file name checking and performance problem (fixes #181)
    • Fix bug for body reading in HttpServerHandler of sentinel-transport-netty-http (fixes #184, @jasonjoo2010)
    • Fix bug for ConcurrentModificationException when getting machine map in AppInfo of Sentinel Dashboard (fixes #201)

    Thanks for the contributors: @jasonjoo2010, @shannon312, @waveng

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard-1.3.0-en.jar(20.05 MB)
    sentinel-dashboard-1.3.0.jar(19.48 MB)
  • 0.2.0(Sep 27, 2018)

    This is a milestone version providing new cool features like asynchronous invocation support and flow control by frequent (hot spot) parameters.

    Note: this is the last milestone version that supports JDK 1.6. Since next milestone version, the minimum JDK version will be 1.7.

    Features

    • Add support for asynchronous invocation entry (#146)
    • Flow control by frequent (hot spot) parameters (#156)
    • Support extensible slot chain builder using SPI mechanism (#145)
    • Add callback registry for statistic slot for extensions
    • Add Redis data source extension (#102, @tigerMoon)
    • Add MetricsRepository interface and reuse original in-memory implementation for Sentinel Dashboard (#126)
    • Access control for white-list / black-list (AuthorityRule)
    • Add RequestOriginParser for Sentinel Web Servlet Integration to support extracting request origin

    Enhancements

    • Refactor data source hierarchy: spilt into readable and writable data source (#124)
    • Support JDK-based proxy in Sentinel annotation support (#111)
    • Enhance exception tracing in Sentinel Dubbo Adapter
    • Enhance FileRefreshableDataSource (check file modified) and support FileWritableDataSource (#125, @yfh0918)
    • Refactor LeapArray to reuse code for current bucket
    • Enhance log and null check for rule managers
    • Add benchmark for Sentinel
    • Extract MetricsReader from MetricSearcher (#103, @refactormachine)

    Bug fixes

    • Fix bugs for Sentinel internal error when context count exceeds MAX_CONTEXT_NAME_SIZE (#152)
    • Fix bugs for degrade rule checking (fixes #109 and #128)
    • Fix bug for error file separator regex in Windows environment (fixes #52)
    • Fix bug for missing maxQueueingTimeMs in equals and hashCode method of FlowRule (fixes #99)
    • Fix bug for system rule page in Sentinel Dashboard (fixes #51)
    • Fix bug for automatic exit of default context when exiting the entry
    • Fix bug for probability of metric lose when collecting metrics
    • Fix bug for update logic of minRt in metric bucket

    Thanks for the contributors: @kimmking, @refactormachine, @talshalti, @tigerMoon, @yfh0918

    Source code(tar.gz)
    Source code(zip)
    sentinel-dashboard.jar(24.01 MB)
  • 0.1.1(Aug 9, 2018)

    Features

    • Add Nacos data source extension (#8)
    • Add ZooKeeper data source extension (#33, @guonanjun)
    • Add Sentinel annotation and AspectJ support (#43)
    • Add default fallback support for Dubbo adapter
    • Add Apollo data source extension (#46, @nobodyiam)

    Bug fixes

    • Enhance error handling when parsing bad dashboard addresses (fixes #38)
    • Fix bugs about runtime port and heartbeat sending logic (fixes #20)

    Enhancements

    • Optimize for statistic data structures (leap array)
    • Use named thread factory for clear identification (#10)
    • Refine degrade rule checking and default value of flow rule attributes

    Thanks for the contributors: @guonanjun, @manzhizhen, @nobodyiam, @xg1907

    Source code(tar.gz)
    Source code(zip)
Owner
Alibaba
Alibaba Open Source
Alibaba
ColocationSim: Simulate Colocation Datacenter in a Fine Granularity with Microservices and Interference Modeling

ColocationSim Introduction 将在线作业和离线作业混合部署在同一集群(简称混部,Colocation)提升数据中心资源利用率的主流方法,如何在保证在线作业性能的前提下最大化集群的资源利用率成为混部相关研究中最主要问题。混部作业调度算法从集群层面解决这一问题,是学术界、企业界的

null 93 Jan 4, 2023
Source Code for 'Pro Java Microservices with Quarkus and Kubernetes' by Nebrass Lamouchi

Apress Source Code This repository accompanies Pro Java Microservices with Quarkus and Kubernetes by Nebrass Lamouchi (Apress, 2021). Download the fil

Apress 24 Oct 31, 2022
Lightweight framework for building java microservices

Ja-micro Ja-micro is a lightweight Java framework for building microservices. Introduction Ja-micro is a framework that allows developers to easily de

Sixt 621 Aug 21, 2022
WSO2 Microservices Framework for Java (MSF4J)

Build status: WSO2 Microservices Framework for Java (MSF4J) WSO2 Microservices Framework for Java (MSF4J) is a lightweight high performance framework

WSO2 359 Dec 27, 2022
Microserver is a Java 8 native, zero configuration, standards based, battle hardened library to run Java Rest Microservices via a standard Java main class. Supporting pure Microservice or Micro-monolith styles.

Microserver is a Java 8 native, zero configuration, standards based, battle hardened library to run Java Rest Microservices via a standard Java main class. Supporting pure Microservice or Micro-monolith styles.

AOL 936 Dec 19, 2022
Sample application demonstrating an order fulfillment system decomposed into multiple independant components (e.g. microservices). Showing concrete implementation alternatives using e.g. Java, Spring Boot, Apache Kafka, Camunda, Zeebe, ...

Sample application demonstrating an order fulfillment system decomposed into multiple independant components (e.g. microservices). Showing concrete implementation alternatives using e.g. Java, Spring Boot, Apache Kafka, Camunda, Zeebe, ...

Bernd Ruecker 1.2k Dec 14, 2022
KBE Spring Boot Microservices

SFG Beer Works - Brewery Microservices This project has a services of microservices for deployment via Docker Compose and Kubernetes. You can access t

John Thompson 29 Nov 2, 2022
Takin is an Java-based, open-source system designed to measure online or test environmental performance test for full-links, Especially for microservices

Takin is an Java-based, open-source system designed to measure online environmental performance test for full-links, Especially for microservices. Through Takin, middlewares and applications can identify real online traffic and test traffic, ensure that they enter the right databases.

ShulieTech 1.2k Dec 21, 2022
Library which allows the use and rendering of Blockbench models and animations in a Minecraft server by using generated resource packs and armorstands

Hephaestus Engine Hephaestus Engine is a library which allows the visualization of block bench models and animations in a Minecraft server by the use

Unnamed Team 109 Dec 21, 2022
LINE 4.1k Jan 2, 2023
AWS Service registry for resilient mid-tier load balancing and failover.

Eureka Eureka is a REST (Representational State Transfer) based service that is primarily used in the AWS cloud for locating services for the purpose

Netflix, Inc. 11.6k Dec 30, 2022
Opinionated libraries for HTTP&JSON-based RPC using Retrofit, Feign, OkHttp as clients and Jetty/Jersey as servers

Conjure Java Runtime (formerly http-remoting) This repository provides an opinionated set of libraries for defining and creating RESTish/RPC servers a

Palantir Technologies 76 Dec 13, 2022
Govern Service is a lightweight, low-cost service registration, service discovery, and configuration service SDK.

Govern Service is a lightweight, low-cost service registration, service discovery, and configuration service SDK. By using Redis in the existing infrastructure (I believe you have already deployed Redis), it doesn’t need to bring extra to the operation and maintenance deployment. Cost and burden. With the high performance of Redis, Govern Service provides ultra-high TPS&QPS (10W+/s JMH Benchmark).

Ahoo Wang 61 Nov 22, 2022
CoSky is a lightweight, low-cost service registration, service discovery, and configuration service SDK.

High-performance, low-cost microservice governance platform. Service Discovery and Configuration Service

Ahoo Wang 61 Nov 22, 2022
Annotation/Reflection Based Bukkit Command API. Containing many features such as help-service, command providers, tab completion, and many more!

CommandAPI Annotation/Reflection Based Command API that just does what you want it to do without any problems. Importing Maven <repository> <id>

damt 1 Jun 13, 2022
Stetho is a debug bridge for Android applications, enabling the powerful Chrome Developer Tools and much more.

Stetho Stetho is a sophisticated debug bridge for Android applications. When enabled, developers have access to the Chrome Developer Tools feature nat

Meta 12.6k Jan 3, 2023
Sceneform React Native AR Component using ARCore and Google Filament as 3D engine. This the Sceneform Maintained Component for React Native

Discord Server Join us on Discord if you need a hand or just want to talk about Sceneform and AR. Features Remote and local assets Augmented Faces Clo

SceneView Open Community 42 Dec 17, 2022
Netflix, Inc. 23.1k Jan 5, 2023
🔥 强大的动态线程池,并附带监控报警功能(没有依赖中间件),完全遵循阿里巴巴编码规范。Powerful dynamic thread pool, does not rely on any middleware, with monitoring and alarm function.

?? 动态线程池(DTP)系统,包含 Server 端及 SpringBoot Client 端需引入的 Starter. 这个项目做什么? 动态线程池(Dynamic-ThreadPool),下面简称 DTP 系统 美团线程池文章 介绍中,因为业务对线程池参数没有合理配置,触发过几起生产事故,进而

longtai 3.4k Dec 30, 2022