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

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.

主站蜘蛛池模板: 沁水县| 华蓥市| 陵水| 济宁市| 河津市| 全椒县| 上杭县| 西林县| 繁昌县| 句容市| 涞水县| 从江县| 乐都县| 类乌齐县| 溆浦县| 新郑市| 泰顺县| 六安市| 白河县| 宁波市| 雅安市| 广元市| 白山市| 肥城市| 兴宁市| 息烽县| 上思县| 客服| 黄石市| 常宁市| 连平县| 五大连池市| 南岸区| 青川县| 涪陵区| 福贡县| 临沧市| 邵东县| 奉节县| 宝兴县| 尤溪县|