The reason Redis solves so many problems is that it isn't one thing, it's a collection of data structures, each with commands tuned for a specific access pattern. Picking the right structure for a problem is most of using Redis well, because the right one makes an operation atomic and instant, while the wrong one turns it into a slow read-modify-write dance in your application. This article is the map: what each core structure is, and the kind of problem it's shaped for. The next several articles go deep on each.
This is part 2 of the Redis Masterclass, following what Redis is.
Strings: the simplest value
A Redis string is a value up to 512MB, holding text, a number, JSON, or binary data. Despite the name, strings are also how you store counters, because Redis has atomic increment commands:
SET user:1:name "Aman"






