Module 03: Review & Cheat Sheet
Congratulations on completing Module 03! This module covered the fundamental ways systems talk to each other.
1. Key Takeaways
| Concept | The “One Liner” |
|---|---|
| REST | Resource-based, stateless, standard HTTP verbs. Level 2 is the standard. |
| GraphQL | Client asks for exactly what it needs. Solves Over-fetching. |
| gRPC | High-performance RPC using Protobuf. Great for internal microservices. |
| Polling | “Are we there yet?” Simple but high latency/overhead. |
| WebSockets | Full-duplex persistent connection. Lowest latency. Stateful. |
| API Gateway | The “Front Door”. Handles Auth, Rate Limiting, and Routing. |
| BFF | Backend for Frontend. Tailored APIs for specific clients (Mobile vs Web). |
| Circuit Breaker | Fails fast when a downstream service is down to prevent cascading failure. |
2. Interactive Flashcards
Test your memory! Click to flip.
3. System Architect Challenge
Test your ability to choose the right tool for the job.
1. You are building a Stock Trading platform where milliseconds matter. You need to stream price updates to a dashboard.
2. Your mobile app needs to display a user profile, their last 3 orders, and their wish list. You want to minimize battery usage and requests.
4. System Design Checklist: API Choice
When designing a new system, ask these questions:
- Who are the clients?
- Mobile? (Use BFF, minimize data).
- Internal Services? (Use gRPC).
- Public Developers? (Use REST/GraphQL).
- Is it Real-Time?
- Yes, high frequency (Game)? → WebTransport/UDP.
- Yes, chat? → WebSockets.
- Yes, news feed? → SSE.
- No? → REST.
- Do we need Caching?
- Yes, heavily? → REST (Leverage CDNs).
- No, data changes per user? → GraphQL.
- How do we handle failures?
- Retries? → Implement Idempotency Keys.
- Circuit Breakers? → Use a Service Mesh.
5. Next Steps
You are now ready to handle data storage. Proceed to Module 04: Database Basics or explore the Load Balancing module.