What is software architecture?
Software architecture is a system organization that includes various organizations, these components include Web server, application server, database, storage, communication layer), they have a relationship with each other or with the environment.
What is microservice architecture?
Microservice refers to the development of a single small service with business functions. Each service has its own processing and lightweight communication mechanism, and can be deployed on a single or multiple servers.Microservices also refer to a loosely coupled service-oriented architecture with a certain bounded context. In other words, if each service has to be modified at the same time, then they are not microservices, because they are tightly coupled together; if you need to master the use conditions of a service with too many context scenarios, then it is a service with a context boundary
What are the advantages of microservices?
- Each microservice is very small, so that it can focus on a specific business function or business requirement.
- Microservices can be developed individually by a small team, which is composed of 2 to 5 developers.
- Microservices are loosely coupled and are functionally meaningful services that are independent in either the development phase or the deployment phase.
- Microservices can be developed in different languages.
- Microservices allow easy and flexible integration of automatic deployment through continuous integration tools such as Jenkins, Hudson, and bamboo.
- A new member of a team can be put into production faster.
- Microservices are easy to be understood, modified and maintained by a developer, so that small teams can pay more attention to their own work results. No need to cooperate to realize value.
- Microservices allow you to take advantage of the latest technologies.
- Microservices are just business logic code and will not be mixed with HTML, CSS or other interface components.
- Microservices can be requested to scale instantly.
- Microservices can be deployed on servers with low-end configurations.
- Easy to integrate with third parties.
- Each microservice has its own storage capacity and can have its own database. There can also be a consolidated database.
What are the disadvantages of the microservice architecture?
- Microservice architecture may bring too many operations.
- Need DevOps skills
- Maybe double the effort.
- Distributed systems can be complex and difficult to manage.
- It is difficult to track the distributed deployment.
- As the number of services increases, management complexity increases.
Which situation is suitable for microservices?
When you need to support desktop web mobile smart TV wearable, it is all right, even in the future you may not know but need to support a certain environment.
Which companies or products use microservice architecture?
Most large-scale website systems such as Twitter, Netflix, Amazon and eBay have migrated from the traditional monolithic architecture to the microservice architecture
How do microservices communicate independently?
This depends on requirements. By using HTTP/REST, the data format uses JSON or Protobuf (Binary protocol), and the communication protocol is free.
Why is everyone talking about microservices now?
Since the SOA interview 15 years ago, with the popularity of RESTful web services and JSON data exchange format, it has become more and more convenient to build a connectable service simply and quickly.
#Development method impact With the promotion of the concept of continuous delivery and the popularization of Docker containers, microservices combine these two concepts and technologies to form a new development model of microservices + API + platform, and propose the concept of continuous delivery of containerized microservices .
The following figure shows the traditional Monolithic DevOps development team method:This overall architecture requires the product team to develop QA DBA and system operation management across the product management Dev. After the introduction of the microservice architecture, as shown below: Microservices promote the reorganization of the DevOps approach, dividing a bloated overall product development team into product teams based on different microservices, and a large overall platform team responsible for operation and management. The two interact through APIs. , Achieved loose coupling and isolation.
Due to the introduction of Docker, different microservices can use different technical architectures, such as Node.js Java Ruby Python, etc. These individual services can independently complete the delivery life cycle, as follows:
Netflix's microservice architecture is as follows, focusing on high scalability and availability for global distribution:Twitter s microservice architecture focuses on efficient and scalable data centers: