Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

Redis in 60 Second 👇 What is Redis ? Redis = REmote DIctionary Server An in-memory data store used mainly as: - Cache - Session store - Message broker - Real-time data store It’s insanely fast because data lives in RAM, not on disk. 🟢 Why Redis exists Typical...

22,337 Aufrufe • vor 8 Monaten •via X (Twitter)

21 Kommentare

Profilbild von Rahul
Rahulvor 8 Monaten

Redis is fast until you have cache invalidation problems. Then it's a minefield. The real complexity isn't using Redis, it's deciding what belongs in-memory versus persistent storage. Most teams cache too aggressively and end up with stale data issues that are harder to debug than the original latency problem they tried to solve.

Profilbild von Nandkishor
Nandkishorvor 8 Monaten

@genwinRahul Good Point Rahul

Profilbild von Jaydeep
Jaydeepvor 8 Monaten

Well explained Redis has been a gamechanger in terms of writing software. Cache invalidating remains one of the big challenges but the pros outweigh the cons

Profilbild von Nandkishor
Nandkishorvor 8 Monaten

Thanks. Yes Redis is the game-changer how smartly he is storing data in ram instead of disc so it can provide data back to the user instantly.

Profilbild von immoral cat
immoral catvor 8 Monaten

what u say if the redis down, the db also down due to cant handle real traffic?

Profilbild von Anupam
Anupamvor 8 Monaten

Great explanation. Just revised the whole thing.

Profilbild von Nandkishor
Nandkishorvor 8 Monaten

@Gooner__14 Thanks brother

Profilbild von Tech Fusionist | Kushal Gangil
Tech Fusionist | Kushal Gangilvor 8 Monaten

Very well explained 🙌

Profilbild von Dipesh
Dipeshvor 8 Monaten

I never knew that why redis is called redis. Now I know. REmote DIctionary Server

Profilbild von Nandkishor
Nandkishorvor 8 Monaten

Perfect !

Profilbild von Anas
Anasvor 8 Monaten

Well explained

Profilbild von Asaf | AI Search for SaaS
Asaf | AI Search for SaaSvor 8 Monaten

The in-memory aspect definitely makes it a top choice for reducing latency.

Profilbild von A
Avor 8 Monaten

Redis is a fast in memory data store used for caching sessions and real time applications.

Profilbild von Nandkishor
Nandkishorvor 8 Monaten

Thanks for adding Redis is save a lot of time and execute request quickly

Profilbild von Divyansh
Divyanshvor 8 Monaten

I just love these cat videos 🤣🤣. Great explanation btw

Profilbild von Nandkishor
Nandkishorvor 8 Monaten

HaHa Thanks 😹

Profilbild von Navneet
Navneetvor 8 Monaten

small thing but worth noting - Redis isn't *just* in RAM. AOF persistence can sync to disk every 1s for durability. we use this in prod and only risk losing max 1s of writes on node failure tradeoff: ~10% perf hit vs pure in-memory

Profilbild von Shefali
Shefalivor 8 Monaten

Well explained!

Profilbild von Nandkishor
Nandkishorvor 8 Monaten

Thanks Shefali.

Profilbild von Spidey
Spideyvor 8 Monaten

Redis mainly get used in interview 🤣

Profilbild von Seriou
Seriouvor 8 Monaten

good

Ähnliche Videos

