TLDR Web Dev · MISCELLANEOUS
REDIS IS FAST - I'LL CACHE IN POSTGRES
Summary from the TLDR Web Dev newsletter
Redis and Postgres are compared as caching solutions by building a simple HTTP server and benchmarking read, write, and mixed workloads on a Kubernetes cluster. Redis consistently outperformed Postgres in terms of requests per second and latency, even with Postgres using unlogged tables for faster writes. The bottleneck for Redis was often the HTTP server's CPU, while Postgres frequently maxed out its allocated CPU resources.