Microservices and Micro-frontends
- Organizational flexibility
- Freedom to choose the technology stack
- Easier codebase management
- Controllable scaling
- Fault tolerance
- Time to market
When It Is Not a Good Fit
- Simple application
- Limited functionality
- Limited development resources
- Tightly coupled components
- MVP (Minimum Viable Product) or PoC (Proof of Concept)
- High performance requirements
- Organizational and cultural constraints of the company
- Insufficient infrastructure, processes, and CI/CD tooling
- Hybrid composition
- Server-side composition
- Reverse proxy (Nginx, HAProxy)
- Backend for Frontend (BFF)
- Prepares data for the client
- Simplifies client-side logic
- Improves performance
- Improves security
- API composition
- Client-side composition
- Single SPA
- Module Federation
- Hybrid
- Server-side
- Client-side
- Dynamic
- API
- Interaction exclusively with the backend
- Simple data exchange
- High performance and scalability requirements
- Publisher/Subscriber pattern
- No direct dependencies
- Event-driven architecture
- Independent deployment
- Global or shared state
- Tight coupling between different parts of the application
- Consistency across the application and a consistent user experience
- Demanding state management requirements
- Vertical slicing
- Team autonomy
- Isolation
- Build time
- Simplified adoption
- Tight coupling of features and components
- Performance
- Run time
- Independent deployment of modules
- Dynamic module updates (development)
- Scaling
- Service boundaries
- Interaction methods
- Synchronous
- Asynchronous
- Event-Driven Architecture
- Domain analysis
- Domain model description
- Functionality decomposition
- Event flow modeling
- Event modeling
- Event broker selection
- Implementation and monitoring
- Testing and validation
- AsyncAPI
- Data management
- Data consistency strategies
- Eventual consistency
- Strong consistency
- Data partitioning
- Distributed transactions
- Two-phase commit protocol (2PC)
- Saga pattern
- Deployment strategies
- Blue-Green
- Canary
- Rolling
- Load balancing
- Strategies
- Round robin
- Least connections
- IP hash, sticky sessions
- Weighted round robin
- Random distribution
- Least response time
- Least bandwidth
- Fault tolerance
- Scalability
- Replication
- Caching
- Sharding and partitioning
- Partitioning
- Sharding
- Hash-based
- Range-based
- Dynamic
- Geo-sharding
- Routing
- DBMS-native
- Router service
- Client-side
- Security
- Monitoring and observability
- Data storage
- API management
- Testing and validation
- DevOps practices
- Versioning and compatibility
- Design
- Development
- Testing
- Deployment
- Monitoring and support
- Scaling
- Updating and improvement
- Decommissioning
- Database per Service
- Service per Team
- Event Sourcing
- Stream Processing
- Synchronous micro-batch processing
- Asynchronous micro-batch processing
- Streaming model
- Continuous update model
- Message Queueing
- Publish/Subscribe
- CQRS
- Commands
- Queries
- Implementation
- Define commands and queries
- Implement the data models
- Implement command and query handlers
- Adapt consumer systems so they can integrate with various components to send queries and commands
- Saga
- Implementation types
- Orchestration — complex business processes, need for centralized management, transactional coordination, complex business logic
- Choreography — simple interactions, independent microservices, flexibility and scalability as a priority, event-driven architecture
- Error handling and compensation
- Compensating transactions
- Retries
- Timeouts and deadlines
- Event-driven error handling
- Monitoring and alerting systems
- Implementation
- Analyze the business process and define the Saga steps
- Design the microservices
- Manage the state and interaction of microservices
- Implement actions and compensating actions
- Logging and monitoring
- Testing
- Transactional Outbox
- Transaction Log Tailing
Application Infrastructure Patterns
- Distributed tracing
- Audit logging
- API Gateway
- Types
- Monolithic
- Distributed
- Multi-layered
- Serverless
- Functions
- Centralized request routing
- Authentication and authorization management
- Load balancing and traffic distribution
- Security enforcement
- Request caching
- Front-to-back
- Client pull
- Patterns
- Short polling
- Long polling
- Implementations
- Server push
- Implementations
- WebSockets
- Server-Sent Events
- GraphQL Subscriptions
- Back-to-back
- Patterns
- Request-Response
- Publish-Subscribe
- Implementations
- Service Discovery
- Service Mesh
- Service Registry
- Codebase
- Dependencies
- Config
- Backing services
- Build, Release, Run
- Processes
- Port binding
- Concurrency
- Disposability
- Dev/Prod parity
- Logs
- Admin processes
Lightweight Microservices
- Minimalism
- Independence
- Fast startup time
- Efficient resource usage
- Simplified dependencies
- Ensured isolation
- Documentation and automation
- Pipeline as Code
- Repeatability
- Flexibility
- Versioning
- Transparency
- Scalability
- Error-proneness
- Infrastructure as Code
- CI/CD
- Continuous Integration
- Continuous Delivery
- Continuous Deployment
Identification, Authentication, Authorization
OAuth (Open Authorization)
- Roles
- Resource owner
- Resource server
- Authorization server
- Client
- User agent
- Refresh token storage
- Server
- HTTP-only cookie
- LocalStorage
- WebWorker
- Flows
- Authorization code
- Implicit
- Resource owner password credentials
- Client credentials
- Device authorization
- RFCs
SAML (Security Assertion Markup Language)