Can Postgres replace Redis as a cache?

Published: 14 July 2024
on channel: Coding with Raphael De Lio
9,413
194

I recently came across an article that encouraged us to replace everything with Postgres. It is mentioned in the article that Redis can be replaced by UNLOGGED tables and stored procedures. Is that so? That's what I want to find out today.

00:00 Introduction
01:53 Why would I want to replace Redis with Postgres?
03:13 What should I expect from a caching service?
04:55 How can I turn Postgres into a cache?
05:19 Unlogged tables and Write Ahead Log
07:00 Expiration with Stored Procedures
07:57 Eviction with Stored Procedures
08:29 What about the performance?
08:59 But what about reading performance?
10:09 How does the performance compare to Redis?
10:55 What if I run Postgres in RAM?
10:50 Should I replace Redis with Postgres?
13:07 Ending

Benchmark experiments: https://github.com/raphaeldelio/redis...

@Redisinc

The content of this video is also available as a Medium article:
  / understanding-redis-streams  

Follow me on social networks:
  / raphaeldelio  
  / raphaeldelio  
https://github.com/raphaeldelio
  / raphaeldelio  

Consider buying me a coffee: https://www.buymeacoffee.com/RaphaelD...

Or sending me BitCoin: bc1qvdku97kg9gykg833zfvun3mjv4c6r2fl7ut4tl


On this page of the site you can watch the video online Can Postgres replace Redis as a cache? with a duration of hours minute second in good quality, which was uploaded by the user Coding with Raphael De Lio 14 July 2024, share the link with friends and acquaintances, this video has already been watched 9,413 times on youtube and it was liked by 194 viewers. Enjoy your viewing!