Skip to content
IRC-Coding IRC-Coding
Microservices Monolith API Gateway CI/CD Scaling

Microservices vs. Monolith: Architecture Comparison

Microservices vs. monolithic architecture: differences, API Gateway, database per service, pros/cons, and exam questions.

S

schutzgeist

2 min read

Microservices vs. Monolithic Architecture

This post is a term explanation for the architecture comparison Microservices vs. Monolith – including exam questions, core elements, and tags.

In a Nutshell

Microservices and monolithic architecture are two opposing approaches to software structure: modular/decentralized/scalable vs. centralized/simple/consistent.

Compact Technical Description

Monolithic architecture describes software that is deployed and operated as a single unit. Functions, logic, and interfaces are tightly coupled.

Microservices architecture breaks down the application into many small, independent services that communicate via network interfaces (usually REST or messaging). Each service can be developed, tested, and deployed independently – often with its own data storage.

Microservices offer advantages in scalability and maintainability, but require more infrastructure, DevOps expertise, and clean interfaces.

Exam-Relevant Key Points

  • Monolith = one application, one deployment
  • Microservices = independent services (often separate repositories)
  • Microservices promote scalability and flexibility (IHK-relevant)
  • Monolith is simpler for small projects (practical relevance)
  • Microservices require API gateways, authentication, logging (security aspect)
  • Infrastructure overhead for microservices is higher (cost-effectiveness)
  • Interfaces and dependencies must be documented (documentation requirement)
  • Microservices work well for CI/CD and agile teams

Core Components

  1. Service boundaries and bounded context
  2. Communication (REST, gRPC, messaging)
  3. Database per service (microservices)
  4. Central database (monolith)
  5. Deployment strategy (single vs. multiple pipelines)
  6. Service registry & discovery
  7. Monitoring/logging per service
  8. Security layer and authentication
  9. Error isolation (circuit breaker, retry, fallback)
  10. Service documentation (OpenAPI)

Simple Practical Example

Monolith:
A web shop is a Java Spring Boot project with modules (User, Orders, Inventory) → one deployment.

Microservices:
User Service, Order Service, Inventory Service are independent services, communicate via REST,
are deployed separately via Docker/Kubernetes.

Advantages and Disadvantages

Monolith

  • Advantages: simple deployment, lower infrastructure requirements, less complexity for small teams
  • Disadvantages: difficult to scale, changes affect other modules, longer release cycles

Microservices

  • Advantages: independent teams, scaling per service, technology diversity
  • Disadvantages: high DevOps effort, complex interfaces, distributed transactions more difficult

Typical Exam Questions (with Short Answer)

  1. What is a monolith? An application that runs and is deployed as a single unit.
  2. Two advantages of microservices? Scaling of individual services, independent deployment.
  3. When is a monolith sensible? For small projects with few stakeholders.
  4. How do microservices typically communicate? Via HTTP/REST, gRPC, or messaging (Kafka/RabbitMQ).
  5. Why is microservices architecture more complex? Distributed system, multiple deployments, more sources of error.
  6. What is an API gateway? Central entry point to services (routing, auth, monitoring).

Glossary

TermDefinition
Monolithic architecturecentralized software structure in one codebase
Microservices architecturedistributed architecture with autonomous services
API gatewaycentralized control of access to microservices

Free Response

For many IHK exam projects, a monolith is often better documentable and sufficient. Microservices are worthwhile only when clear boundaries, infrastructure, and DevOps capabilities are present. A good compromise is a modular monolith.

Learning Strategy

  1. Understanding entry: Sketch both architectures for the same use case.
  2. Deepening: Build a mini-system with Docker Compose.
  3. Exam focus: Justify your architecture choice in writing.
  4. Avoiding errors: Do not automatically assume “microservices = better.”

Topic Analysis

  • Technical core: Service orientation, interfaces, deployments
  • Implementation: Communication, data consistency, CI/CD
  • Security: Service boundaries, auth, gateways
  • Documentation: Interfaces/dependencies/deployments
  • Cost-effectiveness: Effort vs. flexibility

Further Information

  1. https://martinfowler.com/articles/microservices.html
  2. https://www.ibm.com/cloud/learn/monoliths-vs-microservices
  3. https://learn.microsoft.com/en-us/azure/architecture/guide/architecture-styles/microservices
Back to Blog
Share:

Related Posts