1/16
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
What are Microservices?
- a SOA of building an app as a suite of small services
- each running its own process
- communicating with lightweight mechanisms
What are the benefits of microservices?
- Strong module boundaries
- Independent deployment
- Technology independent
- Agility & Productivity
- Scalability
- Resilience
- Reduced cost
What are the problems with microservices?
- Distribution complexity
- Eventual consistency
- Fault tolerance
- Granularity
- Over coupling
- Service discovery difficulties
- Observability
What are the core principles of microservices?
1. Bounded Context
2. Size
3. Isolated State
4. Distribution
5. Elasticity
6. Automated Management
7. Loose Coupling
What are some challenges of converting monolithic applications to microservice-oriented ones?
- Decoupling the monolith
- Database splitting
- Service communication
- DevOps complexity
What is a front end?
A piece of software that handles user interaction & presentation
What's the difference between a monolithic UI and a composite UI?
- Monolithic: single frontend that integrates all services
- Composite: multiple smaller frontend microservices
What are the advantages of using a composite UI?
- independent UI development
- scalability
- team autonomy
Describe the API Gateway pattern
- API gateway: software that acts as a single entry point and request router between clients & services
- Used for managing client access to individual services
- route requests, user auth, response aggregation, logging, translate protocols
Describe the Backend for Frontend pattern
- separating gateways per frontend type
- used when different clients require different APIs and data views
Describe the Circuit Breaker pattern
- proxy service that monitors an at-risk service
- used to prevent one failing service to crash the whole system
- operates in closed, open, & half-open states
Describe the Database Per Service pattern
- using separate databases for each service
- allows microservices to be loosely coupled
- adv: easy migration, caching support, hyperlinks, independent scaling, tech. independent
What is the anti-pattern known as Shared Database?
- use of a single database that is shared by multiple services
- creates tight coupling, scaling bottlenecks and distributed monoliths
Describe the SAGA pattern
- SAGA: sequence of local transactions
- used to do transactions that span multiple services
- each transaction updates DB then publishes msg/event to trigger next one
- if one fails, compensating transactions undo previous work
Describe the Event Sourcing pattern
- involves the storing of data as a sequence of events
- used when history of changes to data are needed
- events published, stored in event store, then state reconstructed by replaying events
- adv: auditability, history tracking, replay capability, debugging
Describe the CQRS pattern
- Command Query Responsibility Segregation
- Separates commands from querying
- Used for systems with data that is spread across multiple services
- Adv: scalability, performance, separation of concerns
What is an alternative pattern to CQRS?
- API Composition
- a dedicated service queries multiple services & combines results
- data is polled rather than pushed to composition service
- disadv: can be expensive unless caching is used