- PHP Microservices
- Carlos Pérez Sánchez Pablo Solar Vilari?o
- 320字
- 2021-07-09 18:50:04
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.
- Spring Boot開發與測試實戰
- SQL Server 2016數據庫應用與開發習題解答與上機指導
- 精通Python設計模式(第2版)
- HDInsight Essentials(Second Edition)
- C語言程序設計
- Mastering Unity 2D Game Development(Second Edition)
- 響應式Web設計:HTML5和CSS3實戰(第2版)
- Python入門很輕松(微課超值版)
- Hadoop大數據分析技術
- Sails.js Essentials
- Clojure Polymorphism
- Raspberry Pi Blueprints
- Java Web開發基礎與案例教程
- 循序漸進Vue.js 3前端開發實戰
- Python人工智能項目實戰