# keyedRateLimitTable

> **keyedRateLimitTable**<`K`>(`options`): [`KeyedRateLimitTable`](/reference/knotkit/rate-limit/interfaces/keyedratelimittable/)<`K`>

Defined in: [packages/rate-limit/src/keyed-table.ts:170](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/rate-limit/src/keyed-table.ts#L170)

Create a [KeyedRateLimitTable](/reference/knotkit/rate-limit/interfaces/keyedratelimittable/) over a caller-supplied meter factory.

Choose it when the server limits many clients and must survive a flood of new keys without growing with every client it has ever seen. Choose a single meter instead when there is one quota and no keys: a table for one key is a meter with extra steps.

## Type Parameters

### K

`K`

## Parameters

### options

[`KeyedRateLimitTableOptions`](/reference/knotkit/rate-limit/interfaces/keyedratelimittableoptions/)

The key bound, the meter factory, the clock, and the table-full choice.

## Returns

[`KeyedRateLimitTable`](/reference/knotkit/rate-limit/interfaces/keyedratelimittable/)<`K`>

## Throws

With code `INVALID_MAX_KEY_COUNT` when `maxKeyCount` is not a positive safe integer, or `INVALID_WHEN_FULL` when `whenFull` is neither `refuse` nor `allow-untracked`. A factory that rejects its own options throws its own package’s error from here, because the table builds one meter at construction to answer for keys it does not hold.
