What are Distributed CACHES and how do they manage DATA CONSISTENCY?

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 พ.ค. 2024
  • Caching in distributed systems is an important aspect for designing scalable systems. We first discuss what is a cache and why we use it. We then talk about what are the key features of a cache in a distributed system.
    The cache management policies of LRU and Sliding Window are mentioned here. For high performance, the cache eviction policy must be chosen carefully. To keep data consistent and memory footprint low, we must choose a write-through or write-back consistency policy.
    Cache management is important because of its relation to cache hit ratios and performance. We talk about various scenarios in a distributed environment.
    System Design Video Course:
    interviewready.io
    00:00 Who should watch this video?
    00:18 What is a cache?
    02:14 Why not store everything in a cache?
    03:00 Cache Policies
    04:49 Cache Evictions and Thrashing
    05:52 Consistency Problems
    06:32 Local Caches
    07:49 Global Caches
    08:56 Where should you place a cache?
    09:35 Cache Write Policies
    11:38 Hybrid Write Policy?
    13:10 Thank you!
    A complete course on how systems are designed. Along with video lectures, the course has architecture diagrams, capacity planning, API contracts, and evaluation tests.
    System Design Playlist: • System Design for Begi...
    Code: github.com/coding-parrot/Low-...
    You can follow me on:
    Facebook: / gkcs0
    Quora: www.quora.com/profile/Gaurav-...
    LinkedIn: / gaurav-sen-56b6a941
    Twitter: / gkcs_
    References:
    Guava Cache - github.com/google/guava/wiki/...
    LRU - www.mathcs.emory.edu/~cheung/C...
    en.wikipedia.org/wiki/Cache_r...
    Implementation of Sliding Window Cache policies (Caffeine) - github.com/ben-manes/caffeine
    highscalability.com/blog/2016/...
    docs.microsoft.com/en-us/prev...)
    #SystemDesign #Caching #DistributedSystems

