官术网_书友最值得收藏!

Microservice architecture pattern

In the previous section, we discussed the monolithic application architecture – in other words, the collection of all modules of an application as a single artifact. There is another architecture pattern that structures an application so that all modules of that application are loosely-coupled, share their services, and are independently deployable. In this approach, each service must be focused on a set of narrowly-related functions and each service runs independently and as a unique process. An application might consist of services, such as the Order Service, the Account Service, and so on. This approach is known as microservice architecture.

Microservice architecture refers to a method of software development in which a large software application is divided into several independently deployable services. These services are small, modular, and follow the single responsibility principle of software development. Each service is treated as a unique process that communicates with each other through a well-defined mechanism. We will discuss this further in Chapter 4, Inter-Service Communication.

In microservice architecture, all services communicate with each other either synchronously, using HTTP or REST, or asynchronously, using AMQP or Kafka. Each service contains its own database. The basic idea behind microservice architecture is to split up your monolithic application into a set of smaller, interconnected services.

A microservice architecture pattern separates concerns on a process level. All processes in this architecture are loosely coupled with each other. They communicate using predefined rules to achieve a business goal. So, let's move on and look at an example of a microservice-based application.

主站蜘蛛池模板: 鸡东县| 雷波县| 嘉兴市| 乌拉特后旗| 巩义市| 新平| 沽源县| 武汉市| 乌恰县| 清镇市| 历史| 丽江市| 汉寿县| 渝中区| 阳曲县| 萝北县| 沙雅县| 镶黄旗| 岑溪市| 班戈县| 朔州市| 金坛市| 长乐市| 马尔康县| 冕宁县| 炎陵县| 永吉县| 芜湖市| 涞源县| 安溪县| 五大连池市| 洪江市| 呼和浩特市| 临城县| 红安县| 营山县| 葫芦岛市| 汕头市| 秦安县| 阿坝县| 雷州市|