Concepts Flashcards
Microservices concepts
What is a microservices architecture?
It is an architectural style that structures the application as a collection of loosely coupled services. Every service implements a specific business capability.
What are the main characteristics of microservices?
Single Responsibility Principle, decentralized data management, independently deployable, lightweight communication, and automated deployment.
Name two common communication protocols used in microservices.
HTTP/REST and gRPC.
What is the Single Responsibility Principle in microservices?
Each microservice is responsible for a single business capability and performs one function.
What are the benefits of using a microservices architecture?
Scalability, flexibility, resilience, faster time-to-market, and improved maintainability.
List some challenges of microservices.
Management complexity
Security complexity,
Data consistency,
network latency,
deployment overhead,
and monitoring and debugging complexity
What is service discovery in microservices?
A mechanism that enables services to find and communicate with each other dynamically, often using a registry like Consul or Eureka.
What is an API Gateway in Microservices?
A server that acts as an API front-end, receiving API requests, enforcing throttling and security policies, passing requests to the back-end service, and then passing the response back to the requester.
Why is containerization important in microservices?
It allows each microservice to run in its own isolated environment, improving deployment consistency, scalability, and resource efficiency.
What tools are commonly used for container orchestration in microservices?
Docker and Kubernetes.
What is the Circuit Breaker Pattern in Microservices?
A design pattern used to detect failures and encapsulate the logic of preventing a failure from constantly recurring, allowing microservices to fail gracefully.
What is Domain-Driven Design (DDD) and what is its role in microservices?
DDD is a design approach focusing on modeling the business domain, which helps to define the boundaries and responsibilities of microservices.
What is continuous integration/continuous deployment (CI/CD) in microservices?
CI/CD is a practice where code changes are automatically tested and deployed to production, facilitating rapid and reliable delivery of microservices.
How do microservices handle data management?
Microservices often use decentralized data management where each service manages its own database to ensure loose coupling and independent scalability.
Give examples of companies using a microservices architecture.
Netflix, Amazon, and Uber.
What are some popular monitoring tools for microservices?
Prometheus and Grafana.
What is the role of messaging systems in microservices?
Messaging systems like Kafka and RabbitMQ facilitate communication and data exchange between microservices, enabling decoupling and asynchronous processing.
Explain the concept of “independently deployable” in microservices.
Each microservice can be deployed, updated, and scaled independently without affecting other services, allowing for continuous delivery and deployment.
What is decentralized data management?
Each microservice has its own database, which ensures services are loosely coupled and can evolve independently.
Why is monitoring and logging critical in microservices?
To ensure visibility into the system’s performance, detect issues early, and provide traceability for debugging and analysis.