My name is Mumshad Mannambeth. In this lesson/article we will explore microservices architecture by using a compact, multi-component sample web application and then deploy that application. This sample is commonly used to demonstrate Docker and microservice patterns (see the linked Docker training below) and is ideal for showing how small services interact via shared infrastructure.

- The sample is a voting application that demonstrates a microservices-style stack built from several small components implemented in different languages and platforms.
- It is intentionally compact so you can focus on deployment, inter-service communication, and operational concerns instead of application complexity.
- Core features provided by the sample:
- a web UI to submit votes,
- a background worker to process votes,
- a persistent database to store aggregated results, and
- a web UI to display results.
How data flows through the system
- A user chooses an option in the Voting app (e.g., “cats”).
- The Voting app writes the vote into Redis, allowing the front-end to respond quickly without waiting for a database transaction.
- The Worker consumes the vote message from Redis, processes it, and increments the corresponding counters in PostgreSQL.
- The Results app queries PostgreSQL and displays the updated aggregated totals to users.
- Decoupled front-ends and background workers via a messaging/queue layer (Redis).
- Short-lived, in-memory buffering for responsiveness.
- A single durable datastore for aggregated state and queries.
- Package each component as a container image.
- Deploy the stack (Redis, PostgreSQL, voting app, worker, results app) to a container platform.
- Observe and verify end-to-end behavior by voting through the UI and seeing the results update.
This lesson uses a multi-service sample to illustrate microservice patterns: decoupled front-ends, asynchronous processing via Redis, and a persistent datastore for aggregates. Use this stack to practice packaging, deployment, networking, and observability for microservices.
- Docker Training Course for the Absolute Beginner
- Redis: https://redis.io/
- PostgreSQL: https://www.postgresql.org/
- Python: https://www.python.org/
- Node.js: https://nodejs.org/
- .NET: https://dotnet.microsoft.com/