Why is Redis Fast? Redis is fast for in-memory data storage. Its speed has made it popular for caching, session storage, and real-time analytics. But what gives Redis its blazing speed? Let's explore: RAM-Based Storage At its core, Redis primarily uses main memory for storing data. Accessing data from RAM is orders of magnitude faster than from disk. This is a major reason for Redis's speed. However, RAM is volatile. To persist data, Redis supports disk snapshots and append-only file logging. This combines RAM's performance with disk's permanence. There is a tradeoff though - recovery from disk is slow. If a Redis instance fails, restarting from disk can be slow compared to failing over to a replica instance fully in memory. So while Redis offers durability via disk, it comes at the cost of slower recovery. A better solution is Redis replication. With a synchronized replica kept in memory, failover is instant with no rehydration. This maintains speed and near-instant recovery. IO Multiplexing & Single-threaded Read/Write Redis uses an event-driven, single-threaded model for its core operations. A main event loop handles all client requests and data operations sequentially. This single-threaded execution avoids context switching and synchronization overhead typical of multi-threaded systems. Redis uses non-blocking I/O to handle multiple connections asynchronously. This allows it to support many client connections with very low overhead, Redis does leverage threading in certain areas: - Background tasks like taking snapshots. - I/O threads are used for certain operations. - Modules can use threads. - Since Redis 6.0, it supports multi-threaded I/O for network communication, improving performance on multi-core systems. Redis also uses pipelining for high throughput. Clients pipeline commands without waiting for each response. This allows more efficient network round trips, boosting overall performance. Efficient Data Structures Redis supports various optimized data structures, from linked lists, zip lists, and skip lists to sets, hashes, and sorted sets, among others. Each is carefully designed for specific use cases for quick and efficient data access. Over to you: With Redis now supporting some multi-threading, how should we configure it to fully utilize all the CPU cores of modern hardware when deploying in production? – Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages):

Sahn Lam

46,910 Aufrufe • vor 2 Jahren

Redis built a cache that cuts LLM costs by 70%! Production LLM apps often receive different versions of the same question. For instance, an internal developer assistant might receive: - "How do I rotate an API key?" - "Where can I replace my API key?" The wording is different, but both questions have the same answer. Prefix caching cannot handle this repeated generation because it only reuses computation when the cache matches bit-by-bit. And if the cache hits, an LLM response is still generated again. A semantic cache stores the complete question-response pair outside the model. When a query arrives, it searches for previously answered questions with similar meaning. A valid match returns the stored response with no LLM call. If you want to use this in practice, Redis already implements it as a managed service called Redis LangCache. Under the hood, LangCache embeds the incoming question, searches stored responses, and applies the configured similarity threshold and filters. A cache hit returns the earlier response. A miss falls back to the LLM, after which the new response can be stored for future requests. Redis also handles access scopes, custom filters, embedding selection, TTL, eviction, and monitoring through a REST API, without another database to deploy or manage. While the actual savings depend on how much safe repetition exists in the workload, cache-hit responses are up to 15x faster and 70% cheaper. Try Redis LangCache: I built a small interface comparing LangCache with direct LLM inference. The video below shows this in action, and I worked with Redis on this post to put it together. To dive deeper, my co-founder published a detailed article on KV, prefix, prompt, and semantic caching. Read it below.

Akshay 🚀

88,731 Aufrufe • vor 1 Monat

Redis built a cache that cuts LLM costs by 90%! Production LLM apps do not receive completely new questions every time. A customer-support assistant might receive all three of these: - "Can I get a refund after buying the monthly plan?" - "Is the monthly subscription refundable?" - "Can I cancel the plan and get my money back?" The wording is different, but the underlying question and its answer remain the same. Yet LLM apps process every version as a new request. They assemble the prompt, send it to the model, and generate an answer that may have already been generated. Prefix caching reduces part of these repeated calls. When requests begin with the same system prompt or context, the model can reuse the KV states already computed for that shared prefix. But the request still hits the LLM. The new tokens must be processed, and the complete answer must still be decoded. So even with a prefix-cache hit, there's another generation call involved. To solve this, instead of only caching computation inside the model, the application can cache the generated response outside it. When another question arrives, the system embeds it and compares it with previously answered questions. If it finds a sufficiently close match, it returns the stored response without invoking the LLM again. A cache hit removes the input tokens, output tokens, and decoding time associated with another LLM call. In practice, it is important to decide which questions can safely share an answer since a production setup needs well-tuned similarity thresholds, expiration policies, data isolation, and monitoring for incorrect matches. If you want to use this in practice, Redis already implements it as a managed service called Redis LangCache. Under the hood, it generates embeddings, searches previous responses, and returns a matching answer before another model call occurs. Redis also handles access scopes, custom filtering, TTL and eviction controls, and cache monitoring through Redis Cloud. I built an interface to compare it against direct LLM inference. The video below shows this in action, and I worked with Redis on this post to put this together. For the paraphrased question in my run, direct inference took 2.232 seconds and consumed 514 input tokens plus 250 output tokens. Redis returned the earlier response in 0.37 seconds with zero LLM input or output tokens. That was roughly 6x faster in this run. Redis reports API cost savings of up to 90% and cache-hit responses up to 15x faster. The actual result depends on how much safe repetition exists in the workload. You can try Redis LangCache here: If you want to dive deeper, I have already written a detailed breakdown of KV, prefix, prompt, and semantic caching in the article quoted below. This demo builds on the final technique and shows it running in practice. Read it below.