ความคิดเห็น • 525

  • @VrajaJivan
    @VrajaJivan 5 ปีที่แล้ว +467

    Gaurav nice video. One comment. Writeback cache refers to writing to cache first and then the update gets propagated to db asynchronously from cache. What you're describing as writeback is actually write-through, since in write through, order of writing (to db or cache first) doesn't matter.

    • @gkcs
      @gkcs  5 ปีที่แล้ว +56

      Ah, thanks for the clarification!

    • @KumarAbhishek123
      @KumarAbhishek123 5 ปีที่แล้ว +37

      Yes, would be great if you can add a comment saying correction about the 'Write back cache'. Thanks for the great video!

    • @gururajsridhar7314
      @gururajsridhar7314 5 ปีที่แล้ว +8

      I agree.. a comment in the video correcting this would be good update to this.

    • @mrityunjoynath7673
      @mrityunjoynath7673 4 ปีที่แล้ว +2

      So Gaurav was also wrong in saying "write-back" is a good policy for distributed systems?

    • @jyotipandey9218
      @jyotipandey9218 4 ปีที่แล้ว

      @Gaurav Yes that would be great. That part was confusing, had to read about that separately.

  • @waterislife9
    @waterislife9 3 ปีที่แล้ว +280

    Write-through: data is written in cache & DB; I/O completion is confirmed only when data is written in both places
    Write-around: data is written in DB only; I/O completion is confirmed when data is written in DB
    Write-back: data is written in cache first; I/O completion is confirmed when data is written in cache; data is written to DB asynchronously (background job) and does not block the request from being processed

  • @GK-rl5du
    @GK-rl5du 5 ปีที่แล้ว +479

    Other variants
    1. There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors.
    2. There are only two hard problems in distributed systems: 2. Exactly-once delivery 1. Guaranteed order of messages 2. Exactly-once delivery

    • @gkcs
      @gkcs  5 ปีที่แล้ว +13

      Hahahaha!

    • @GK-rl5du
      @GK-rl5du 5 ปีที่แล้ว +40

      @@gkcs A humble suggestion, I think you should have a sub-reddit for the channel, because these are such critical topics [not just for cracking interviews], I'm sure they'd definitely encourage healthy discussions. I think YT's comment system is not really ideal to have/track conversations with fellow channel members.

    • @RAJATTHEPAGAL
      @RAJATTHEPAGAL 4 ปีที่แล้ว +1

      This is an underrated comment .... 😂😂😂

    • @kumarakantirava429
      @kumarakantirava429 4 ปีที่แล้ว +1

      ​@@gkcs Can you please give some hints on WHY "out of order Delivery" is a problem in distributed systems, if the application is running on TCP ..................PLease Kindly reply.

    • @kumarakantirava429
      @kumarakantirava429 4 ปีที่แล้ว

      @goutham Kolluru , Can you please give an hint on WHY "out of order Delivery" is a problem in distributed systems, if the application is running on TCP ..................PLease Kindly reply.

  • @mengyonglee7057
    @mengyonglee7057 ปีที่แล้ว +35

    Notes:
    In Memory Caching
    - Save memory cost - For commonly accessed data
    - Avoid Re-computation - For frequent computation like finding average age
    - Reduce DB Load - Hit cache before querying DB
    Drawbacks of Cache
    - Hardware (SSD) much more expensive than DB
    - As we store more data on cache, search time increases (counter productive)
    Design
    - Database (Infinite information) vs Cache (Relevant information)
    Cache Policy
    - Least Recently Used (LRU) - Top entires are recent entries, remove least recently used entries in cache
    Issue with caches
    - Extra calls - When we couldn’t find entry in cache, we query from database.
    - Threshing - Input and output cache without ever using results
    - Consistency - When update DB, we must maintain consistency between cache and DB
    Where to place the cache
    - Close to server (in memory)
    - Benefit - Fast
    - Issue - Maintaining consistency between memory of different servers, especially for sensitive data such as password
    - Close to DB (global cache, i.e. Redis)
    - Benefit - Accurate, Able to scale independently
    Write-through vs Write-back
    - Write-through - Update cache, before updating DB
    - Not possible for multiple servers
    - Write-back - Update DB, before updating cache
    - Issue: Performance - When we update the DB, and we keep updating the cache based on that, much of the data in the cache will be fine and invalidating them will be expensive
    - Hybrid
    - Any update first write to cache
    - After a while, persist entries in bulk to database

    • @pushp3593
      @pushp3593 4 หลายเดือนก่อน

      nice, but write through and write back notes part is wrong, pls correct it. you can check other comments. thanks

    • @cheerladinnemouli2864
      @cheerladinnemouli2864 2 หลายเดือนก่อน

      Nice notes

  • @mannion1985
    @mannion1985 4 ปีที่แล้ว +14

    I can already hear the interviewer asking "with the hybrid solution: what happens when the cache node dies before it flushes to the concrete storage?" You said youd avoid using that strategy for sensitive writes but you'd still stand to lose upto the size of the buffer you defined on the cache in the e entire of failure. You'd have to factor that risk into your trade off. Great video, as always. Thank you!

  • @AnonyoX
    @AnonyoX 4 ปีที่แล้ว +12

    Great video. But I wanted to point out that, I think what you are referring to as 'write-back' is termed as 'write-around', as it comes "around" to the cache after writing to the database. Both 'write-around' and 'write-through' are "eager writes" and done synchronously. In contrast, "write-back" is a "lazy write" policy done asynchronously - data is written to the cache and updated to the database in a non-blocking manner. We may choose to be even lazier and play around with the timing however and batch the writes to save network round-trips. This reduces latency, at the cost of temporary inconsistency (or permanent if the cache server crashes - to avoid which we replicate the caches)

  • @jsf17
    @jsf17 3 ปีที่แล้ว +2

    The world needs more people like you. Thank you!

  • @legozxx6655
    @legozxx6655 5 ปีที่แล้ว +2

    Great explanation. You are making my revision so much easier. Thanks!!

  • @SatyadeepRoat
    @SatyadeepRoat 3 ปีที่แล้ว

    I am actually using write back redis in our system but this video actually helped me to understand what's happening overall. GReat video

  • @bhavyeshvyas2990
    @bhavyeshvyas2990 5 ปีที่แล้ว +3

    Dude you are the reason for my system design interest Thanks and never stop making system design videos

  • @kabooby0
    @kabooby0 3 ปีที่แล้ว +4

    Great content. Would love to hear more about how to solve cached data inconsistencies in distributed systems.

  • @jajasaria
    @jajasaria 5 ปีที่แล้ว +2

    always watching your videos. topic straight to the point. keep uploading man. thanks always.

  • @devinsills1281
    @devinsills1281 2 ปีที่แล้ว +3

    A few other reasons not to store completely everything in cache (and thereby ditching DBs altogether) are (1) durability since some caches are in-memory only; (2) range lookups, which would require searching the whole cache vs a DB which could at least leverage an index to help with a range query. Once a DB responds to a range query, of course that response could be cached.

  • @an_R_key
    @an_R_key 4 ปีที่แล้ว

    You articulate these concepts very well. Thanks for the upload.

  • @mayankvora8329
    @mayankvora8329 2 ปีที่แล้ว

    I don't know how people can dislike your video Gaurav, you are a master at explaining the concepts.

  • @anjurawat9274
    @anjurawat9274 4 ปีที่แล้ว +1

    I watched this video 3 times because of confusion but ur pinned comment saved my mind
    thank you sir

  • @rahuljain5642
    @rahuljain5642 2 ปีที่แล้ว +6

    If someone explains any concept with confidence & clarity like you in the interview, he/she can rock it seriously. Heavily inspired by you & love your content of system design. Thanks for the effort @Gaurav Sen

  • @Sound_.-Safari
    @Sound_.-Safari 3 ปีที่แล้ว

    Cache doesn’t stop network calls but does stop slow costly database queries. This is still explained well and I’m being a little pedantic. Good video, great excitement and energy.

  • @vakul121
    @vakul121 4 ปีที่แล้ว +1

    It is a really great video.Finally found a detailed video.Thank you for sharing your knowledge!!

  • @rajeevkulkarni2888
    @rajeevkulkarni2888 2 ปีที่แล้ว +1

    Thank you so much for these videos!. Using this I was able to pass my system design interview.

  • @enfieldli9296
    @enfieldli9296 2 ปีที่แล้ว

    I just can't find a better content on YT than this, thanks man!

  • @harisridhar6698
    @harisridhar6698 2 ปีที่แล้ว +1

    Hi Gaurav - good video on distributed caching! This expands a bit more on what I learned in my computer architecture class - I didn't recall thrashing the cache too well, or what distinguished write-through vs. write-back. I think learning caching in the context of networks is more interesting, since it was initially introduced as a way to avoid hitting disk ( on a single machine ), but is also a way to reduce network calls invoked from server to databases.

  • @semperfiArs
    @semperfiArs 5 ปีที่แล้ว +3

    Extremely good video series bro. Just subscribed yesterday and loving it so far. Suggest you to start a interview series where you can answer a few important questions. Will be helpful.

  • @user-oy4kf5wr8l
    @user-oy4kf5wr8l 4 ปีที่แล้ว +19

    each of ur videos, i watched ay least twice lol, thank you!! WE ALL LOVE U! U R THE BEST!

    • @rishiraj9131
      @rishiraj9131 2 ปีที่แล้ว +2

      I also watch his videos mamy times.
      At least 4 times to be precise.

  • @zehrasubas9768
    @zehrasubas9768 4 ปีที่แล้ว +8

    Hi Guarav, I really like your videos thank you for sharing! I need to point out something about this video. Writing directly do DB and updating cache after, is called write around not write back. The last option you have provided, writing to cache and updating DB after a while if necessary, is called write back

    • @gkcs
      @gkcs  4 ปีที่แล้ว +1

      Thanks Zehra 😁

  • @kfqfguoqf
    @kfqfguoqf 4 ปีที่แล้ว +1

    Your System Design videos are very good and helpful, thanks!

  • @aswath_s
    @aswath_s 3 ปีที่แล้ว

    Awesome explanation gaurav. You're cool man. We want a lottt more from you. We admire your ability to explain topics with great simplicity.

  • @neeraj91mathur
    @neeraj91mathur 3 ปีที่แล้ว +1

    Nice video Gaurav, really like your way of explaining. Also, the fast forward when you write on board is great editing, keeps the viewer hooked.

  • @akash.vekariya
    @akash.vekariya 3 ปีที่แล้ว +16

    This man is literally insane in explanation 🔥

  • @muhammadanas11
    @muhammadanas11 3 ปีที่แล้ว +1

    The way you explained concepts is AWSOME.
    Can you please create a video that decribes DOCKER and Containers in your style.

  • @Not0rious7
    @Not0rious7 3 ปีที่แล้ว

    You continue to offer great content. thank you !

  • @prakharpanwaria
    @prakharpanwaria 2 ปีที่แล้ว +1

    Good video around basic caching concepts. I was hoping to learn more about Redis (given your video title)!

  • @pat2715
    @pat2715 3 หลายเดือนก่อน

    amazing clarity, intuitive explanations

  • @happilysmpl
    @happilysmpl 2 ปีที่แล้ว

    Excellent! Great video with tremendous info and design considerations

  • @renon3359
    @renon3359 5 ปีที่แล้ว +4

    Keep making these videos brother, great job as always. :)

  • @muraliboddu4007
    @muraliboddu4007 2 ปีที่แล้ว

    nice quick video to get an overview. thanks Gaurav. you are helping a lot of people.

  • @andreigatej6704
    @andreigatej6704 5 ปีที่แล้ว

    Very well explained! Thank you

  • @codingart7736
    @codingart7736 5 ปีที่แล้ว +1

    Loved your sharing
    Thanks a lot

  • @oscarjesusresendiz100
    @oscarjesusresendiz100 4 ปีที่แล้ว

    Great explanation Dude! You killed it!

  • @rishiraj1616
    @rishiraj1616 5 ปีที่แล้ว

    This is my video on your channel and I must say that you explain very well! You seem professional, knowledgable and researched your topic well!

  • @sandeepk9640
    @sandeepk9640 3 ปีที่แล้ว

    Nicely packed lot of information for glimpse.. Great work

  • @TheHalude
    @TheHalude 4 ปีที่แล้ว

    Thanks this was a good video for a high level overview of cache, easy to follow,

  • @ashwinasokan
    @ashwinasokan ปีที่แล้ว

    Bhai. u r a life saver! Brilliant tutoring. Thank you!

  • @manasbudam7192
    @manasbudam7192 4 ปีที่แล้ว +1

    What you explained as write-back cache is actually a write-around cache. In write-back cache...you update only the cache during the write call and update the db later (either while eviction or periodically in the background).

  • @JinkProject
    @JinkProject 4 ปีที่แล้ว +11

    this video was gold. studying for my facebook on-site and i need to understand a bit more how backend works. cheers @gaurav sen

  • @1970mcgraw
    @1970mcgraw 3 ปีที่แล้ว

    Excellent info and presentation - thanks!

  • @asankaherath1744
    @asankaherath1744 3 หลายเดือนก่อน

    Thank you so much..! your videos are really valuable. Really appreciate your effort, sir.!!

  • @CloudXpat
    @CloudXpat 3 ปีที่แล้ว

    Great explanation for caching. I believe you'll go far.

  • @souradiptachoudhuri4724
    @souradiptachoudhuri4724 5 ปีที่แล้ว

    This video is just awesome. Thank you

  • @nishantmahajan55
    @nishantmahajan55 4 ปีที่แล้ว

    Very helpful and to the point. Thanks.

  • @psrajput09
    @psrajput09 5 ปีที่แล้ว +5

    Superb, now I started using my free time to learn something ! Thanks!!!

  • @GustavoRodrigues-le3zw
    @GustavoRodrigues-le3zw 2 ปีที่แล้ว

    Amazing Explanation!! Thanks!!

  • @NohandleReqd
    @NohandleReqd 2 ปีที่แล้ว +1

    Teaching and learning are processes. Gaurav makes it fun to learn about stuff, then let it be systems or the egg dropping problem.
    I might just take the InterviewReady course to participate in the interactive sessions.
    Take a bow!

  • @RpraneelK
    @RpraneelK 2 ปีที่แล้ว

    Very informative and concepts explained clearly. Thanks

  • @rahulchawla6696
    @rahulchawla6696 ปีที่แล้ว

    wonderfully explained. thanks

  • @OwenValentine
    @OwenValentine 4 ปีที่แล้ว +5

    Gaurav, what you initially described as write-back at around 10:30 I have seen described as write-around. Write-back is where you write to the cache and get confirmation that the update was made, then the system copies from the cache to the database (or whatever authoritative data store you have) later... be it milliseconds or minutes later. Write through is reliable for things that have to be ACID but it is slower than write back. You later describe what I have always heard as write-back at around 12 and a half minutes

    • @gkcs
      @gkcs  4 ปีที่แล้ว

      Yes, I messed up with the names. Thanks for pointing it out 😁

  • @akashnag3879
    @akashnag3879 5 ปีที่แล้ว +2

    Loved it.. Thank you for such amazing video.. keep coming up with more.

  • @grijeshmnit
    @grijeshmnit 4 ปีที่แล้ว +1

    Your explanations are improved a lot now... correct sequence of information was missing in your earlier vdos...
    May you can improve your flow chart, fig further for less confusing...

  • @silentknight2851
    @silentknight2851 4 ปีที่แล้ว +1

    hey Gaurav, for holidays I'll watch your videos day in and day out... So please teach new topics asap.
    I love to listen you

  • @jatinchugh373
    @jatinchugh373 5 ปีที่แล้ว

    dude your content is amazing

  • @ShaliniNegi24
    @ShaliniNegi24 4 ปีที่แล้ว

    Nice Explanation!
    Thanks :)

  • @i2chang
    @i2chang 4 ปีที่แล้ว +1

    Thank you, this video is very good!

  • @kevinz1991
    @kevinz1991 2 ปีที่แล้ว

    learned a ton in this video thanks so much

  • @CodeSbyAniz
    @CodeSbyAniz 3 ปีที่แล้ว

    You have explained it very nicely. Thanks.

  • @jayantsogani8389
    @jayantsogani8389 5 ปีที่แล้ว +9

    Thanks Gaurav, your lecture helped me to crack MS. Keep posting video's

    • @gkcs
      @gkcs  5 ปีที่แล้ว +2

      Congrats!

    • @shubham.1172
      @shubham.1172 4 ปีที่แล้ว

      Are you in the Hyd campus?

  • @jask00
    @jask00 5 ปีที่แล้ว +1

    Great job. Really well explained

  • @Satu0King
    @Satu0King 4 ปีที่แล้ว +50

    Description for write back cache is incorrect.
    Write-back cache: Under this scheme, data is written to cache alone and completion is immediately confirmed to the client. The write to the permanent storage is done after specified intervals or under certain conditions. This results in low latency and high throughput for write-intensive applications, however, this speed comes with the risk of data loss in case of a crash or other adverse event because the only copy of the written data is in the cache.

    • @gkcs
      @gkcs  4 ปีที่แล้ว +8

      Thanks for pointing this out Satvik 😁👍

    • @justinmancherje6168
      @justinmancherje6168 4 ปีที่แล้ว +4

      I believe the description in the video given for write-back cache is actually a write-around cache (according to grokking system design)

    • @mostinho7
      @mostinho7 3 ปีที่แล้ว

      What if the cache itself is replicated? Will write-back still has risk of data loss

    • @arpansen964
      @arpansen964 2 ปีที่แล้ว

      Yes, as per my understanding, write-through cache : when data is written on the cache it is modified in the main memory, write back cache: when dirty data (data changed) is evicted from the cache , it is written on the main memory, so write back cache will be faster. The whole explanation around there two concepts given in this video seems fuzzy.

  • @michaelscheppert3664
    @michaelscheppert3664 2 ปีที่แล้ว

    thanks for this quick tutorial :) your English is really good

  • @sirunworld
    @sirunworld 3 ปีที่แล้ว

    Great going, Gaurav. You have a great future!

  • @djanupamdas
    @djanupamdas 5 ปีที่แล้ว

    I think simply telling THANK YOU will be very less for this help !!! Superb video.

    • @gkcs
      @gkcs  5 ปีที่แล้ว

      Glad to help :)

    • @jagatsastry
      @jagatsastry 4 ปีที่แล้ว

      I mean you can always do more by becoming a channel member 😄

  • @ananava254
    @ananava254 3 ปีที่แล้ว

    Thank you Gaurav, it was a really good explanation

  • @rsragsh55
    @rsragsh55 4 ปีที่แล้ว

    Hi Gaurav,
    Your videos are awesome and of great help.
    Would really appreciate if you could make a video regarding ''how to get aws certification''.

  • @siris3957
    @siris3957 4 ปีที่แล้ว

    You explain so well! :) Thank you

    • @gkcs
      @gkcs  4 ปีที่แล้ว

      Thanks!

  • @sharifulhaque6809
    @sharifulhaque6809 3 ปีที่แล้ว

    Very easy understanding Gaurav. Thanks a lot !!!

  • @shreyasns1
    @shreyasns1 2 ปีที่แล้ว +1

    Thank you for the video. You could have gone a little deeper about how the cache is implemented? What’s the underlying data structure of the cache?

  • @ivandrofly
    @ivandrofly 4 ปีที่แล้ว +1

    My boy look very energized... keep it up!

    • @gkcs
      @gkcs  4 ปีที่แล้ว +1

      😁

  • @mana5473
    @mana5473 2 ปีที่แล้ว

    Great video, thank you!

  • @chriszeng5406
    @chriszeng5406 4 ปีที่แล้ว

    Good video. Thank you. From Canada.

  • @meletisflevarakis40
    @meletisflevarakis40 4 ปีที่แล้ว +1

    Your explanation is awesome. Keep it up!

    • @gkcs
      @gkcs  4 ปีที่แล้ว

      Thanks!

  • @sakshichawla3946
    @sakshichawla3946 2 ปีที่แล้ว

    Very well explained !!

  • @chenwang7194
    @chenwang7194 3 ปีที่แล้ว +3

    Nice video, thanks! For the hybrid mode, when S1 persists to DB in bulk, the S2 is still having the old data, right? How do we update S2?

  • @ravimulchandani2916
    @ravimulchandani2916 ปีที่แล้ว +1

    Nice Explanation Gaurav. This video covers basics of caching. In one of the interviews, I was asked to design the Caching System for stream of objects having validity. Is it possible for you to make some video on this system design topic?

  • @timhomstad
    @timhomstad 2 ปีที่แล้ว +1

    Do you implement caching on most systems? It will add complexity, how can you determine if it is worth the additional effort to develop.
    Love the videos by the way. These are a great learning tool, you do a great job.

  • @HasinthaWeragala
    @HasinthaWeragala 7 หลายเดือนก่อน

    well explained bhai sahib

  • @zainsyed9811
    @zainsyed9811 4 ปีที่แล้ว +1

    Awesome overview thanks. One other possible issue with write-through - it's possible to make the update to the cache then the DB update itself fails. Now your cache and db will be inconsistent.

    • @gkcs
      @gkcs  4 ปีที่แล้ว

      True 😁

  • @hareendranep8422
    @hareendranep8422 4 ปีที่แล้ว

    Very nice presentation . Simple, powerful and fast presentation. Keep up the style

    • @gkcs
      @gkcs  4 ปีที่แล้ว

      Thank you!

  • @raghavabharati
    @raghavabharati 4 ปีที่แล้ว +1

    Pls refer to the caching topic page in Educative(That you've recommended). Is the explanation in your video and that page aligned?

  • @billyean
    @billyean ปีที่แล้ว

    Explained like my interviewed candidate today.

  • @VikramKumar-qo3rg
    @VikramKumar-qo3rg 3 ปีที่แล้ว

    Fun part. I was going through 'Grokking The System Design Interview' course, found the term 'Redis', started searching for more on it on youtube, landed here, finished the video and Gaurav is now asking me to go back to the course. Was going to anyway! :)

    • @gkcs
      @gkcs  3 ปีที่แล้ว

      Hahaha!

  • @kartikpandey3631
    @kartikpandey3631 4 ปีที่แล้ว

    Hi Gaurav, great video and nice presentation skills (y). Just wanted to know if we can use write-through with global cache will it be a better approach as there will be consistency as well as high performance of write-through? and can it be used for critical data ?

  • @mkgcodes
    @mkgcodes 5 ปีที่แล้ว

    This one is very helpful for me. Many thanks Gaurav.

    • @gkcs
      @gkcs  5 ปีที่แล้ว

      Cheers!

  • @mehtabsandhu3000
    @mehtabsandhu3000 3 ปีที่แล้ว

    Awesome explanation! Thanks

    • @gkcs
      @gkcs  3 ปีที่แล้ว

      Thank you!

  • @ZALOP123
    @ZALOP123 3 ปีที่แล้ว

    @Gaurav Sen Thanks for the video. I have a question for you: I have a system where I need to cache a small amount of data (user IDs to usernames - in a map). This is so that on the front end I can populate the data with the auto-complete feature on the UI. For this scenario, would you recommend a cache infrastructure like Redis? Or could we just use a Concurrent HashMap in a programming language like Java to do this? thanks.

  • @fakhruddintahery1561
    @fakhruddintahery1561 ปีที่แล้ว

    Great explanation

  • @AbhideepChakravarty
    @AbhideepChakravarty 3 ปีที่แล้ว +1

    The draw back of write through you explained is equally applicable in Write Back i.e. I null the value in S1 still the value is not null in S2. Major thing is - Redis is not distributed cache. Even their own definition does not include the word "Distributed" - Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

  • @SuperAzizx
    @SuperAzizx 3 ปีที่แล้ว

    awesome Gaurav thanks

  • @garth3743
    @garth3743 4 ปีที่แล้ว

    nice. you have good presentation skills. keep it up

  • @muthupandi4371
    @muthupandi4371 4 ปีที่แล้ว

    Excellent explanation

  • @liba01
    @liba01 3 ปีที่แล้ว

    You are great, dude!

  • @user-jk1qi2gj2p
    @user-jk1qi2gj2p 2 ปีที่แล้ว

    Thanks for this video