Skip to main content
InterviewHubPRO
Section Overview
Q6

Question 6 of 50

Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

12%
Redis & Caching (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

What is the Redis serialization protocol (RESP)?

junior LevelredisBasic

In Simple Words: RESP (REdis Serialization Protocol) is the human-readable, high-speed binary-safe text protocol Redis uses over TCP:

  • Simple Strings start with + (e.g. +OK\r\n).
  • Errors start with - (e.g. -ERR unknown command\r\n).
  • Integers start with : (e.g. :1000\r\n).
  • Bulk Strings start with $ followed by byte length (e.g. $4\r\ncode\r\n).
  • Arrays start with * followed by element count (e.g. *2\r\n$3\r\nfoo\r\n$3\r\nbar\r\n).