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

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.

主站蜘蛛池模板: 常州市| 噶尔县| 镶黄旗| 金塔县| 玛纳斯县| 梅州市| 胶州市| 霞浦县| 大港区| 凯里市| 株洲市| 孟村| 砚山县| 新蔡县| 江阴市| 甘泉县| 海阳市| 义乌市| 西畴县| 辽阳市| 柞水县| 南通市| 阳新县| 尉犁县| 宁化县| 浦县| 巴东县| 杭锦旗| 宾阳县| 砀山县| 贵定县| 杨浦区| 仙游县| 新野县| 琼海市| 嘉峪关市| 时尚| 栾川县| 开江县| 砚山县| 临潭县|