In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces you how to deploy high-performance microservices in PHP, the content is very detailed, interested friends can refer to it, I hope it can help you.
Single application solutions
For a large-scale Internet system, it generally contains multiple applications, and there are often common services between applications, and there are calling relationships between applications. In addition, there are other challenges for large Internet systems, such as how to cope with the rapid growth of users, how to manage the rapid iteration of product development by R & D teams, and how to keep product upgrades more stable.
Therefore, in order to make the service get good reuse, the module is easier to expand and maintain, we hope that the service and the application are separated, and a service no longer belongs to an application, but is maintained separately as an independent service. The application itself is no longer a bloated stack of modules, but a combination of modular service components.
servitization
characteristics
So what about service to those bright features?
Applications are broken down into services by business
Each service can be deployed independently
Services can be shared by multiple applications
Services can communicate with each other
The architecture is clearer.
The core module is stable and upgraded by service component, avoiding the risk brought by frequent release.
Easy to manage
Separate team maintenance, clear work, clear responsibilities
Service multiplexing, code multiplexing
Very easy to expand.
Challenges of Service
After the system becomes a service, it increases the complexity of dependencies and the number of interactions between services. In FPM development mode. Because can not resident memory brought to us, every request has to start from zero to exit the process, adding a lot of useless overhead, database connection can not be reused also can not be protected, because fpm is a process as a unit of fpm process number also determines the number of concurrency, this is also fpm development simple to bring us problems. So why is it that Java is popular now, and. NET and PHP are not good at this. PHP is not memory-resident, needless to say. Besides, there are many other problems that need to be solved.
Is there a good plan? The answer is yes, it is-Swoft. Swoft is an RPC framework with service governance capabilities. Swoft is the first PHP memory-resident coroutine full-stack framework, based on the high-performance coroutine swoole to create a PHP world Spring Boot
Swoft provides a more elegant way to use RPC services like Dubbo. Swoft performance is excellent with Golang-like performance. Here is a test of Swoft performance.
ab stress test processing speed is amazing, in i78 generation CPU, 16GB memory under 100000 requests only 5 seconds time in fpm development mode is basically impossible to achieve. This is also sufficient proof of the high performance and stability of Swoft`,
Elegant service governance
Service Registration and Discovery
Microservice governance often involves registering services launched to third-party clusters, such as consumer/ etcd, etc. Take the swoft-consumer component in the Swoft framework to achieve service registration and discovery as an example.
implementing logical
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.