A Quick Guide to Microservice Architecture

1. What is a software architecture?
    A software architecture is a system organization that includes various organizations (including Web servers, application servers, databases, storage, communication layers), which are related to each other or to the environment.

2. What is a microservice architecture?
    Microservice refers to the development of a single small service with business functions, each with its own processing and lightweight communication mechanism, which can be deployed on a single or multiple servers.

    Microservices also refer to a kind of loosely coupled service-oriented architecture with a certain bounded context. That is, if every service is to be modified at the same time, then they are not microservices because they are tightly coupled; if you need to grasp too many contextual usage conditions of a service, then it is a service with context boundaries , this definition comes from DDD Domain Driven Design .

3. What are the advantages of microservices?

  • Each microservice is small so that it can focus on a specific business function or business requirement.

  • Microservices can be developed individually by small teams of 2 to 5 developers.

  • Microservices are loosely coupled, functionally meaningful services that are independent whether they are in the development phase or deployment phase.

  • Microservices can be developed in different languages.

  • Microservices allow an easy and flexible way to integrate automated deployments through continuous integration tools like Jenkins, Hudson, bamboo.

  • New members of a team can go into production faster.

  • Microservices are easy to understand, modify, and maintain by a single developer, so that small teams can focus more on their work. Value does not need to be realized through cooperation.

  • Microservices allow you to leverage the latest technologies in fusion.

  • Microservices are just code for business logic, not mixed with HTML, CSS or other interface components.

  • Microservices can be asked to scale on the fly.

  • Microservices can be deployed on servers with mid-to-low-end configurations.

  • Easy to integrate with third parties.

  • Each microservice has its own storage capabilities and can have its own database. There can also be a consolidated database.


4. What are the disadvantages of a microservices architecture?

  • Microservices architecture can bring too many operations.

  • DevOps skills required (http://en.wikipedia.org/wiki/DevOps).

  • Possibly double the effort.

  • Distributed systems can be complex and difficult to manage.

  • Because the distribution deployment tracking problem is difficult.

  • As the number of services increases, management complexity increases.


5. Which situations are microservices suitable for?
    When you need to support desktop, web, mobile, smart TV, wearable, or even some kind of environment in the future that you may not know but need to support.


6. Which company or product uses a microservices architecture?
    Most large website systems such as Twitter, Netflix, Amazon and eBay have migrated from a traditional monolithic architecture to a microservices architecture

7. How do microservices communicate independently?
    It depends on the requirements, by using HTTP/REST, the data format is JSON or Protobuf (Binary protocol), the communication protocol is free.

8. Why is everyone talking about microservices these days?
    In the 15 years since SOA interviews, with the popularity of RESTful web services and the JSON data exchange format, it has become more and more convenient to build a connectable service simply and quickly.

 

development style 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 holistic architecture requires the product team to develop QA DBA and system operation management across product management Dev. After the introduction of the microservice architecture, the following figure is shown:

  Microservices promote the reorganization of the DevOps approach, dividing a bloated overall product development team into product teams divided according to different microservices, and a large overall platform team responsible for operation management, and the two interact through APIs , to achieve loose coupling 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 complete the delivery life cycle independently, as follows:

 

Microservice case

  Netflix's microservice architecture is as follows, focusing on high scalability and availability for global distribution:

  Twitter's microservice architecture, focusing on efficient and scalable data centers:

twitter microservices

 

 

http://my.oschina.net/u/1441440/blog/414592

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326932439&siteId=291194637