forked from quarkusio/quarkus
-
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.
- Loading branch information
Showing
4 changed files
with
93 additions
and
12 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
62 changes: 62 additions & 0 deletions
62
...ing/runtime/src/main/java/io/quarkus/load/shedding/runtime/LoadSheddingRuntimeConfig.java
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package io.quarkus.load.shedding.runtime; | ||
|
||
import io.quarkus.runtime.annotations.ConfigGroup; | ||
import io.quarkus.runtime.annotations.ConfigPhase; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
import io.smallrye.config.ConfigMapping; | ||
import io.smallrye.config.WithDefault; | ||
|
||
@ConfigMapping(prefix = "quarkus.load-shedding") | ||
@ConfigRoot(phase = ConfigPhase.RUN_TIME) | ||
public interface LoadSheddingRuntimeConfig { | ||
/** | ||
* Whether load shedding should be enabled. | ||
* Currently, this only applies to incoming HTTP requests. | ||
*/ | ||
@WithDefault("true") | ||
boolean enabled(); | ||
|
||
/** | ||
* The maximum number of concurrent requests allowed. | ||
*/ | ||
@WithDefault("1000") | ||
int maxLimit(); | ||
|
||
/** | ||
* The {@code alpha} factor of the Vegas overload detection algorithm. | ||
*/ | ||
@WithDefault("3") | ||
int alphaFactor(); | ||
|
||
/** | ||
* The {@code beta} factor of the Vegas overload detection algorithm. | ||
*/ | ||
@WithDefault("6") | ||
int betaFactor(); | ||
|
||
/** | ||
* The probe factor of the Vegas overload detection algorithm. | ||
*/ | ||
@WithDefault("30.0") | ||
double probeFactor(); | ||
|
||
/** | ||
* The initial limit of concurrent requests allowed. | ||
*/ | ||
@WithDefault("100") | ||
int initialLimit(); | ||
|
||
/** | ||
* Configuration of priority load shedding. | ||
*/ | ||
PriorityLoadShedding priority(); | ||
|
||
@ConfigGroup | ||
interface PriorityLoadShedding { | ||
/** | ||
* Whether priority load shedding should be enabled. | ||
*/ | ||
@WithDefault("true") | ||
boolean enabled(); | ||
} | ||
} |
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