Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand the distributed architecture in php

2025-01-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Most people do not understand the knowledge points of this article "how to understand the distributed architecture in php", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to understand distributed architecture in php" article.

In PHP, distributed architecture means that multiple servers handle different tasks, store data on multiple independent machines and devices, and use multiple storage servers to share the storage load, so as to improve the reliability, availability and scalability of the system.

This article operating environment: Windows10 system, PHP7.1 version, Dell G3 computer.

What does distributed architecture mean in php

What are the specific ways to implement php distributed architecture? this is worth discussing.

For instance. For example, you have a complete system, the system has several large modules. The general small plan is that several small modules are all on the same WEB server. So when PV,UP comes up, he can't bear the pressure. Then you can do the appropriate split. There is one server per module, and the RPC framework is used to share the data between the modules. Distributed one-sentence summary, split under the premise of ensuring the sharing of data in the whole system. There is also the concept of distinction, distribution and load balancing.

Distribution is a solution that has nothing to do with language.

Distributed network storage technology is to store data on multiple independent machines and devices. The distributed network storage system adopts a scalable system structure, uses multiple storage servers to share the storage load, and uses the location server to locate storage information, which not only solves the bottleneck problem of single storage server in the traditional centralized storage system, but also improves the reliability, availability and expansibility of the system.

Php distribution means that multiple servers handle different tasks, which refers to the general business, such as multiple servers, some processing logs are distributed to some servers, some processing orders are issued, and some are distributed to some servers.

As a guarantee of collaborative development specification and development efficiency, the framework has to be introduced into daily development, but once the encapsulation of the framework is added, it is bound to affect the overall performance of the php interface.

The performance of php7+swoole-based php code has outperformed the statically compiled go language.

Laravel, the popular php framework, does solve a lot of specification and development efficiency problems, but its bloated architecture and encapsulation implemented in php make its performance poor.

In view of this situation, this architecture chooses the c extension framework phalcon as the development framework to minimize the performance loss caused by the framework.

After deployment using Web cluster, the first thing to adjust is the user status information and attachment information. User state can no longer be saved to the Session, nor can the cache use the local Web server's file cache, as well as attachments, nor can it be saved on the Web server.

Because it is necessary to ensure that the state of each Web server in the cluster is exactly the same. Therefore, you need to save the user state, cache, and so on to a dedicated cache server, such as Memcache. Attachments need to be saved to cloud storage.

The above is about the content of this article on "how to understand the distributed architecture in php". I believe we all have some understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report