Micro-Service Understanding

Source: Internet
Author: User

(Go to network)
This microservices architecture model profoundly affects the relationship between the application and the database, unlike traditional multiple services that share a single database, and the microservices architecture has its own database for each service . In addition, this way of thinking also affects the enterprise-level data model. At the same time, this pattern implies multiple data, but if you want to get the benefits of microservices, it is necessary for each service to have a single database, because this architecture requires this loose coupling. The following figure shows the sample application database schema.


Each service has its own database, and each service can be used in a more appropriate database type, also known as a multi-language consistency architecture. For example, driver management (discovering which driver is closer to the passenger) must use a database that supports geo-information queries.

on the face of it, the microservices architecture pattern is a bit likeSOA, they all consist of multiple services. However, the problem can be seen from a different perspective, and the microservices architecture pattern is aWebServices (ws-) andESBService ofSOA. MicroServices applications are happy with simple, lightweight protocols such asREST, but notws-, avoid using it inside the microservicesESBas wellESBsimilar functionality. MicroServices architecture mode also refuses to useCanonical SchemawaitSOAconcept.

?

?

Benefits of MicroServices Architecture

The microservices architecture model has many benefits. First, the complexity of multiple service methods is solved by decomposing huge monolithic applications. In the case of constant functionality, the application is decomposed into multiple manageable branches or services. Each service has a boundary defined with rpc- or a message-driven API . The MicroServices architecture model provides a modular solution for features that are difficult to achieve with single-piece encoding, so that individual services can be easily developed, understood, and maintained.

Second, this architecture enables each service to be developed by a dedicated development team.

Thirdly, the microservices architecture pattern is a standalone deployment of each microservices.

Finally, the MicroServices architecture pattern allows each service to scale independently.

The inadequacy of the micro-service architecture

  Fred Brooks in the - years ago wrote that "There is no silver bullets" , like any other technology, there are inadequacies in the micro-service architecture. One of them is similar to his name, "MicroServices" emphasizes the size of the service, and in fact some developers preach to build a slightly larger,10-100 LOC Service Group. Although small services are more likely to be adopted, don't forget that this is a terminal choice rather than a final goal. The purpose of microservices is to effectively split applications, enabling agile development and deployment.

Another major disadvantage is that micro-service applications are distributed systems, which can lead to inherent complexity.

Another challenge for MicroServices comes from partitioned database architectures.

Testing an application that is based on a microservices architecture is also a complex task.

Another challenge is that changes in the application of MicroServices architecture patterns will ripple across multiple services.

Deploying a microservices application is also complex, and a distributed application simply needs to deploy its own server behind the complex equalizer. Each application instance needs to be configured with basic services such as databases and message middleware. In contrast, a microservices application is typically comprised of a large number of services. For example, depending onAdrian Cockcroft, Hailo has A different service composition , NetFlix There are approximately four services. Each service has more than one instance. This creates a number of parts that need to be configured, deployed, extended, and monitored, in addition to completing a service discovery mechanism (published in subsequent articles) to discover the address (including server address and port) of the communication service with it. The traditional problem-solving approach cannot be used to solve such complex problems. In succession, a successful deployment of a microservices application requires the developer to have sufficient control of the deployment method and a high degree of automation.

an automated approach is to usePaaSservices, such ascloud Foundry . PaaS provides developers with a simple way to deploy and manage microservices, and it packs all of these issues into a built-in solution. At the same time, system and network experts who configure PaaS can use best practices and strategies to simplify these issues. Another way to automate the deployment of microservices applications is to develop the most basic PaaS system for you. A typical starting point is the use of a clustered scheme, such as using Mesos or Kuberneteswith Docker. Later series we'll look at how the software deployment approach, such as NGINX, provides a convenient way to provide caching, permissions control,API Statistics, and monitoring at the micro-service level .

Micro-Service Understanding

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.