Skip to content

Commit

Permalink
Merge pull request #458 from Jaysok/patch-1
Browse files Browse the repository at this point in the history
Fix typo - implicit-configuration-replacement.adoc
  • Loading branch information
vladimir-bukhtoyarov committed Mar 13, 2024
2 parents b7a78a1 + c289463 commit 5ee8d7b
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -5,7 +5,7 @@ distributed bucket operates with configuration that was provided at the time of

.Explicit config replacement can be awkward in the following cases:
* It requires for library client to write the code for configuration replacement. It is unnecessary job, that is especially hard when bucket4j is used behind of high-level frameworks like bucket4j-spring-boot-starter, when end-clients are not mentally prepared to work directly with low-level API of Bucket4j.
* It can confuse the user in the following scenario: user stores limits in the configuration for example in proerties or yaml file, user updates configuration files and restarts application and he becomes surprised because new limits are not applied for buckets that survive application restart in the storage, because as was mentioned above only one way to change the config for already persisted bucket is explicitly calling of replaceConfiguration for each persisted bucket.
* It can confuse the user in the following scenario: user stores limits in the configuration for example in properties or yaml file, user updates configuration files and restarts application and he becomes surprised because new limits are not applied for buckets that survive application restart in the storage, because as was mentioned above only one way to change the config for already persisted bucket is explicitly calling of replaceConfiguration for each persisted bucket.
* For some persistent technologies like Redis it is costly to identify all buckets that are persisted in the storage, because lack of mechanisms for grouping like tables or caches leads to scan all keys, even keys that points to data that not related to rate-limiting.
.Implicit configuration replacement solution:
Expand All @@ -20,4 +20,4 @@ BucketConfiguration config = ...;
BucketProxy bucket = proxyManager.builder()
.withImplicitConfigurationReplacement(1, TokensInheritanceStrategy.PROPORTIONALLY)
.build(666L, config);
----
----

0 comments on commit 5ee8d7b

Please sign in to comment.