Bitbucket reduced master database load by 50% by implementing read-your-write consistency using PostgreSQL's Log Sequence Numbers (LSNs). After a user writes data, the Django middleware records the LSN of that write in Redis. On subsequent reads, the middleware queries each replica's current LSN, selects a replica that has caught up to or past the user's LSN, and routes the read there instead of the master. This avoids sending all reads to the master while still guaranteeing users see their own latest writes. The overhead is roughly 10ms per request — one Redis lookup plus parallel LSN checks across replicas — which Atlassian found acceptable. The approach leverages PostgreSQL's built-in pg_xlog_location_diff function to compare LSNs and determine replica lag.