Microservices and Docker Flashcards
What is Microservices?
Small independent services that handles some logic.
Some call it a variant of SOA - but services have a smaller scope.
What does the Microservices guidelines describe its services as and what does it enable?
Highly maintainable and testable.
- Enables rapid development and deployment.
Loosely coupled with other services
- enables cross team collaboration.
Independent and deployable
- enables deployment freedom.
Capable of being developed by small teams
- agility and prevents communication problems.
Single responsibility principle.
- a microservices does on thing only.
Stateless
- just like rest
Data handling only through the use of API’s
What does it mean that the microservice is loosely coupled?
It is independent and handles its own responsibility. So it does not need to contact other services to fulfil its tasks.
Why are microservices maintainable?
Because they are small and loosely coupled. If you change things in a microservice it does not affect others. This also makes it deployable since it can work on its own.
What is meant by stateless microservice?
It does not keep track of requests or anything. It receives a request performs the tasks and that’s it.
Why does microservices enable agility and cross team collaboration?
No dependencies and they communicate via protocols.
What are some characteristics with microservice architecture?
Many small components (services) makes the architecture flexible, scalable and maintainable.
What does it mean that Microservice architecture is use case driven?
The solution is organised around business capabilities and needs that it should perform.
What is simple routing when talking about Microservice architecture?
do not require complex system for routing, its based on a simple request/response pattern. (unlike SOA with ESB)
What does it mean that microservice architecture is decentralised?
That information is not in one central place or ressource. its divided out onto many services.
Why is microservice architecture failure resistant?
There are often multiple instances of each microservice. The services are also most often hosted on the cloud.
The microservices are independent so even if one service goes down the rest can work.
When talking about SOA and microservices what can you mention about code reusability and duplication?
In SOA code reusability is essential.
In Microservices some code duplication will always happen. For example connection to a database.
What is the scope of SOA and Microservices?
SOA = Enterprise scope Microservices = application scope.
When would you pick microservices?
- For scalability.
- You multiple small.
- For flexibility.
- For decentralisation.
- To decouple systems.
- To become language agnostic.
Why are microservices Versatile?
Versatile and independent
Scalability and maintainable
Why are microservices scalable?
Because they are usually hosted on cloud and more instances of the services are easily added.
Why are Microservices maintainable?
Because changes in one microservice does not affect other services or functionality.
Is it easy to globally test microservices?
No. To test all the microservices together requires complicated tests, and to see where it fails is hard.
What performs better Microservices or a Monolith and why?
Monolith because it does not have to go outside of the program to perform tasks.
Microservices have to communicate over the network.
What is Docker?
It is a program that virtualises operation systems and delivers software in packages called containers.
What is a container?
It is an environment in which a program can run or be developed. It has all the requirements for a program to run and nothing more.
What is a Docker image?
It is the blueprint which containers are created from.
“A Docker image is a read-only template that contains a set of instructions for creating a container”
What is Docker registry?
Where Docker retrieves its images from.
A Docker registry is a storage and distribution system for named Docker images.
What is the features with docker?
Easy to create environments and add host machines.
Reduces the resources needed to execute the system because it is in isolated environments.
Swarm tool - helps clustering and scheduling docker containers AKA tool helps manage containers on different computers.
Routing Mesh - another Docker tool. Doing load balancing.
- “Routing Mesh is a feature which make use of Load Balancer concepts.It provides global publish port for a given service. The routing mesh uses port based service discovery and load balancing. So to reach any service from outside the cluster you need to expose ports and reach them via the Published Port. “
Security management: Allows to save secrets and use them in certain containers from a cluster.