search
HomePHP FrameworkSwooleCan swoole be clustered?

Can swoole be clustered?

Dec 23, 2019 pm 02:12 PM
swoole

Can swoole be clustered?

swoole can be clustered.

ClusterCluster

Server nodes can be divided into 3 roles

AccessNode

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!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment