Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
System Design Case Study: News Feed and Timeline
Fan-out on write is the default for a news feed, but because followers follow a power law, a single celebrity post turns into a million writes; the fix is a hybrid model that merges accounts above a high threshold at read time, a feed cache holding only post IDs, and cursor pagination. A computed capacity table, a push, pull and hybrid simulation, and real output comparing offset and cursor on a Redis sorted set.
Pagination Strategies in Depth: Offset, Keyset and Opaque Cursor Tokens
On large, changing tables keyset pagination removes offset's depth-dependent cost and page drift: in a 2-million-row test, page 5000 read 375 logical pages with offset and 6 with keyset. This post shows, with real measurements, the tie-breaker keyset condition on SQL Server, an HMAC-signed opaque cursor, the previous page and the nullable sort column trap.
Pagination, Filtering and Sorting in ASP.NET Core Web API: Returning Large Lists Safely
We gather query parameters in one class and run filtering, the total count, Skip/Take and allow-listed dynamic sorting in the database with IQueryable. Plus body vs header metadata, offset vs keyset, and the SQLite decimal trap.