Skip to content

Commit 028dce2

Browse files
committed
update http doc
1 parent f6ee071 commit 028dce2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

doc/http.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Notes:
4949
- `/throttle-app/archive/ttl/30/ratio/1`: completely refuse `/check/archive/*` requests for a duration of `30` minutes
5050
- `/throttle-app/archive/ttl/30/ratio/0.9`: _mostly_ refuse `/check/archive/*` requests for a duration of `30` minutes. On average (random dice roll), `9` out of `10` requests (i.e. `90%`) will be denied, and one approved.
5151
- `/throttle-app/archive/ttl/30/ratio/0.5`: refuse `50%` of `/check/archive/*` requests for a duration of `30` minutes
52-
52+
5353
- `/throttle-app/<app-name>/ttl/<ttlMinutes>`:
5454

5555
- If app is already throttled, modify TTL portion only, without changing the ratio.
@@ -65,7 +65,8 @@ Notes:
6565

6666
Same as calling `/throttle-app/<app-name>/ttl/60/ratio/1`. Provided as convenience endpoint.
6767

68-
- `/unthrottle-app/<app-name>`: remove any imposed throttling constraint from given app. Example:
68+
- `/throttle-app` can take a query parameter `store_name` to throttle the app only on one store (i.e. MySQL cluster). For example `/throttle-app/archive?store_name=mycluster` refuses `/check/archive/mysql/mycluster` requests for `1` hour.
69+
6970

7071
`/unthrottle-app/archive` will re-allow the `archive` app to get valid response from `/check/archive/*` requests.
7172

pkg/throttle/throttler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ func (throttler *Throttler) UnthrottleApp(appName string) {
527527
appWithStore := appName + "/"
528528
for app, _ := range throttler.throttledApps.Items() {
529529
if app == appName || strings.HasPrefix(app, appWithStore) {
530-
throttler.throttledApps.Delete(appName)
530+
throttler.throttledApps.Delete(app)
531531
}
532532
}
533533
}

0 commit comments

Comments
 (0)