Skip to main content

Backend

Browse all articles, tutorials, and guides about Backend

5posts

Posts

DevOps
|10 min read

Stop Paginating With OFFSET: Keyset Pagination and the Deep-Page Cliff

LIMIT/OFFSET is the reflexive way to paginate, and it is fine on page one. But OFFSET makes the database generate and throw away every row before the page you want, so cost grows with page depth until deep pages fall off a cliff. Keyset pagination makes every page the same speed regardless of depth. Here is why OFFSET is slow, the fix, and the one tradeoff.

DevOps
|10 min read

Stop Using Random UUIDs as Primary Keys: uuidv7() Lands in PostgreSQL 18

Random UUIDv4 primary keys quietly wreck insert speed and bloat indexes on large tables. PostgreSQL 18 ships a native time-ordered uuidv7() that keeps the upsides of UUIDs without the B-tree penalty. Here are the numbers and how to adopt it.

DevOps
|12 min read

Designing Rate Limiting for APIs: Algorithms, Patterns, and Implementation

A practical comparison of token bucket, leaky bucket, fixed window, and sliding window rate limiting, with copy-paste Redis and FastAPI code, nginx config, and guidance on which one to actually use.

Terraform
|9 min read

How to Fix Common Terraform S3 Backend Configuration Errors

Learn how to troubleshoot and resolve common errors when configuring Terraform's S3 backend, from access denied issues to state locking problems.

Terraform
|5 min read

Initial setup of Terraform backend using Terraform

Learn how to configure a Terraform backend for secure and efficient state management.