swoole can be clustered.
ClusterCluster
Server nodes can be divided into 3 roles
The entry node can also be called the GateWay gateway. External users directly connect to the AccessNode through TCP, and the AccessNode maintains a long connection with the client and performs data interaction.
Web service cluster, Nginx is AccessNode (GateWay), the browser connects to Nginx through the external network, and Nginx parses and processes the request. If it is a static file request, the file content is sent directly to the client. If it is a dynamic php request, Nginx forwards it to the back-end PHP-fpm or other language application server for processing.
WebIM, WebIM generally uses Http long polling (Comet) or WebSocket as AccessNode, and the browser is directly connected to swoole_websocket_server to realize real-time interaction of messages.
AccessNode must be fully asynchronous to ensure that the entire system can handle a large amount of concurrency. AccessNode needs to monitor the external network,
ServiceNode
service node, and all business logic is completed in ServiceNode. Large-scale Web websites are also subdivided into the Web layer and the logic layer. The Web is only responsible for front-end display, and all real business logic is placed on the back-end logic layer Server.
Recommended learning: swoole video tutorial
The above is the detailed content of Can swoole be clustered?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

WebStorm Mac version
Useful JavaScript development tools
