
This lesson walks through the components of the sample voting app and the data flow between them, then shows how to deploy the complete stack on a container platform.
How the data flows (user action → stored result):
- A user selects a choice (for example, “cat”) in the voting UI.
- The Voting web app writes the vote to Redis, acting as a fast, ephemeral queue.
- The Worker process reads new votes from Redis asynchronously.
- The Worker increments the appropriate counter in PostgreSQL.
- The Results web app queries PostgreSQL and displays the updated totals to users.
- Separation of concerns: UI, background processing, and persistence are decoupled.
- Asynchronous processing: Redis + worker reduces latency for the user-facing UI and improves throughput.
- Polyglot architecture: different services can use different runtimes (Python, Node.js, etc.), chosen for the task.
- Faster UI response time because write-heavy operations are handled asynchronously.
- Greater resilience: if PostgreSQL is slow or temporarily unavailable, Redis queues continue to accept votes.
- Better scalability: workers can be scaled independently from front-end services.
- A walkthrough of each component in the sample voting app.
- How the components talk to each other (Redis → Worker → PostgreSQL).
- Steps to containerize and deploy the full stack to a container platform.
- Docker Training Course for the Absolute Beginner
- Redis documentation
- PostgreSQL documentation
- Python official site
- Node.js official site
- Kubernetes Basics