Blog

Notes on DevOps, Kubernetes, self-hosted infrastructure and consulting.
26 posts tagged backend · clear filter
November 16, 2026
Token Lifetimes and Logout in OIDC: Short Access Tokens, Refresh Token Rotation, Concurrent Refresh and Back-Channel Logout
The hours after login: why access tokens should be short, why refresh tokens belong outside the browser, why users get logged out at random once rotation is on,...
guvenlik oidc backend
Read more →
November 10, 2026
Deploying Content Security Policy Without Breaking Your Site: Nonces, strict-dynamic, Hashes and Report-Only
Why host-allowlist CSPs are easy to bypass, how to build a nonce plus strict-dynamic policy, how to trial it in report-only mode, and the pitfalls, like cached...
guvenlik backend devsecops
Read more →
November 9, 2026
Getting CORS Right: Preflight, Credentialed Requests and the Hole Opened by Reflecting Origin
CORS does not block requests, it blocks reading responses; it is neither a server-side firewall nor CSRF protection. Choosing between same origin, an allowlist...
guvenlik api-tasarimi backend
Read more →
November 8, 2026
Idempotency Keys: Handling Retried POST Requests Without Doing the Work Twice, Scope, Concurrency and Stuck Records
Retrying a timed out POST can create the same order twice. Choosing between natural idempotency, a key stored in the same transaction as the business data and a...
api-tasarimi guvenilirlik postgresql
Read more →
November 7, 2026
Unicode Normalization: Strings That Look the Same but Are Not, Choosing Between NFC and NFKC, and Where to Normalize
Two file names that look identical slip past a unique constraint and search only half works. The difference between NFC, NFD and NFKC, normalizing at the bounda...
backend api-tasarimi postgresql
Read more →
November 5, 2026
Cache Stampede: Protecting the Database When a Hot Key Expires, Request Coalescing, Serving Stale and Early Refresh
When a hot key expires, hundreds of requests send the same query to the database at once. How to choose between TTL jitter, request coalescing, a distributed lo...
performans guvenilirlik backend
Read more →
November 2, 2026
The Lost Update Problem: Atomic Updates, Pessimistic Locks, Version Columns and If-Match
Any read, modify, write code path loses data under concurrent load. How to choose between atomic updates, FOR UPDATE and optimistic version checks, how ETag and...
postgresql api-tasarimi backend
Read more →
November 1, 2026
Choosing a Primary Key: Deciding Between bigint, UUIDv4 and UUIDv7
Auto-increment integers leak business volume, random UUIDs scatter index writes and inflate WAL on large tables. Separating the two jobs of a key, why UUIDv7 sh...
postgresql backend performans
Read more →
October 31, 2026
Load Shedding Under Overload: Concurrency Limits, Queue Time, Deadlines and Health Checks That Sink You
An overloaded service rarely crashes; it keeps doing work its callers already abandoned. How to reject excess load early and cheaply with bounded queues, concur...
guvenilirlik performans backend
Read more →
October 27, 2026
Storing Timestamps Right: Instants vs Wall Time, UTC, Time Zone Names and DST Traps
Most date bugs surface at a DST transition or when a country changes its rules. Store past events as instants and future calendar events as local time plus zone...
postgresql backend api-tasarimi
Read more →
October 26, 2026
Finding Slow Queries and Reading Plans in PostgreSQL: pg_stat_statements, EXPLAIN ANALYZE and Where the Planner Goes Wrong
Measure the load before adding an index: finding the truly expensive query with pg_stat_statements, comparing estimates with reality in EXPLAIN (ANALYZE, BUFFER...
postgresql performans gozlemlenebilirlik
Read more →
October 25, 2026
The Turkish I Problem: Locale Dependent Case Conversion, Database Collations and Catching It in Tests
Under a Turkish locale "ID".toLowerCase() returns "ıd", and enums, config keys or email uniqueness quietly break. How to separate machine text from human text,...
backend postgresql test
Read more →
October 24, 2026
Keyset Instead of Offset: Cursor Pagination, Unique Sort Keys and Rows Lost at Page Boundaries
Why OFFSET slows down on deep pages and drops rows when data changes underneath it. Keyset pagination with row comparisons in PostgreSQL, opaque cursor design,...
postgresql api-tasarimi performans
Read more →
October 22, 2026
Why a Distributed Lock Is Not Enough: Leases, Fencing Tokens, and Choosing Between Redis, PostgreSQL and etcd
A leased lock can end up with two holders when the owner pauses. The efficiency versus correctness distinction, rejecting stale holders with fencing tokens, cho...
mimari guvenilirlik backend
Read more →
October 21, 2026
Read Replica Lag: Read-Your-Writes Consistency, Sticky Sessions and Log Positions
Move reads to a replica and users stop seeing what they just saved. Why lag is never zero, choosing between sticky sessions, WAL position tracking and synchrono...
postgresql mimari olceklenebilirlik
Read more →
October 20, 2026
Retry Storms: Exponential Backoff, Jitter, Retry Budgets and Circuit Breakers
When every layer retries a slow dependency, a brief slowdown becomes a long outage. Retrying at one layer, full jitter, retry budgets as a share of traffic, pro...
guvenilirlik api-tasarimi mimari
Read more →
October 19, 2026
Getting HTTP Caching Right: Cache-Control, ETag and Data Leaks in Shared Caches
The difference between no-cache and no-store, the right header per response type, 304s that never happen, and the mistakes that make a CDN hand one user's respo...
performans guvenlik api-tasarimi
Read more →
October 17, 2026
The Quiet Cause of Sporadic 502s: Idle Connection Timeouts and Keepalive Ordering
Load balancers, proxies and application servers close idle connections on different clocks. Get the order wrong and random 502s appear after quiet periods. The...
guvenilirlik backend performans
Read more →
October 15, 2026
The Get-or-Create Race: Duplicate Rows Under Concurrency, Unique Constraints and ON CONFLICT Traps
Check-then-insert is flawless for one request and quietly produces duplicates under parallel ones. Why application locks fall short, why a unique constraint is...
postgresql backend guvenilirlik
Read more →
October 13, 2026
Using Redis as a Data Store: Memory Policy, Persistence and Its Limits as a Queue
Redis arrives as a cache and ends up holding sessions and the job queue. Choosing maxmemory-policy, the cost of RDB versus AOF, what async replication loses, an...
redis backend performans
Read more →
October 8, 2026
The Real Client IP Behind a Reverse Proxy: X-Forwarded-For, Trusted Proxies and Spoofed Headers
Behind a proxy, an application only learns the client address from a header. Reading X-Forwarded-For from the right, defining trusted proxies by address, nginx,...
guvenlik backend altyapi
Read more →
October 1, 2026
The Transactional Outbox: Writing to a Database and a Queue Without Losing Events
Why commit-then-publish loses events, how to build an outbox table, whether to relay by polling or CDC, and how to avoid the sequence gap, duplicate delivery an...
mimari kuyruk backend
Read more →
September 30, 2026
API Rate Limiting: Token Buckets, Choosing the Right Key and Distributed Counter Pitfalls
Why fixed windows let twice the limit through, why the IP address is a poor key, how INCR plus EXPIRE in Redis can block a client forever, and why you should an...
api-tasarimi backend guvenilirlik
Read more →
September 28, 2026
PostgreSQL Connection Pooling: PgBouncer's Three Modes, the Prepared Statement Trap and Multi-Tenant Sizing
How to choose between session, transaction and statement modes, what breaks in transaction mode, why the prepared statement error only appears under load, and h...
postgresql performans multi-tenant
Read more →
September 25, 2026
Zero-Downtime Schema Migrations: Expand and Contract, Locks and PostgreSQL Pitfalls
Rolling deploys are not enough; a schema change breaks the moment old and new versions run side by side. How to migrate PostgreSQL without downtime using expand...
postgresql backend saas
Read more →
September 2, 2026
Queues and Async Job Processing: Where They Help, Where They Hurt
Pushing every slow operation into a queue does not remove complexity, it relocates it. A practical look at when async processing actually pays off, what deliver...
backend mimari kuyruk
Read more →