Avi Chawla

166,230 Aufrufe • vor 1 Monat

JWT in 60 Seconds 👇 What is JWT ? JWT = JSON Web Token A compact, URL-safe token used for: - Authentication - Authorization - Secure API communication - Identity sharing between services It is digitally signed, so it can be verified and trusted. 🟢 Why JWT exists Typical flow without JWT: User → Application → Database (Session Store) - Server stores sessions - Requires memory/storage - Hard to scale in microservices - More infrastructure complexity - Needs sticky sessions behind Load Balancer - This doesn’t scale well in distributed systems. 🟢 JWT comes into the picture - JWT is stateless authentication. New flow: User → Application → JWT → Client → API - No session stored on server - Token carries user identity & claims - Server only verifies signature - Perfect for scalable systems. 🟢 Complete JWT request flow 1️⃣ User logs in with credentials 2️⃣ Server validates user 3️⃣ Server generates JWT (Header + Payload + Signature) 4️⃣ Client stores JWT (usually in browser/app) 5️⃣ Client sends JWT in Authorization header 6️⃣ Server verifies signature 7️⃣ If valid → Access granted No database lookup for session needed. 🟢 Where JWT is used in real systems? - REST APIs - Microservices authentication - OAuth2 / SSO - API Gateways - Kubernetes dashboards - CI/CD tools - Mobile & SPA applications - Almost every modern cloud-native app uses JWT. 🟢 JWT in DevOps & System Design : As a DevOps engineer, JWT knowledge is used in: - Designing stateless applications - Scaling apps behind Load Balancers - Implementing API security - Working with IAM & OAuth providers - Securing microservices communication - Reducing session storage dependency Stateless auth = Better scalability + Simpler infrastructure Thanks for reading. Happy Learning !

Nandkishor

27,978 Aufrufe • vor 8 Monaten

Start building for an agent-first world. If you have a product, you need to start offering skills for Claude, Codex, Cursor, and any other agents. Your skills should specify: • How to navigate and use your product • Best practices the agent must follow • Detailed instructions on how to accomplish things • Anti-patterns to avoid Redis is one of the most popular in-memory data stores in the world, and they just released their agent skills. It takes one second to install, and it will turn your agent into a Senior Redis Engineer: $ npx skills add redis/agent-skills In the attached video, I show you how to install it as a plugin in Claude Code and some of its benefits. This is the easiest way to "teach" models what they don't know and keep their knowledge up to date. If you ask me, skills is literally one of the most brilliant ideas that Anthropic has put out there. If you use Redis, their skill is a must-have. If you don't, this skill will show you how to build and structure yours. Here is what their skill teaches your agent: 1. Current patterns for common use cases: caching, rate limiting, session management, vector search, semantic caching, pub/sub, streams. 2. Which data structure to use and when: hashes vs. JSON vs. sorted sets vs. vector sets. 3. Anti-patterns to avoid: no KEYS in loops, no unbounded key growth, no large values that amplify every operation. 4. Production-aware defaults: connection pooling, pipelining, cluster compatibility, error handling that doesn't silently swallow failures.

Santiago

37,546 Aufrufe • vor 8 Monaten