Posts

Showing posts from October, 2017

Benchmarking Redis vs Memcached for Session Storage (2017 Systems Notes)

Notes from our server logs during the 2017 infrastructure upgrade cycle regarding persistence guarantees, eviction policies, and memory fragmentation. When you maintain production environments over years of kernel releases, documenting these low-level interactions saves countless hours during emergency maintenance windows. Always verify your sysctl buffers and process memory limits against actual workload metrics rather than copying outdated configuration snippets from old forum threads.

Redis Persistent Connection Pooling: Eliminating TCP Handshake Overhead (Vol. 4)

Image
Installing Redis or Memcached is the single most effective way to eliminate repetitive MySQL query cycles. However, naive implementations that open and close a new TCP socket on every dynamic request end up shifting the bottleneck from the database to the networking stack. Monitoring Linux kernel thread allocation and socket buffer exhaustion. Production Architecture & Empirical Constraints Under heavy traffic, creating ephemeral TCP connections leaves hundreds of sockets lingering in TIME_WAIT status. Switching to persistent connections via local Unix domain sockets ( /var/run/redis/redis.sock ) eliminates network stack overhead and shaves 15ms to 30ms off each worker execution loop. Engineering robust production environments requires adherence to proven industry specifications like Redis in-memory caching rather than guessing resource limits. In real-world enterprise deployments, throughput is determined by queue latency and active worker memory consumption. Fo...