The atomic counter that didn't need Redis
You're tracking page views. The textbook says: stand up Redis. Configure persistence. Add a client library. Manage a connection pool. Add it to your monitoring.
Or: POST /api/v1/sqlite/kv/views:homepage/incr?db=app.db. That's it. The counter increments atomically inside SQLite. A thousand parallel requests turn into a thousand exact increments: never 998, never 1002. The same URL pattern works for likes, credits, inventory, rate-limit buckets, anything that needs n+1 to mean n+1.
You delete the Redis line item from your stack diagram. You delete the redis-server lines from your docker-compose. You delete the connection-pool config. You delete the client library from package.json. The counter still works, only now it's also durable, observable, and queryable from any device.
Your counter is a URL, your increment is a POST, your race conditions are someone else's problem.