Medium Database Systems NoSQL Databases
What data structures does Redis support and when would you use each?
Answer
Redis supports: Strings (caching, counters), Lists (queues, timelines), Sets (unique items, tags), Sorted Sets (leaderboards, rate limiting), Hashes (objects, user sessions), Bitmaps (flags, bloom filters), HyperLogLog (cardinality estimation), Streams (event sourcing, logs). Use Strings for simple caching, Sorted Sets for ranked data with scores, Hashes for structured objects, Lists for FIFO queues. Pub/Sub enables messaging. Choose based on access patterns.
IIT Certified
Master These Concepts with IIT Certification
175+ hours of industry projects. Get placed at Bosch, Tata Motors, L&T and 500+ companies.
Relevant for Roles
Software Engineer Backend Developer Systems Engineer