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

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.

主站蜘蛛池模板: 封开县| 治多县| 安义县| 大同市| 铁岭市| 宾阳县| 肃宁县| 崇义县| 内江市| 德令哈市| 七台河市| 云梦县| 工布江达县| 石楼县| 深圳市| 五指山市| 潮安县| 开远市| 肇东市| 乐亭县| 镇安县| 麻城市| 安吉县| 通辽市| 达孜县| 炉霍县| 湖南省| 曲阳县| 马尔康县| 福安市| 苗栗县| 新龙县| 灯塔市| 连城县| 凤山市| 团风县| 察哈| 凤山县| 承德县| 东平县| 深水埗区|