api_rate_limits table

The api_rate_limits table in the Reddit Clone Database Schema schema has 6 columns.

A fixed-window counter keyed by whoever is being limited - a user, an OAuth application or a bare IP. principal_id is a varchar rather than a uuid precisely because an IP is a legitimate principal.

Columns (6)

Columns of the api_rate_limits table
ColumnTypeConstraintsDescription
principal_typeprincipal_typenot null
principal_idvarchar(120)not null
window_started_attimestamptznot null
request_countintegernot null
limit_per_windowintegernot null
throttled_countintegernot null