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

Design and architecture to build the basic platform for microservices

Creating an application based on microservices is not like a monolithic application. For this reason, we have to pide our functionalities into different services. To do this, it is important to follow an adequate design and structure each of the microservices according to its requirements.

The design takes care of piding the application into logical parts and groups them according to their existing relationship. The architecture takes care of defining which concrete elements support each of the microservices, for example, where the data is stored or the communication between the services.

Throughout the book, we will follow the given structure for each microservice. In the following image, you will see the structure of one of the microservices, the rest of them are similar; however, some parts are optional:

All the requests for our microservices come from a REVERSE PROXY as this allows us to balance the load. Also, we use NGINX as a gateway for the API built in PHP. To reduce the load and increase the performance of PHP and NGINX, we can use a CACHE layer.

In case we need to execute big, resource consuming tasks, or the tasks do not need to be executed in a concrete time window, our API can use a QUEUE system.

In case we need to store some data, our API is responsible for managing the access and saving the data in our DATA STORE.

Note

In this book, we will be using containerization, a new virtualization method which spins ups containers instead of full virtual machines. Each container will have only the minimum resources and software installed to run your application.

We can use Telemetry (it is a system that gets the stats from the container) and autodiscovery (it is a system that helps us to see which containers are working properly) to supervise the container ecosystem.

主站蜘蛛池模板: 黄冈市| 津南区| 罗甸县| 万荣县| 济阳县| 盐亭县| 清镇市| 新和县| 高邑县| 龙胜| 邻水| 黔南| 洛隆县| 永寿县| 绥宁县| 芜湖县| 长宁区| 长海县| 商洛市| 江口县| 伊春市| 马尔康县| 陆河县| 石台县| 北川| 崇文区| 新津县| 邵阳县| 顺义区| 婺源县| 桐梓县| 阿城市| 敦煌市| 偃师市| 六枝特区| 怀宁县| 伊川县| 汉源县| 金昌市| 长春市| 岚皋县|