Commit Graph

186 Commits

Author SHA1 Message Date
Eric Zhao 40cd335ec1 Update fastjson dependency to 1.2.54
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 14:46:52 +08:00
Eric Zhao f49870402d Move CDN resources to local in Sentinel Dashboard
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 14:41:12 +08:00
Eric Zhao 0059b1a42d Add frontend service and pages for Sentinel cluster flow control in dashboard
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 14:33:57 +08:00
Eric Zhao 8961927a12 Add dashboard logic for Sentinel cluster flow control
- Update SentinelApiClient to support new-added command APIs
- Add controller for cluster config
- Add flow controller v2 for global rule pulling / pushing
- Extract dynamic rule provider and publisher interface for customized extensions
- Add basic cluster config service
- Add basic Nacos integration (in test as an example)

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 14:33:57 +08:00
Eric Zhao fba114d43e
Merge pull request #294 from alibaba/feature/cluster-flow-control
- Add default cluster flow control implementation
2018-12-14 12:37:30 +08:00
Eric Zhao 465b44b7e7
Merge branch 'master' into feature/cluster-flow-control 2018-12-14 10:58:20 +08:00
Eric Zhao f01fe2b437 Add demo module for Sentinel cluster flow control
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:54:30 +08:00
Eric Zhao 2735954afd Update cluster related command APIs and some enhancement and fix for cluster module
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:54:30 +08:00
Eric Zhao a5819e092d Add HTTP command for modifying global state and client config
- Add several command handlers
- Update cluster state manager

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:54:30 +08:00
Eric Zhao 2d1313f220 Update test dependency of sentinel-cluster-server-default
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:54:30 +08:00
Eric Zhao a731811d27 Polish default cluster server module for initial work
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:52:28 +08:00
Eric Zhao 138c265a34 Polish cluster client module
- Initial work

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:52:28 +08:00
Eric Zhao 9a69104f79 Refactor param flow checker to support embedded server mode
- Add exception item extracting method in ParamFlowRule

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:52:28 +08:00
Eric Zhao 2689a3ff43 Add `@RequestType` annotation and common config supplier registry
- Add a `@RequestType` annotation for common use (e.g. request handler, encoder or decoder)
- Add a registry for universal config supplier (e.g. namespace of client)

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:52:28 +08:00
Eric Zhao 9314fca8a6 Add cluster state manager to manage cluster mode
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:52:28 +08:00
Eric Zhao e31e7e0208 Update cluster related logic in core
- Remove "borrow-from-ref" mode
- Improve flow checker to support both embedded server mode and client mode

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:52:28 +08:00
Eric Zhao ba72d4c67a Rearrangement and refinement of statistic code in core
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:52:28 +08:00
Eric Zhao 9d42edcffa Add cluster token server interface to core and support embedded mode
- Add a EmbeddedClusterTokenServer interface

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:52:28 +08:00
Eric Zhao 9f2678eb6c Update token client interface in sentinel-core
- Add `start` and `stop` method for automatic control
- Update TokenClientProvider using SpiLoader

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:52:28 +08:00
Eric Zhao b973aca1f5 Add implementation for default token server module
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:52:28 +08:00
Eric Zhao f83ea428ff Update token client interface and default implementation
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:52:28 +08:00
Eric Zhao 6caa19ea95 Add default Sentinel cluster transport implementation with Netty
- Add Netty transport client implementation and default cluster token client
- Add config manager for cluster client
- Add codec SPI mechanism for client entity decoder / writer

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:52:28 +08:00
Eric Zhao b3ae7f58bf Add common module for Sentinel default cluster implementation
- Add a `ClusterTransportClient` for transport abstraction of Sentinel cluster
- Add universal request/response interface and common ClusterRequest/ClusterResponse abstraction
- Add common request/response data entity
- Add basic abstraction of codec (EntityWriter and EntityDecoder)

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:52:21 +08:00
Eric Zhao 1043648fbc Update parameter flow rule to adapt to cluster mode and extract rule util class
- Update ParamFlowRule to support cluster mode
- Add `ParamFlowClusterConfig` to provide cluster mode items for the rule
- Update ParamFlowChecker to support cluster flow mode
- Extract ParamFlowRuleUtil class
- Change type of `flowId` from Integer to Long

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:52:21 +08:00
Eric Zhao b215e8784e Update flow rule for cluster mode and extract util class
- Add new field `clusterMode` and `clusterConfig` for cluster mode
- Add a `ClusterFlowConfig` class for specific items for cluster flow control
- Update FlowRuleChecker to support cluster mode
- Extract valid rule checking and rule map generating logic to FlowRuleUtil

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:52:21 +08:00
Eric Zhao 6545a90d46 Add basic interface and entity for Sentinel cluster flow control
- Add a universal `TokenService` SPI interface for both local flow control and distributed flow control
- Add TokenResult entity to represents result of acquiring token
- Add `ClusterTokenClient` as the SPI interface for client of Sentinel cluster flow control

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-12-14 10:52:21 +08:00
leitao 512b27bba3 Fix javadoc typo in decreaseThreadNum() method of Node interface (#296) 2018-12-11 11:56:45 +08:00
Yuanqing Luo 6802f97528 Add HTTP-method level flow control support in Sentinel Web Servlet Filter (#282)
- Add HTTP method level support for servlet filter with a init parameter `HTTP_METHOD_SPECIFY` as the switch. This is useful for REST APIs.
- Add test cases and fix test bug by reset the cluster node in ClusterBuilderSlot
2018-12-09 23:08:03 +08:00
Eric Zhao ad1d9f0270
Update README.md 2018-12-03 15:13:14 +08:00
nick.tan eb29cc929f Add heartbeat client ip config to resolve ip problem in Docker env (#261) 2018-12-03 09:48:15 +08:00
Carpenter Lee 223b4e47ee Add verbose log when SimpleHttpCommandCenter chooses port fail 2018-11-29 16:02:27 +08:00
cdfive 0bc07f314e Optimize the click sensitivity of dashboard's sidebar menu (#268)
- Use AngularJS binding model directly rather than jQuery DOM-based operation
2018-11-29 10:37:09 +08:00
cdfive 4f854c9eae Fix padding issue of charts in monitoring page of Sentinel dashboard (#262)
- Increase padding-left value of G2.chart in sentinel-dashboard
2018-11-26 17:42:17 +08:00
Eric Zhao c80bb5a862
Merge pull request #257 from alibaba/feature/cluster-core
Add basic interface and adaptations for Sentinel cluster flow control in `sentinel-core` (#257)
2018-11-23 16:12:54 +08:00
Eric Zhao 4342b1e935 Code refinement for LeapArray
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-23 11:13:32 +08:00
Eric Zhao f539b5b827 Update parameter flow rule to adapt to cluster mode and extract rule util class
- Update ParamFlowRule to support cluster mode
- Add `ParamFlowClusterConfig` to provide cluster mode items for the rule
- Update ParamFlowChecker to support cluster flow mode
- Extract ParamFlowRuleUtil class
- Change type of `flowId` from Integer to Long

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-23 10:13:59 +08:00
Eric Zhao a6534e5b13 Update flow rule for cluster mode and extract util class
- Add new field `clusterMode` and `clusterConfig` for cluster mode
- Add a `ClusterFlowConfig` class for specific items for cluster flow control
- Update FlowRuleChecker to support cluster mode
- Extract valid rule checking and rule map generating logic to FlowRuleUtil

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-21 19:06:44 +08:00
Eric Zhao d6237bee0a Add basic interface and entity for Sentinel cluster flow control
- Add a universal `TokenService` SPI interface for both local flow control and distributed flow control
- Add TokenResult entity to represents result of acquiring token
- Add `ClusterTokenClient` as the SPI interface for client of Sentinel cluster flow control

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-21 19:06:11 +08:00
Eric Zhao 7bf2a809e9 Code and javadoc improvement
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-21 17:37:43 +08:00
Eric Zhao 09ba7f081b Resolves #256: Support parameters in entry of Sentinel annotation support
- To enable parameter flow control in Sentinel annotation support

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-21 16:46:55 +08:00
Eric Zhao 2237727a11
Add prioritized entry support in ProcessorSlot and SphU (#255)
- Refactor the slot interface to support prioritized entry
- Add `entryWithPriority` in SphU

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-21 16:22:41 +08:00
Eric Zhao f2a401cdb3 Code and javadoc refinement
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-20 20:52:03 +08:00
Eric Zhao f8bc6f631a Code and javadoc refinement
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-20 20:06:55 +08:00
Eric Zhao c42ba34568 Add basic helper functional interface
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-19 14:39:31 +08:00
Eric Zhao 7fe3656e64 Update dependencies
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-19 14:37:54 +08:00
Eric Zhao 1e46ff11e5 Add modules for Sentinel cluster flow control
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-19 14:19:29 +08:00
Eric Zhao 6765130f1b Add log for fatal error when InitExecutor failed
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-15 17:09:23 +08:00
Eric Zhao a680b4c5e3 Add sort for flow rules when loading rules
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-15 17:04:33 +08:00
Eric Zhao 1ca28d8974 Update test cases for flow slot and checker
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-14 14:52:39 +08:00
Eric Zhao d4d63fad95 Extract flow rule checker from FlowRule
- Extract flow rule checker from legacy `passCheck`
- Remove redundant code
- Refactor FlowSlot (some logic moved from FlowRuleManager)
- Rename `Controller` to `TrafficShapingController`

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
2018-11-14 14:52:39 +08:00