Storing user feeds as JSON strings in Redis – how can I optimize this for performance and memory usage?
Optimizing JSON Storage in Redis for Feed-Based Systems
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Storing user feeds as JSON strings in Redis – how can I optimize this for performance and memory usage?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Tasadduq BurneyRank #1,427 · 1.1K reputationPosted Dec 8, 2025, 12:45 PM EST
Hey,
Hope you're keeping well.
For feed-based systems in .NET, storing large JSON blobs in Redis as plain strings is rarely optimal. If you need partial updates or selective retrieval, use RedisJSON with
NRedisStackso you can update paths atomically without reserializing the entire object. For memory efficiency, serialize withSystem.Text.JsonusingJsonSerializerOptionsto trim unnecessary properties, and consider compressing withZstdviaZstdSharpbefore storing. If feeds are immutable once written, splitting them into smaller keyed chunks (e.g., per user or time window) can reduce eviction impact and improve lookup speed underallkeys-lruorvolatile-ttl. Always benchmark serialization, compression, and Redis command latency in your ASP.NET Core application before committing to a storage strategy.Thanks and regards,
Taz