All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Benchmarking Redis vs PostgreSQL for caching: An experimental comparison

By

redbell

8mo ago· 8 min readenInsight

Summary

A technical experiment comparing Redis and PostgreSQL (using unlogged tables) for caching use cases in API servers. The author runs both databases on a Kubernetes cluster with 2 CPU limits, building a simple HTTP server to test performance differences between Redis and Postgres as a cache layer.

Key quotes

· 3 pulled
I thought I'd take a look at one use case - using Postgres instead of Redis for caching.
I'd start from Redis as this is something I frequently encounter at work, switch it out to Postgres using unlogged tables and see if there's a difference.
The idea is to run Postgres or Redis on one node, limiting it to 2CPUs via k8s limits
Snippet from the RSS feed
There are books & many articles online, like this one arguing for using Postgres for everything. I thought I’d take a look at one use case - using Postgres instead of Redis for caching. I work with APIs quite a bit, so I’d build a super simple

You might also wanna read