Commit Graph

750 Commits

Author SHA1 Message Date
Lynx 7920243dec
dashboard: Add statIntervalMs field in DegradeRule dialog (#1781) 2020-11-23 13:45:56 +08:00
Brent 699532efe3
[feat #1839]: Make dashboard support deploying under subpath (#1851) 2020-11-23 10:48:44 +08:00
odidev 8c4f251922
CI: Polish dependencies for ARM64 and add ARM64 job to Travis CI (#1765)
1. Added ARM64 architecture in .travis.yml
2. Updated 'embedded-consul' version to 2.2.0, 'consul-api' version to 1.4.5 for ARM64 support.
3. Updated grpc.version for 'io.grpc:protoc-gen-grpc-java' to 1.30.2, for ARM64 support.

Signed-off-by: odidev <odidev@puresoftware.com>
2020-11-09 14:40:58 +08:00
Lynx 6f2f844726
Fix the problem that requests will never be blocked when slowRatioThreshold = 100% (#1779) 2020-11-05 20:35:09 +08:00
王振广 9936b4da60
Improve default block fallback logic in Dubbo 2.6.x adapter to avoid serialization problem (#1794)
- convert BlockException to a simple RuntimeException (with necessary message)
2020-10-30 22:15:24 +08:00
Jason Joo d510eb6cd3
test: Fix overrunning test `FlowRuleManagerTest.testLoadAndGetRules` (#1823)
Signed-off-by: Jason Joo <hblzxsj@163.com>
2020-10-29 14:22:36 +08:00
Weihua c00f946813 Fix potential concurrency issue when updating flow rules (#1783) 2020-10-09 09:54:02 +08:00
Luke 55a8294ab0
Polish document and name of parameter (#1738)
- doc: Fix a typo in description of booting options for sentinel-dashboard
- Fix mismatched name of parameter to its comment for VersionUtils.parseVersion()
2020-09-17 21:06:24 +08:00
nickChenyx cc2d1a69a9
Optimize logging statements using placeholder (#1736)
* Optimize logging statements using placeholder to avoid unnecessary concatenation (issue #1735)
2020-09-17 20:42:01 +08:00
HelloCoCooo 7192bcfb5b Fix the dependency conflict issue 2020-09-17 16:07:48 +08:00
Luke 398e5aa874
doc: Fix content in README.md of sentinel-dashboard (#1737) 2020-09-16 20:42:38 +08:00
yunfeiyanggzq 10e6e8dcf6 Add unit tests for cluster concurrent limiting checker
Signed-off-by: yunfeiyanggzq <yunfeiyang@buaa.edu.cn>
2020-09-16 11:42:59 +08:00
yunfeiyanggzq 6314caab80 Add basic cluster concurrency limiting impl in token server module
Signed-off-by: yunfeiyanggzq <yunfeiyang@buaa.edu.cn>
2020-09-16 11:41:18 +08:00
yunfeiyanggzq 473cc84262 Add concurrency token request/release operation in TokenService
Signed-off-by: yunfeiyanggzq <yunfeiyang@buaa.edu.cn>
2020-09-16 11:40:14 +08:00
yunfeiyanggzq 75f138821d Add attributes of cluster concurrency limiting in ClusterFlowConfig
Signed-off-by: yunfeiyanggzq <yunfeiyang@buaa.edu.cn>
2020-09-16 11:38:58 +08:00
cj 34fc435ce5
Make NettyTransportClient.getCurrentId() thread safe (#1707)
Fix issue #1705.

- Use CAS to make it thread safe and limited in the declared range.

Signed-off-by: cj <power4j@outlook.com>
2020-09-14 23:23:00 +08:00
dani3lWong b7b54034cc
Fix NPE bug when updating gateway flow rules before the route/API has been requested once (#1729) 2020-09-14 10:03:58 +08:00
M4Y b50ce662bd
Solve the URI fetching bug in sentinel-zuul-adapter #1109 (#1605)
Use `getRequestURI` instead of `getServletPath` to get URI of current request(Both in prefix and regex matching).
2020-09-14 01:46:07 +08:00
M4Y 10aa39f822
doc: Fix typo in code comments (#1721) 2020-09-10 22:59:45 +08:00
mikawudi d5eb5f473f
Pre-calculate intervalInSecond in LeapArray to reduce redundant calculation (#1700) 2020-08-27 19:47:35 +08:00
ZhiQiang Gu b91305a903
Fix typo in CircuitBreakingIntegrationTest (#1688)
Signed-off-by: yunfeiyanggzq <yunfeiyang@buaa.edu.cn>
2020-08-21 15:10:53 +08:00
Eric Zhao e58267012d Bump version to 1.8.1-SNAPSHOT
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-08-21 14:36:49 +08:00
Eric Zhao 5e26ccc2c9 Update README.md
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-08-20 19:50:54 +08:00
Eric Zhao d17bf8c7cc Bump version to 1.8.0
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-08-20 19:47:20 +08:00
Jason Joo 656e3de2f9
Improve compatibility for dispatched servlet request in Spring Web adapter (#1681) 2020-08-20 11:25:03 +08:00
Eric Zhao 5905874dd8 Fix NPE bug and improve default fallback in Dubbo 2.7.x adapter
- Fix NPE bug in consumer filter (when non-biz error occurred)
- Improve default fallback in Dubbo 2.7.x adapter: convert the BlockException to a simple RuntimeException (with necessary message)
- Polish code and comments

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-08-20 10:22:07 +08:00
Eric Zhao 125996d4d1 Add RuntimeException converting method in BlockException and polish logic for validation
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-08-20 10:22:07 +08:00
liqiangz 113afab380
adapter: Add test cases for Spring WebFlux HandlerFunction (#1678) 2020-08-20 10:09:43 +08:00
cdfive a1ce97677c
webmvc-adapter: improve to avoid ErrorEntryFreeException (#1533)
If entry already exists in request just skip creation.
2020-08-19 23:55:11 +08:00
Eric Zhao bcbc19c772 Polish code and README.md of sentinel-datasource-eureka
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-08-19 10:46:43 +08:00
M4Y 197b7db440
Support customized origin parser in Apache Dubbo 2.7.x adapter and unify config (#1617)
* Support customized origin parser in Apache Dubbo 2.7.x adapter
* Unify Dubbo callback registry (for fallback and origin parser) into DubboAdapterGlobalConfig
* Polish default fallback implementation (wrap exception with RpcResult rather than directly throw it out)
2020-08-19 10:31:40 +08:00
Eric Zhao a88288715a Refactor extended MetricExtension interface (matching events in Sentinel)
- Unify the extended interface as a few event handlers: onPass, onBlocked, onComplete and onError
- Polish related code

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-08-19 10:23:20 +08:00
Eric Zhao 58ff01e39b
Polish Dubbo 2.6.x adapter and unify callback registry into DubboAdapterGlobalConfig (#1572)
* Unify Dubbo callback registry (for fallback and origin parser) into DubboAdapterGlobalConfig
* Polish default fallback implementation (wrap exception with RpcResult rather than directly throw it out)

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-08-19 10:09:24 +08:00
Eric Zhao 5334f51d21 dashboard: Refactor degrade service/controller and adapt to new features
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-08-18 20:34:03 +08:00
Bill Yip 8643dac943
Add extended interface for metric extension hook to support distinguishing traffic type (#1665)
- Add EntryType args to all hook methods
2020-08-18 16:55:30 +08:00
Eric Zhao dae4621e6e Refactor exit handler mechanism of Entry
- Rename: whenComplete -> whenTerminate
- Execute the exit handler directly after the onExit hook of all slots

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-08-18 16:42:58 +08:00
Eric Zhao 55e038cc33 Polish CircuitBreaker interface and update comments
- Only carry context in tryPass/onComplete method (this might be generic in upcoming versions)

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-08-18 15:31:35 +08:00
Jason Joo ee2772b513
Fix the bug of circuit breaker half-open state transformation when request is blocked by upcoming rules (#1645)
* Refactor the workflow to fix the bug that circuit breaker may remain half-open state forever when the request is blocked by upcoming rules: revert the state change in exit handler (as a temporary workaround)
* Add exit handler in Entry as a per-invocation hook.
2020-08-18 11:04:48 +08:00
M4Y 10c92e69a2
Optimize the order of slots in ProcessorSlot SPI config (#1649) 2020-08-17 10:38:24 +08:00
cj dbbed35cc4
Remove unused code in TokenServerHandler#channelActive (#1667)
Signed-off-by: cj <power4j@outlook.com>
2020-08-13 14:47:57 +08:00
Peine c5da3faad9
Polish boolean checking in test cases and dashboard (#1664) 2020-08-12 20:34:22 +08:00
ZhiQiang Gu b9b1e8a481
Polish cluster flow control demo: add port in Nacos address (#1655)
Signed-off-by: yunfeiyanggzq <yunfeiyang@buaa.edu.cn>
2020-08-12 15:28:06 +08:00
Eric Zhao a18ef7cbfa Remove deprecated passCheck() in Rule and polish interface
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-08-05 10:42:15 +08:00
Eric Zhao a5fe23ad63 test: Update test cases with new degrade mechanism in sentinel-demo-quarkus
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-08-03 13:48:43 +08:00
Eric Zhao 19db20f00d Update demo for circuit breaking (DegradeRule)
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-07-30 19:00:13 +08:00
Eric Zhao 07b811196b Update test cases for circuit breaking
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-07-30 19:00:13 +08:00
Eric Zhao c0c27c86b7 Refactor degrade hierarchy with new circuit breaker mechanism and improve strategy
* Add `CircuitBreaker` abstraction (with half-open state) and add circuit breaker state change event observer support.
* Improve circuit breaking strategy (avg RT → slow request ratio) and make statistics of each rule dependent (to support arbitrary statistic interval).
* Add simple "trial" mechanism (aka. half-open).
* Refactor mechanism of metric recording and state change handling for circuit breakers: record RT and error when requests have completed (i.e. `onExit`, based on #1420).

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-07-30 19:00:13 +08:00
ZhiQiang Gu 17c3ff7a44
test: Add unit test for sentinel-cluster-server and polish code (#1529)
Signed-off-by: yunfeiyanggzq <yunfeiyang@buaa.edu.cn>
2020-07-23 10:15:01 +08:00
Eric Zhao 86f8bb7b38 Refactor config mechanism for OkHttp adapter and polish related code
- One config per interceptor instead of the global config
- Polish document and demo

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2020-07-22 11:04:48 +08:00
ZhiQiang Gu c7949f5f4e
Fix incorrect protocol description in FlowRequestData writer/decoder (#1607)
Signed-off-by: yunfeiyanggzq <yunfeiyang@buaa.edu.cn>
2020-07-16 15:48:18 +08:00