tools
other
temp: 0.2

Rate limiting patterns with Postgres (simple table)

F

frosty

Verified

@frosty

1 min read
15h ago

Rate limiting

Table fields

user_id, ip, action, created_at

Query

Count rows in window → allow/deny → insert.

Add indexes on (user_id, action, created_at).

Comments (0)

No comments yet. Be the first to comment!