About this course
Welcome to the Distributed Systems Lab — the practical segment of the Distributed Systems course. This lab is designed not just to explore the theory behind distributed systems, but to dive deep into how they work in practice.
Distributed systems exist in many forms — from peer-to-peer networks to large-scale cloud platforms. In this lab, we’ll focus on microservices, a popular architectural pattern that supports modularity, scalability, and independent deployment.
We’ll build and evolve a system from the ground up through a real-world inspired project: The Smart Library. Our journey will simulate how modern systems are developed and scaled in stages:
- Start with a monolithic application to understand the foundational structure.
- Refactor into microservices to improve scalability and flexibility.
- Use tools like Nginx, Docker, and Docker Swarm to manage, deploy, and scale the system.
- Learn essential system design concepts along the way.
By the end of this lab, you’ll not only understand how distributed systems are built, but you’ll have hands-on experience architecting one.
🎓 Who Is This Lab For?
This Lab is designed for anyone interested in exploring distributed systems concepts through hands-on practice. It provides a practical approach to understanding how distributed systems work in real-world environments.
🌱 This lab is perfect for:
- Technology enthusiasts eager to apply theoretical concepts in real-world scenarios
- Early-career developers looking to strengthen their backend skills
- Tech professionals passionate about modern system architecture
- Anyone who believes in learning by building practical projects
If you're curious about how modern tech giants architect their systems, how cloud-native applications function, or how to design resilient distributed services—this lab will provide hands-on experience with industry-relevant tools and practices.
🚀 What You'll Accomplish
By completing this lab journey, you'll:
- Design and deploy a complete microservice-based project
- Master container orchestration with Docker and related technologies
- Implement service discovery and load balancing with Nginx
- Apply fault tolerance and resilience patterns in distributed environments
- Gain practical DevOps experience through CI/CD implementation
- Develop a portfolio-worthy project demonstrating real-world skills
Let's transform theoretical knowledge into practical expertise! 💻✨
📚 Distributed Systems Lab — Detailed Breakdown
This lab is structured as a step-by-step journey through the lifecycle of building a distributed system with microservices.
📂 Reference Project
You will find a reference project for this lab in the following repository: Distributed Systems Project.
🚀 Phase 1: Monolithic Smart Library System
We begin with a monolithic design, where all components of the system reside in a single codebase.
You’ll Learn:
- How to structure a monolithic application
- Why monoliths become difficult to scale and maintain
- Building core modules: Users, Catalog, Borrowing
- Separation of concerns: Controller → Service → Repository layers
🧩 Phase 2: Transition to Microservices
Next, we break down the monolith into independently deployable microservices.
You’ll Learn:
- How to decompose services by business capability
- RESTful API communication between services
- Managing independent data sources
- Principles of loose coupling and bounded context
🌐 Phase 3: Reverse Proxy with Nginx
We introduce Nginx to centralize and manage access to microservices.
You’ll Learn:
- How reverse proxies work
- Nginx configuration for routing and load balancing
- Handling HTTPS and static files with Nginx
- Benefits of centralized access control and logging
🐳 Phase 4: Containerization with Docker
Now we containerize each service to ensure consistency across environments.
You’ll Learn:
- Writing Dockerfiles for services
- Managing containers, images, and networks
- Creating isolated environments for each service
⚙️ Phase 5: Managing with Docker Compose
With more services, orchestration becomes important. Enter Docker Compose.
You’ll Learn:
- Defining multi-service environments in
docker-compose.yml - Networking between services
- Simplifying development and testing
🚢 Phase 6: Orchestration with Docker Swarm (Optional)
For real-world scalability, we use Docker Swarm to orchestrate services across a cluster.
You’ll Learn:
- Setting up a Swarm cluster
- Deploying services in a distributed fashion
- Achieving high availability and self-healing systems
🧠 Group Presentation on System Design
In this collaborative exercise, teams will tackle real-world system design challenges that scale from hundreds to millions of users. Each team will:
- Select a Scalable Project: Choose from industry-relevant scenarios like social media timelines, URL shorteners, or distributed search engines
- Create a Multi-Stage Scaling Plan: Design architecture that evolves through three growth stages (1K → 100K → 1M+ users)
- Specify Technical Components: Detail infrastructure, databases, caching strategies, API design, and monitoring solutions
- Present with Diagrams: Deliver a comprehensive presentation with architecture diagrams, justifications for design choices, and analysis of potential failure points
Teams will be evaluated on their application of distributed systems principles, scalability considerations, and technical communication skills.
📚 Group Presentation on Industry Trendy Distributed Systems
Teams will deeply explore modern distributed technologies that power today's scalable applications. For this presentation:
- Research & Analyze: Thoroughly investigate an assigned distributed system technology (e.g., Cassandra, Kafka, Redis Cluster, Etcd, Consul, CockroachDB, or MinIO)
- Document Key Aspects:
- Architecture: Core components and structural design
- Working Principles: Algorithms and data flow mechanisms
- High Availability: Failure handling and redundancy approaches
- Use Cases: Optimal application scenarios and problem domains
- Integration: How it fits within microservices ecosystems
- Deliver Engaging Presentation: Share insights with peers and faculty, emphasizing practical applications
Presentations should reinforce understanding of consistency models, consensus protocols, data partitioning, and state management in distributed systems.
🎓 Final Outcome
By the end of this lab, you will have:
- Built and deployed a functional microservices application
- Practiced containerization and orchestration
- Understood the real-world workflow of backend and DevOps engineering
- Strengthened your system design thinking
Ready to build your first distributed system? Let’s dive in! 🚀
Lectures
| # | Lecture | Studied |
|---|---|---|
| 01 | Introduction | 27 Apr 2025 |
| 02 | Proxies in Distributed Systems | 4 May 2025 |
| 03 | Containerization with Docker | 18 May 2025 |
| 04 | Docker Swarm | 23 Jul 2025 |
📅 Course Timeline & Milestones
This timeline provides a week-by-week breakdown of the course, showing lecture topics and corresponding assignments. The course is designed to progressively build your distributed systems skills from fundamentals to advanced orchestration.
🗓️ Weekly Schedule
| Week | Lecture Topics | Lab Assignment | Deliverables |
|---|---|---|---|
| 1 | Microservices Fundamentals • Introduction to distributed systems • Monolithic vs microservices architecture | Phase 1: Monolithic Smart Library System | Working monolithic application |
| 2-3 | Transition to Microservices • Service decomposition strategies • Inter-service communication • Phase 1 evaluation & feedback | Phase 2: Microservices Implementation | Multiple independent services with API endpoints |
| 4-5 | API Gateway & Reverse Proxy • Nginx configuration & deployment • Load balancing strategies • Phase 2 evaluation & feedback | Phase 3: Nginx Integration | Centralized access point with proper routing |
| 6-7 | Containerization • Docker fundamentals • Container networking • Phase 3 evaluation & feedback | Phase 4: Docker Implementation | Containerized services with proper isolation |
| 8-9 | Container Orchestration Basics • Docker Compose workflows • Multi-container applications • Phase 4 evaluation & feedback | Phase 5: Docker Compose Setup | Multi-container application with defined dependencies |
| 10 | Advanced Orchestration • Docker Swarm architecture • Service scaling & management • Phase 5 evaluation & feedback | Group Presentations: Design & Documentation | Project proposal & architecture diagram |
| 11 | System Design Principles • Scalability patterns • High availability strategies | Group Presentations: Implementation & documentation | Progress report & technical documentation |
| 12-13 | Group Presentations • System design presentations • Industry trendy distributed systems showcase | Group Presentations: Finalization & presentation prep | Final presentation slides & demo |
| 14 | Course Review & Final Evaluation • Best practices review • Industry application discussion | Final Assessment | Course completion & project evaluation |
📊 Grading Distribution
- Individual Lab Phases (1-5): Each phase will be evaluated based on functionality, code quality, and documentation. Detailed rubric will be published soon.
- Group Project & Presentation: Assessment will focus on system design principles, technical implementation, and presentation quality. Detailed evaluation criteria will be shared before Week 10.
🔍 Important Notes
- Each phase builds upon the previous one, creating a complete learning journey
- Evaluations occur regularly to provide feedback and guidance
- Group work begins in Week 10, allowing sufficient time for comprehensive research and implementation
- Final presentations should demonstrate both technical mastery and effective communication
Key takeaways
[Key takeaways]
Resources
📋 Prerequisites
Before diving into the Smart Library System project, it’s important to ensure that students or participants have the foundational knowledge and hands-on exposure to the following areas:
🌐 1. Basic Understanding of Web Application & Development
- Understand the client-server model.
- Familiarity with how a web application works (browser → server → database).
- Concept of HTTP verbs:
GET,POST,PUT,DELETE, etc. - Awareness of RESTful API principles:
- Resource-oriented endpoints
- Stateless communication
- Uniform interface
🔧 2. API Development in Any Language
Participants should have prior experience with creating APIs in any programming language.
💡 Reference: Check out the 🛠️ Tools & Technology Stack section for supported languages and frameworks (Python, Node.js, Java, C#).
Minimum experience includes:
- Routing & endpoint creation
- Accepting and parsing JSON input
- Sending JSON responses
- Status codes (
200 OK,400 Bad Request, etc.)
🗃️ 3. Basic Database Understanding
Familiarity with relational databases such as PostgreSQL, MySQL, or MSSQL.
Students should know:
- Creating tables and defining schema
- Performing CRUD operations:
SELECT,INSERT,UPDATE,DELETE
- Concepts like:
- Primary keys
- Foreign keys
- Relationships (one-to-many, many-to-many)
🔌 4. Database Integration with Backend
Experience connecting an application to a database, such as:
- Using ORM (like SQLAlchemy, TypeORM, Hibernate, EF Core)
- Writing raw SQL queries or using query builders
- Handling database migrations (bonus)
- Performing DB transactions inside the application code
🔍 5. API Testing Skills
Comfortable with using tools like Postman or Bruno to:
- Send requests to an API
- Provide JSON body and headers
- View responses and validate status codes
- Automate collections for repeated tests
💡 For tools, see: API Testing Tools
🐞 6. Debugging Experience
The ability to identify and troubleshoot bugs during development.
This includes:
- Reading and understanding stack traces
- Using logging tools or breakpoints (e.g.,
print,console.log,logger.debug()) - Fixing common backend issues:
- DB connection errors
- Invalid input handling
- Unhandled exceptions
✅ Note: These skills will ensure a smoother experience throughout the project and allow participants to focus on designing scalable microservices rather than struggling with basic development issues.
🛠️ Tools & Technology Stack
This section outlines the recommended tools, frameworks, and platforms used in building and testing the Smart Library System (Microservices Architecture).
🚀 Language & Framework Preferences
Choose any language or framework from below, depending on your expertise or lab instruction:
🐍 Python
| Framework | Description |
|---|---|
| FastAPI | High-performance, modern API framework using ASGI. Ideal for microservices. |
| Flask | Lightweight WSGI framework. Easy to use, good for learning microservice patterns. |
| Django | Full-featured web framework. Use with Django REST Framework for API-based microservices. |
🌐 Node.js
| Framework | Description |
|---|---|
| Express.js | Minimal and flexible framework for building REST APIs. Fast and widely used. |
☕ Java
| Framework | Description |
|---|---|
| Spring Boot | Production-grade microservice framework with robust dependency injection and JPA support. |
🧱 C#
| Framework | Description |
|---|---|
| .NET Core / ASP.NET Core | Cross-platform microservice-ready framework by Microsoft. Supports REST APIs out-of-the-box. |
🌐 API Testing Tools
| Tool | Purpose |
|---|---|
| Postman | Powerful GUI for testing REST APIs. |
| Bruno | Open-source and developer-friendly API testing alternative to Postman. |
🐧 Preferred Operating System
| OS Version | Description |
|---|---|
| Ubuntu 22.04 LTS | Long-Term Support, stable and widely used in cloud environments. |
| Ubuntu 24.04 LTS | (Upcoming/Recent) Updated LTS version with latest packages. |
🗃️ Preferred Databases
Choose your preferred RDBMS per service — all options are supported:
| Database | Notes |
|---|---|
| PostgreSQL | Open-source, feature-rich, and widely used in production. |
| MySQL | Lightweight, easy to use, and fast. |
| MSSQL | Great for enterprise-grade applications using .NET Core. |
Each microservice will own its own dedicated database instance.
🔍 Database Browsing & Inspection Tools
| Tool | Description |
|---|---|
| DataGrip | Universal database IDE by JetBrains (supports all major RDBMS). |
| pgAdmin | PostgreSQL’s official web-based admin interface. |