Skip to main content
Mark Ku's Blog

Incident

On Black Friday (US time) 2023, I got a call early in the morning. The site was running discounts of $400–650 USD, and a massive wave of traffic hit all at once — orders were coming in every second, many times the normal volume. The site loaded pages fine, but failed to retrieve real-time inventory from Redis correctly. This left users stuck on a loading spinner while the cart waited for inventory data from Redis, preventing them from adding items to their cart.

image
image

Root Cause Analysis

Investigation revealed that three Redis instances were experiencing sync failures. After analyzing hardware performance, we found that these three Redis slave containers were all running inside a nested Hyper-V host. They shared a single NIC, and the Windows host had only 16 GB of RAM allocated — with Docker Desktop capped at 8 GB. Utilization was near 100% across the board.

The conclusion was that insufficient memory was the primary cause of the sync anomaly. As an immediate fix, we shut down one Redis container on that host to free up resources so the remaining containers could operate normally.

image
image

Remediation Plan

Short-Term

  • Shut down one instance to allow the host to function properly.
  • Increase available memory.

Medium-Term

  • Replace the resource-heavy nested Hyper-V setup with Nginx.
  • Tune Redis cache eviction settings to release memory from unused keys.

Long-Term

  • Consider adopting Redis Cluster with sharding.
  • Replace Windows Server containers with Linux containers.
  • Introduce Kubernetes for automated deployment, scaling, and container management.

References

Author

Mark Ku

10 年以上的軟體工程師,做過北美電商與 AI SaaS 訂閱收費系統。Read More

Found this useful?

The author's free tools, daily podcasts and newsletter are all here.

Mark Ku · This article is licensed under CC BY 4.0. Credit the author and link back to the original when reusing it.

Comments

Subscribe to Newsletter

Subscribe to get new posts delivered instantly — never miss a tech share.

By submitting, you agree to receive emails. You can anytime.

Popular Posts

View all
Mark Ku
··647

Oracle Cloud Always Free Tier: Linux Host and Static IP for a $0 Cloud Solution

Oracle Cloud Always Free Tier: Linux Host and Static IP for a $0 Cloud Solution
Mark Ku
··465

Say Goodbye to Postman's Fee Trap! A Hands-on Guide to Bruno, the Open-Source Git-Native API Testing Powerhouse.

Say Goodbye to Postman's Fee Trap! A Hands-on Guide to Bruno, the Open-Source Git-Native API Testing Powerhouse.
Mark Ku
··277

A Free, Open-Source, Notion-like Knowledge Base — A Complete Guide to Deploying and Backing Up Outline Wiki

A Free, Open-Source, Notion-like Knowledge Base — A Complete Guide to Deploying and Backing Up Outline Wiki
Mark Ku
··216

Building an Efficient API Management Platform: Deploying Kong Gateway from Scratch - Part 1

Building an Efficient API Management Platform: Deploying Kong Gateway from Scratch - Part 1
Mark Ku
··210

Training Your Own AI Voice: Hardware Requirements, Open-Source Model Comparison, and LoRA Fine-Tuning

Training Your Own AI Voice: Hardware Requirements, Open-Source Model Comparison, and LoRA Fine-Tuning
Mark Ku
··209

Setting Up Samba on Ubuntu to Share Folders with Windows 11

Setting Up Samba on Ubuntu to Share Folders with Windows 11