garrensmith commented on a change in pull request #2662: Use `couch_rate`
application for `couch_view`
URL: https://github.com/apache/couchdb/pull/2662#discussion_r392915821
##########
File path: src/couch_views/README.md
##########
@@ -13,3 +13,36 @@ Code layout:
* `couch_views_fdb` - Maps view operations to FoundationDB logic.
* `couch_views_encoding` - Encodes view keys that are byte comparable
following CouchDB view sort order.
* `couch_views_server` - Spawns `couch_views_indexer` workers to handle index
update jobs.
+
+# Configuration
+
+## Configuring rate limiter
+
+Here is the example of configuration used in `couch_view` application:
+
+```
+[couch_views]
+rate_limiter = couch_rate_limiter
+rate_limiter_opts = #{budget => 50, target => 2000}
+```
+
+Supported fields in `rate_limiter_opts`:
+
+* `budget` - the initial value for estimated batch size
+* `target` - the amount in msec which we try to maintain for batch processing
time
+* `window` - time interval for contention detector
+* `sensitivity` - minimal interval within the `window`
+
+Unsupported fields in `rate_limiter_opts` (if you really know what you are
doing):
+
+* `window_size` - how many batches to consider in contention detector
+* `timer` - this is used for testing to fast forward time `fun() ->
current_time_in_ms() end`
+* `target` - the amount in msec which we try to maintain for batch processing
time
+* `underload_threshold` - a threshold bellow which we would try to increase
the budget
Review comment:
s/bellow/below
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services