Microservices Architecture: Difference between revisions
BloomWiki: Microservices Architecture |
BloomWiki: Microservices Architecture |
||
| Line 1: | Line 1: | ||
<div style="background-color: #4B0082; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> | |||
{{BloomIntro}} | {{BloomIntro}} | ||
Microservices Architecture is a software design style that builds an application as a "Suite" of small, independent services. In the old world (The Monolith), an app like Uber or Amazon was one giant "Ball of Code." If you wanted to change the "Payment" button, you had to re-deploy the entire billion-dollar system. In a microservices world, the "Payment" service is its own tiny app, separate from the "Map" service or the "User Review" service. This allows large teams to move incredibly fast—developing, testing, and scaling different parts of the business without ever getting in each other's way. It is the "Assembly Line" of the digital age. | Microservices Architecture is a software design style that builds an application as a "Suite" of small, independent services. In the old world (The Monolith), an app like Uber or Amazon was one giant "Ball of Code." If you wanted to change the "Payment" button, you had to re-deploy the entire billion-dollar system. In a microservices world, the "Payment" service is its own tiny app, separate from the "Map" service or the "User Review" service. This allows large teams to move incredibly fast—developing, testing, and scaling different parts of the business without ever getting in each other's way. It is the "Assembly Line" of the digital age. | ||
</div> | |||
== Remembering == | __TOC__ | ||
<div style="background-color: #000080; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> | |||
== <span style="color: #FFFFFF;">Remembering</span> == | |||
* '''Microservices''' — An architectural style that structures an application as a collection of services that are highly maintainable and testable. | * '''Microservices''' — An architectural style that structures an application as a collection of services that are highly maintainable and testable. | ||
* '''Monolith''' — The traditional software model where all functions are combined into a single, large codebase. | * '''Monolith''' — The traditional software model where all functions are combined into a single, large codebase. | ||
| Line 13: | Line 18: | ||
* '''Bounded Context''' — The rule that a microservice should only "Know" about its own specific job (e.g., the Shipping service shouldn't know about Credit Card numbers). | * '''Bounded Context''' — The rule that a microservice should only "Know" about its own specific job (e.g., the Shipping service shouldn't know about Credit Card numbers). | ||
* '''DevOps''' — The culture of combining Software Development (Dev) and IT Operations (Ops), which is essential for managing microservices. | * '''DevOps''' — The culture of combining Software Development (Dev) and IT Operations (Ops), which is essential for managing microservices. | ||
</div> | |||
== Understanding == | <div style="background-color: #006400; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> | ||
== <span style="color: #FFFFFF;">Understanding</span> == | |||
Microservices are understood through '''Independence''' and '''Communication'''. | Microservices are understood through '''Independence''' and '''Communication'''. | ||
| Line 35: | Line 42: | ||
'''Conway's Law''': The observation that the structure of a piece of software will eventually look exactly like the structure of the organization that built it. If you have 5 teams, you will eventually have 5 microservices. | '''Conway's Law''': The observation that the structure of a piece of software will eventually look exactly like the structure of the organization that built it. If you have 5 teams, you will eventually have 5 microservices. | ||
</div> | |||
== Applying == | <div style="background-color: #8B0000; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> | ||
== <span style="color: #FFFFFF;">Applying</span> == | |||
'''Modeling 'The Microservice Flow' (Handling a user request):''' | '''Modeling 'The Microservice Flow' (Handling a user request):''' | ||
<syntaxhighlight lang="python"> | <syntaxhighlight lang="python"> | ||
| Line 65: | Line 74: | ||
: '''Martin Fowler (2014)''' → The software architect who wrote the definitive guide to microservices, launching the worldwide trend. | : '''Martin Fowler (2014)''' → The software architect who wrote the definitive guide to microservices, launching the worldwide trend. | ||
: '''The 'Service Mesh' (Istio/Linkerd)''' → A layer of "Infrastructure" that manages the traffic between services, allowing developers to focus on code instead of network security. | : '''The 'Service Mesh' (Istio/Linkerd)''' → A layer of "Infrastructure" that manages the traffic between services, allowing developers to focus on code instead of network security. | ||
</div> | |||
== Analyzing == | <div style="background-color: #8B4500; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> | ||
== <span style="color: #FFFFFF;">Analyzing</span> == | |||
{| class="wikitable" | {| class="wikitable" | ||
|+ Monolith vs. Microservices | |+ Monolith vs. Microservices | ||
| Line 81: | Line 92: | ||
'''The Concept of "Observability"''': Analyzing how to find a bug in 500 different apps. You need "Distributed Tracing"—a way to attach a "ID" to a user's click and follow that ID as it travels through 10 different services to see exactly where it slowed down. | '''The Concept of "Observability"''': Analyzing how to find a bug in 500 different apps. You need "Distributed Tracing"—a way to attach a "ID" to a user's click and follow that ID as it travels through 10 different services to see exactly where it slowed down. | ||
</div> | |||
== Evaluating == | <div style="background-color: #483D8B; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> | ||
== <span style="color: #FFFFFF;">Evaluating</span> == | |||
Evaluating microservices: | Evaluating microservices: | ||
# '''The "Microservices Tax"''': Is the "Complexity" worth it? (Many small startups make the mistake of using microservices when a Monolith would be 10x faster and cheaper). | # '''The "Microservices Tax"''': Is the "Complexity" worth it? (Many small startups make the mistake of using microservices when a Monolith would be 10x faster and cheaper). | ||
| Line 88: | Line 101: | ||
# '''Security''': In a Monolith, the "Bank" and "User" talk inside the same computer. In Microservices, they talk over the "Public Internet." How do we keep that safe? | # '''Security''': In a Monolith, the "Bank" and "User" talk inside the same computer. In Microservices, they talk over the "Public Internet." How do we keep that safe? | ||
# '''Team Culture''': Can an old-fashioned company with "Bureacracy" and "Meetings" ever successfully use microservices? | # '''Team Culture''': Can an old-fashioned company with "Bureacracy" and "Meetings" ever successfully use microservices? | ||
</div> | |||
== Creating == | <div style="background-color: #2F4F4F; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;"> | ||
== <span style="color: #FFFFFF;">Creating</span> == | |||
Future Frontiers: | Future Frontiers: | ||
# '''Serverless Microservices''': Services that don't even "Exist" until a user clicks a button, then they "Pop up," do their job, and vanish (AWS Lambda). | # '''Serverless Microservices''': Services that don't even "Exist" until a user clicks a button, then they "Pop up," do their job, and vanish (AWS Lambda). | ||
| Line 99: | Line 114: | ||
[[Category:Software Engineering]] | [[Category:Software Engineering]] | ||
[[Category:Technology]] | [[Category:Technology]] | ||
</div> | |||
Latest revision as of 01:54, 25 April 2026
How to read this page: This article maps the topic from beginner to expert across six levels � Remembering, Understanding, Applying, Analyzing, Evaluating, and Creating. Scan the headings to see the full scope, then read from wherever your knowledge starts to feel uncertain. Learn more about how BloomWiki works ?
Microservices Architecture is a software design style that builds an application as a "Suite" of small, independent services. In the old world (The Monolith), an app like Uber or Amazon was one giant "Ball of Code." If you wanted to change the "Payment" button, you had to re-deploy the entire billion-dollar system. In a microservices world, the "Payment" service is its own tiny app, separate from the "Map" service or the "User Review" service. This allows large teams to move incredibly fast—developing, testing, and scaling different parts of the business without ever getting in each other's way. It is the "Assembly Line" of the digital age.
Remembering[edit]
- Microservices — An architectural style that structures an application as a collection of services that are highly maintainable and testable.
- Monolith — The traditional software model where all functions are combined into a single, large codebase.
- API (Application Programming Interface) — The "Contract" or "Bridge" used by microservices to talk to each other.
- Docker / Containerization — The technology used to "Package" a microservice so it can run anywhere.
- Kubernetes — The "Orchestrator" that manages thousands of containers, making sure they are running and healthy.
- Service Discovery — The process where one microservice "Finds" another on the network.
- API Gateway — The "Front Door" of the app that takes a request from a user and sends it to the right microservice.
- Loose Coupling — When services are independent enough that changing one doesn't break the others.
- Bounded Context — The rule that a microservice should only "Know" about its own specific job (e.g., the Shipping service shouldn't know about Credit Card numbers).
- DevOps — The culture of combining Software Development (Dev) and IT Operations (Ops), which is essential for managing microservices.
Understanding[edit]
Microservices are understood through Independence and Communication.
1. Decentralized Everything: In a Monolith, there is one giant database.
- In Microservices, every service has its **own database**.
- If the "Reviews" database crashes, people can still "Buy" items.
- If the "Shipping" team wants to use a new programming language (like Rust) while the "Web" team uses Javascript, they can!
2. Talking through APIs: Since the services are separate, they must talk over the network (usually using JSON or gRPC).
- This creates "Latency" (a delay), but it also creates "Safety."
- You can "Mock" a service—meaning you can test the "Payment" app by pretending the "Bank" app is working, even if it's not finished yet.
3. The "Pizza Team" Rule: Jeff Bezos famously said that a team should be small enough to be fed by "Two Pizzas."
- Each pizza team "Owns" one microservice.
- They build it, they test it, they run it, and they "Wake up at 3 AM" if it breaks.
- This creates a sense of "Ownership" that is impossible in a giant 1,000-person project.
Conway's Law: The observation that the structure of a piece of software will eventually look exactly like the structure of the organization that built it. If you have 5 teams, you will eventually have 5 microservices.
Applying[edit]
Modeling 'The Microservice Flow' (Handling a user request): <syntaxhighlight lang="python"> def process_order_request(user_id, item_id):
"""
Simulates how an API Gateway coordinates multiple services.
"""
# 1. Call Auth Service
user_valid = True # Mock response
# 2. Call Inventory Service
stock_count = 5 # Mock response
# 3. Call Payment Service
payment_success = True # Mock response
if user_valid and stock_count > 0 and payment_success:
return "SUCCESS: Order placed! (3 services coordinated)"
else:
return "FAILURE: One of the services rejected the request."
print(process_order_request("User_123", "Product_ABC")) </syntaxhighlight>
- Microservice Landmarks
- The Netflix Migration (2008-2016) → The most famous move in tech history, where Netflix spent 7 years breaking their Monolith into 700+ microservices to handle their global growth.
- The 'Death Star' Diagram → A visual map of a microservices network (like Amazon's) that looks like a giant, glowing circle of thousands of dots and lines.
- Martin Fowler (2014) → The software architect who wrote the definitive guide to microservices, launching the worldwide trend.
- The 'Service Mesh' (Istio/Linkerd) → A layer of "Infrastructure" that manages the traffic between services, allowing developers to focus on code instead of network security.
Analyzing[edit]
| Feature | Monolith | Microservices |
|---|---|---|
| Complexity | Low (at the start) | High (from the start) |
| Deployment | All-or-nothing | Independent (fast) |
| Scaling | Scale the whole thing | Scale only the "Busy" parts |
| Technology | One language / One DB | "Polyglot" (any language / any DB) |
The Concept of "Observability": Analyzing how to find a bug in 500 different apps. You need "Distributed Tracing"—a way to attach a "ID" to a user's click and follow that ID as it travels through 10 different services to see exactly where it slowed down.
Evaluating[edit]
Evaluating microservices:
- The "Microservices Tax": Is the "Complexity" worth it? (Many small startups make the mistake of using microservices when a Monolith would be 10x faster and cheaper).
- Data Consistency: If two services have different versions of a user's address, which one is "True"? (The "Distributed Transaction" problem).
- Security: In a Monolith, the "Bank" and "User" talk inside the same computer. In Microservices, they talk over the "Public Internet." How do we keep that safe?
- Team Culture: Can an old-fashioned company with "Bureacracy" and "Meetings" ever successfully use microservices?
Creating[edit]
Future Frontiers:
- Serverless Microservices: Services that don't even "Exist" until a user clicks a button, then they "Pop up," do their job, and vanish (AWS Lambda).
- AI Orchestrators: AI that "Decides" where to move microservices around the world based on where the users are right now.
- Automatic Decomposition: Tools that can look at an old "Monolith" and automatically suggest the best way to "Cut it" into microservices.
- Web3 Services: Microservices that are owned by "No one"—living on a decentralized blockchain.