After the RabbitMQ rewrite I profiled the next part of our pricing path. Redis appeared in the traces, but Redis itself was not sitting there thinking slowly. We were storing more data than the hot path needed and asking for it too many times.
We were already moving to Redis 8, so I used the migration as an excuse to fix both.
Start by storing less
The first improvement was the least exciting and probably the most important: thinner records. Some objects carried fields through the system because they had always been there, not because pricing ever read them. I split the data around actual access patterns and moved suitable structured entities to Redis JSON. Smaller documents meant less serialisation, less network traffic and less work during scans.
Redis 8 removed one workaround
Redis 8 gave me better missing-field queries through INDEXMISSING and ismissing(), which let me remove one workaround. I also moved a slowly changing reference entity from PostgreSQL into persistent Redis with a search index. It changes rarely, can be restored safely and benefits from flexible in-memory selection. Transactional state stayed where it belongs.
Then I counted round-trips
Then I counted round-trips. Several paths made many tiny reads and writes that were individually fast and collectively expensive. I replaced them with MGET, MSET and pipelines where the shape allowed it. Static reference data now loads in one pipeline and stays in a bounded client cache. Independent searches run concurrently instead of politely waiting for one another.
The best request was the deleted one
The biggest design win was deleting a fan-out completely. After adding the search index, one path that called three endpoints could answer the same question with one query. Two network trips and all the work behind them simply disappeared.
What actually improved
The final result was roughly two times lower Redis latency, a 20% faster price reindex and another improvement of about 20% in the messaging-heavy flow. Alerts became less frequent and the environment steadier.
The upgrade was not the lesson
Redis 8 helped. The larger lesson was older and less marketable: store only what the path needs, batch the operations that belong together and remove a request entirely whenever possible.
The fastest query is still the one I no longer send.