Counters That Disagree Across Workers
Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.
The problem
- hard
- Pro
A Flask app counts requests and caches user settings in module-level dictionaries. It works on a laptop, but in production behind Gunicorn with four worker processes, the request count jumps around and users sometimes see their old settings after saving. Explain why, and how to fix it.
Talk this problem through with an AI coach
This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.