Menu
Back to Discussions

Database read scaling: when caching isn't enough

Gabriela Hassan
Gabriela Hassan
·175 views
We're running into a wall with database read scaling, even with extensive Redis caching. Our main PostgreSQL replicas are consistently hitting 80% CPU utilization, despite us caching pretty much everything that can be cached. The issue is these 'long-tail' or uncacheable queries: complex search queries with multiple filters, heavily paginated and sorted lists, or personalized recommendations that are unique to each user. These types of queries hit the database directly, often performing expensive joins or full table scans, making caching ineffective or impossible. We've considered a few paths forward: moving some search-like functionality to Elasticsearch, implementing materialized views for frequently requested aggregated data, or even a 'CQRS-lite' approach where specific read models are denormalized and stored in more read-optimized stores. Caching is great for hot keys, but for the diverse, dynamic read patterns of a large system, it eventually falls short. What strategies have proven most effective for scaling reads when your caching layer just isn't enough anymore?
3 comments

Comments

Sign in to join the conversation.

Loading comments...