https://github.com/esastack/esa-servicekeeper
A lightweight service governance framework.
https://github.com/esastack/esa-servicekeeper
circuit-breaker concurrent-limiter fallback rate-limiting
Last synced: 9 months ago
JSON representation
A lightweight service governance framework.
- Host: GitHub
- URL: https://github.com/esastack/esa-servicekeeper
- Owner: esastack
- License: apache-2.0
- Created: 2021-05-08T08:50:42.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-05-31T06:35:54.000Z (about 4 years ago)
- Last Synced: 2025-07-18T06:42:32.415Z (11 months ago)
- Topics: circuit-breaker, concurrent-limiter, fallback, rate-limiting
- Language: Java
- Homepage: http://www.esastack.io/esa-servicekeeper/
- Size: 685 KB
- Stars: 22
- Watchers: 1
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-java - ServiceKeeper
README
# ServiceKeeper

[](https://codecov.io/gh/esastack/esa-servicekeeper)
[](https://maven-badges.herokuapp.com/maven-central/io.esastack/servicekeeper-parent/)
[](https://github.com/esastack/esa-servicekeeper/blob/main/LICENSE)
ServiceKeeper is a lightweight service governance framework that provides many awesome features such as rate limit, concurrent limit, circuit breaker,
retry and fallback... You can get start and customize the configuration easily with `annotation`.
# Features
- Concurrent Limit
- Rate Limit
- Circuit Breaker
- Fallback
- Manual fallback
- Parameter-level concurrent limit, circuit breaker and such on
# Quick Start
Step one: Add maven dependency
```xml
io.esastack
servicekeeper-springboot-adapter
${servicekeeper.version}
```
Step two: Add customize configuration by annotation
```java
@SpringBootApplication
public class AppMain {
@Bean
public HelloService helloService() {
return new HelloService();
}
public static void main(String[] args) {
ConfigurableApplicationContext ctx = SpringApplication.run(AppMain.class);
final HelloService service = ctx.getBean(HelloService.class);
int errorCount = 0;
for (int i = 0 ; i < 20; i++) {
try {
service.hello();
} catch (RateLimitOverflowException ex) {
errorCount++;
}
}
System.out.println("RateLimitOverflowException count: " + errorCount);
ctx.close();
}
public class HelloService {
@RateLimiter(limitForPeriod = 10)
public String hello() {
return "Hello World!";
}
}
}
```
See more details in [Reference Doc](https://www.esastack.io/esa-servicekeeper)