Microservices Flashcards
What is a microservice architecture?
A microservice architecture is an architecture where an application is composed of small, independent components
Whar are the advantages of using a microservice architecture?
- Horizontal scaling
- Isolated evolution
- Fault isolation
What are the disadvantages of using a microservice architecture?
- Increased complexity
- Increased possibility of network failures and latency
- Increased security risk
- Increased costs
What are the 2 primary ways microservices can communicate with each other?
- HTTP RESTful APIs (sync)
- AMQP Message brokers (sync or async)
How big should a microservice be?
Big enough to not hurt performance and small enough to be understood by a developer
What are the most commonly used design patterns for microservices?
- Service discovery
- Configuration server
- Gateway
- Load balancer
Microservices best practices:
1. Requests to a microservice should be load-balanced over its available instances
2. If microservice is not healthy, requests should not be routed to it
3. A microservice should be capable of returning a response even if a dependent service fails
Conway’s law: Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization’s communication structure.
In other words, the architecture of software systems are surprisingly similar to the organization of the development team that built it.
What is Domain-driven design?
DDD is an approach to software development that centers the development on programming a domain model that has a rich understanding of the processes and rules of a domain.
DDD can help determine the boundaires of a microservice
When microservices become containers, each container will have its own host name. This means that microservices that become containers can have the same port without colliding with one another.
Running unit and integration tests for each microservice in isolation is important during development. However, these isolated tests are not enough when the entire application as whole moves to the operation side. Being able to run a script at any time to ensure that all microservices work together as expected is extremely important.
The dev and ops organizations should be organized into teams that are responsible for the full Software Development Lifecycle (SDLC) of one or more microservices
Using a versioning schema (samver) for the APIs exposed by microservices allows clients to migrate to new major versions at their