forked from alibaba/Sentinel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update document to meet Markdown lint
Signed-off-by: Eric Zhao <[email protected]>
- Loading branch information
Showing
12 changed files
with
43 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,25 +3,25 @@ | |
Welcome to Sentinel! This document is a guideline about how to contribute to Sentinel. | ||
If you find something incorrect or missing, please leave comments / suggestions. | ||
|
||
# Before you get started | ||
## Before you get started | ||
|
||
## Code of Conduct | ||
### Code of Conduct | ||
|
||
Please make sure to read and observe our [Code of Conduct](./CODE_OF_CONDUCT.md). | ||
|
||
## Setting up your development environment | ||
### Setting up your development environment | ||
|
||
You should have JDK 1.8 or later installed in your system. | ||
|
||
# Contributing | ||
## Contributing | ||
|
||
We are always very happy to have contributions, whether for typo fix, bug fix or big new features. | ||
Please do not ever hesitate to ask a question or send a pull request. | ||
|
||
We strongly value documentation and integration with other projects. | ||
We are very glad to accept improvements for these aspects. | ||
|
||
## GitHub workflow | ||
### GitHub workflow | ||
|
||
We use the `master` branch as the development branch, which indicates that this is a unstable branch. | ||
|
||
|
@@ -44,7 +44,7 @@ The reviewers will review the code. | |
Before merging a PR, squash any fix review feedback, typo, merged, and rebased sorts of commits. | ||
The final commit message should be clear and concise. | ||
|
||
## Open an issue / PR | ||
### Open an issue / PR | ||
|
||
We use [GitHub Issues](https://github.com/alibaba/Sentinel/issues) and [Pull Requests](https://github.com/alibaba/Sentinel/pulls) for trackers. | ||
|
||
|
@@ -54,27 +54,27 @@ Please follow the guideline message in the issue template. | |
|
||
If you want to contribute, please follow the [contribution workflow](#github-workflow) and create a new pull request. | ||
If your PR contains large changes, e.g. component refactor or new components, please write detailed documents | ||
about its design and usage. | ||
about its design and usage. | ||
|
||
Note that a single PR should not be too large. If heavy changes are required, it's better to separate the changes | ||
to a few individual PRs. | ||
|
||
## Code review | ||
### Code review | ||
|
||
All code should be well reviewed by one or more committers. Some principles: | ||
|
||
- Readability: Important code should be well-documented. Comply with our code style. | ||
- Elegance: New functions, classes or components should be well designed. | ||
- Testability: Important code should be well-tested (high unit test coverage). | ||
|
||
# Community | ||
## Community | ||
|
||
## Contact us | ||
### Contact us | ||
|
||
### Mailing list | ||
#### Mailing list | ||
|
||
If you have any questions or advice, please contact [email protected]. | ||
|
||
### Gitter | ||
#### Gitter | ||
|
||
Our Gitter room: [https://gitter.im/alibaba/Sentinel](https://gitter.im/alibaba/Sentinel). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,24 +8,17 @@ | |
[](https://www.apache.org/licenses/LICENSE-2.0.html) | ||
[](https://gitter.im/alibaba/Sentinel) | ||
|
||
## What Does It Do? | ||
## 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**, **circuit breaking** and **system adaptive protection**, to guarantee service reliability. | ||
|
||
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. | ||
|
||
- **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. | ||
- **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. | ||
- **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. | ||
|
||
## Documentation | ||
|
||
|
@@ -63,9 +56,9 @@ Wrap code snippet via Sentinel API: `SphU.entry("resourceName")` and `entry.exit | |
```java | ||
Entry entry = null; | ||
|
||
try { | ||
try { | ||
entry = SphU.entry("HelloWorld"); | ||
|
||
// BIZ logic being protected | ||
System.out.println("hello world"); | ||
} catch (BlockException e) { | ||
|
@@ -82,7 +75,8 @@ So far the code modification is done. We also provide [annotation support module | |
|
||
### 3. Define Rules | ||
|
||
If we want to limit the access times of the resource, we can define rules. The following code defines a rule that limits access to the reource to 20 times per second at the maximum. | ||
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. | ||
|
||
```java | ||
List<FlowRule> rules = new ArrayList<>(); | ||
|
@@ -112,6 +106,7 @@ After running the demo for a while, you can see the following records in `~/logs | |
p stands for incoming request, block for blocked by rules, success for success handled by Sentinel, e for exception count, rt for average response time (ms) | ||
``` | ||
|
||
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](https://github.com/alibaba/Sentinel/wiki/How-to-Use) section. | ||
|
@@ -140,7 +135,7 @@ Contact us: [email protected] | |
|
||
Contributions are always welcomed! Please see [CONTRIBUTING](./CONTRIBUTING.md) for detailed guidelines. | ||
|
||
You can start with the issues labeled with [`good first issue`](https://github.com/alibaba/Sentinel/pulls?q=is%3Apr+is%3Aopen+label%3A%22good+first+issue%22). | ||
You can start with the issues labeled with [`good first issue`](https://github.com/alibaba/Sentinel/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). | ||
|
||
## Credits | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters