1/31
Looks like no tags are added yet.
Monolithic Architecture
A traditional application architecture where all components (user interface, business logic, data access layer) are tightly coupled and deployed as a single, indivisible unit.
1. Simple to develop
2. Easy to develop
3. Straightforward testing
Pros of Monolithic Architecture:
1. Must scale the entire application
2. Slow development cycles for large teams
3. Difficult to adapt to new technologies
4. A bug in one module can bring down entire application
5. Large deployments, high risk
Cons of Monolithic Architecture:
Microservices Architecture
An architectural style that structures an application as a collection of small, independent, and loosely coupled services. Each service is self-contained, focuses on a single business capability, and communicates with other services, typically through lightweight APIs.
1. Single Responsibility Principle
2. Decentralization
3. Loose Coupling
4. Independent Deployment
5. Polyglot Persistence
6. Polyglot Programming
7. Bounded Contexts
Core Principles of Microservices Architecture:
1. Increased Agility & Faster Time-to-Market
2. Improved Scalability
3. Enhanced Resilience
4. Technology Diversity (Polyglot)
5. Easier Maintenance
6. Better Organization for Large Teams
Benefits of Microservices:
1. Increased Operational Complexity
2. Distributed Data Management
3. Inter-service Communication Overhead
4. Debugging & Tracing
5. Initial Development Overhead
6. "Distributed Monolith" Risk
Drawbacks and Challenges of
Microservices:
REST APIs are used for [...]bound interfaces.
Is the most widely adopted architectural style for
building web services and microservices APIs.
1. Stateless
2. Client-Server
3. Cacheable
4. Layered System
5. Uniform Interface
What are the princile pf REST?
Stateless
Each request from client to server must contain all the
information needed to understand the request. The server should not store any client context between requests.
Client-Server
Clear separation of concerns between client and server.
Cacheable
Responses can be cached to improve performance.
Layered System
Can have multiple layers (e.g., load balancers, API gateways) between client and server.
Uniform Interface
A consistent way to interact with resources (e.g., using standard HTTP methods).
1. Resources
2. HTTP Methods
3. Representations
4. Stateless Communication
Key Components of RESTful APIs:
Resources
Anything that can be named and addressed (e.g., /users,
/products/123, /orders).
API Gateway
A single entry point for all external client requests to a microservices application. It acts as a reverse proxy, routing requests to the appropriate microservice.
1. Request Routing
2. Authentication & Authorization
3. Rate Limiting
4. Load Balancing
5. Caching
6. Protocol Translation
Functions of API Gateway
Monolithic
All-in-one application structure
Microservice
Many small independent services
API
A way for systems to communicate
RESTful
A specific type of web API that follows REST principles
OK
200
Created
201
No content
204
Bad Request
400
Unauthorized
401
Forbidden
403
Not Found
404
Unprocessable Content
422
Internal Server Error
500
1. GET
2. POST
3. PUT
4. DELETE
HTTP METHODS: