Skip to content

Latest commit

 

History

History
106 lines (73 loc) · 1.51 KB

File metadata and controls

106 lines (73 loc) · 1.51 KB

CLI Usage

The flint CLI can configure, inspect, reset, compact, and serve limits.

Use a custom data directory with --data-dir:

flint --data-dir .flint-prod limit list

Limits

Configure a limit:

flint limit add "api:user-42" --rate 100 --per 1m --algorithm token_bucket

Check and consume quota:

flint limit check "api:user-42"
flint limit check "api:user-42" --cost 5

Inspect status:

flint limit status "api:user-42"

List all limits:

flint limit list

Reset a limit:

flint limit reset "api:user-42"

Show history:

flint limit history "api:user-42"

Show busiest limits:

flint limit top --by denied --limit 20
flint limit top --by allowed --limit 20

Atomic Multi-Limit Checks

flint limit check-all user:42 org:acme route:/v1/chat

With costs:

flint limit check-all user:42 org:acme route:/v1/chat --costs 1,10,1

Storage Admin

Compact AOF into a snapshot:

flint log compact

Run storage health checks:

flint doctor

Shared Server

Start a local shared server:

flint --data-dir .flint-shared server start \
  --bind 127.0.0.1:7878 \
  --token dev-secret

Start with batch fsync:

flint --data-dir .flint-shared server start \
  --bind 127.0.0.1:7878 \
  --token dev-secret \
  --sync batch \
  --flush-every-ms 100 \
  --flush-every-events 100 \
  --max-blocking 128

Shared mode exposes the HTTP API documented in Shared Mode.