From Waiting to Working: Building Responsive AI Features in Rails
A deep dive into architectural patterns using ActiveJob and Redis to solve LLM latency, moving from an 8-second wait to a sub-50ms cached response.
Read article →A deep dive into architectural patterns using ActiveJob and Redis to solve LLM latency, moving from an 8-second wait to a sub-50ms cached response.
Read article →Efficient data fetching is only half the battle. This post explores the art of client-side caching, from the magic of normalized data in Apollo/Relay to bulletproof invalidation strategies and SSR hydration. Learn why great caching is as much about predictability as it is about performance.
Read article →Peak traffic was crushing our API—P95 latency at 450ms, dashboards taking 5 seconds to load, and users complaining of “slow mornings.” By introducing a Redis caching layer designed around real access patterns, not just generic key-value storage, we cut P95 latency in half, reduced DB CPU load from 85% to 45%, and eliminated the majority of timeouts. This is the story of how intentional caching turned a struggling system into one that scaled gracefully.
Read article →Effective caching strategies require intentional design to prevent memory waste and stale data issues. Implementation guidelines include evaluating query cost, frequency of access, data predictability, TTL settings, and scope management for optimal Redis performance.
Read article →