current location:Home > Technical Articles > PHP Framework > Swoole
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- How to run swoole in php-fpm mode
- Most of the modules in swoole can only be used in the CLI command line environment. Only the synchronous blocking swoole_client can be used in the php-fpm or apache environment.
- Swoole 3869 2019-12-09 09:35:46
-
- How to make a long connection with swoole
- swoole uses SWOOLE_KEEP to establish a long TCP connection. After enabling the SWOOLE_KEEP option, the socket will not be closed at the end of a request. The last connection created will be automatically reused the next time you connect.
- Swoole 4113 2019-12-09 09:34:36
-
- How to do message notification in swoole
- A message notification push function can be completed based on swoole and redis queue. Use swoole to start the resident process. How many are needed depends on your own situation. The number of swoole processes is best equal to the number of server CPU cores. Use swoole to start the resident process. The process continuously detects the values in the redis queue.
- Swoole 2876 2019-12-09 09:29:14
-
- The difference between traditional fpm synchronization mode and swoole coroutine
- The difference between the traditional fpm synchronization mode and the swoole coroutine is: 1. swoole can only run in the command line (Cli) mode, and we all use the command line for development and debugging; 2. the swoole coroutine is suitable for [I/O] intensive applications , under the same hardware configuration environment, swoole will carry more visits than the traditional synchronization mode.
- Swoole 2747 2019-12-09 09:28:45
-
- What are the prerequisites for installing swoole on Linux?
- Before installing swoole on Linux, you need to prepare the compilation environment of the PHP extension library. Use the phpize command to prepare the compilation environment of the PHP extension library, and then edit the php.ini configuration file to make PHP support swoole.
- Swoole 1743 2019-12-09 09:27:03
-
- How swoole works
- swoole operates in two modes. Single-threaded mode, this mode is the traditional asynchronous non-blocking Server. It is completely consistent with programs such as Nginx and Node.js. In process mode, Swoole provides a complete process management and memory protection mechanism. Even when the business logic is very complex, it can run stably for a long time.
- Swoole 2749 2019-12-09 09:22:46
-
- How swoole implements real-time push
- swoole+Redis implements real-time data push. Set up single-process protection; enter the program and define relevant configurations: the timeout of the socket session, set according to the business scenario, here is set to never timeout; initialize the Redis connection; when the script restarts, clear historical data.
- Swoole 3927 2019-12-09 09:14:22
-
- How to start swoole
- If swoole wants to automatically run your swoole Server when booting, you can add /usr/bin/php /data/webroot/www.swoole.com/server.php to the /etc/rc.local file.
- Swoole 6920 2019-12-09 09:06:45
-
- How to restart swoole
- swoole provides us with a smooth restart mechanism. We only need to send a specific signal to the main process of swoole_server to complete the restart of the server. For example: kill -USR1|-10 master_pid restarts all Worker processes.
- Swoole 5739 2019-12-07 14:24:13
-
- How swoole improves php performance
- Using swoole's high-availability built-in coroutine, the PHP code does not have any additional keywords, and the bottom layer will automatically schedule the coroutine. It only takes 0.2 seconds to read massive data from MySQL with 10,000 concurrent requests.
- Swoole 2959 2019-12-07 14:19:00
-
- How swoole implements coroutines
- Swoole has built-in coroutine capabilities since 2.0, and provides IO interfaces with coroutine capabilities (unified in the namespace Swoole\Coroutine\*). When enabling coroutines, please add the --enable-coroutine compilation option when compiling.
- Swoole 3155 2019-12-07 14:11:00
-
- How to hot update swoole
- Every time the code is updated, the service needs to be stopped and then restarted to update the code. However, this approach is relatively crude. In fact, swoole provides the reload feature and fully supports hot updates of code.
- Swoole 3344 2019-12-07 13:59:31
-
- How to turn on swoole
- Swoole is an extension of PHP that can be installed and enabled through PHP extension. Locate the location of the php.ini file through php -i | grep php.ini, configure extension=swoole.so, save and exit.
- Swoole 2961 2019-12-07 13:50:41
-
- How Swoole handles high concurrency
- swoole uses multi-threaded Reactor + multi-process Worker. Because reactor is based on epoll, each reactor can handle countless connection requests. In this way, swoole can easily handle high concurrency.
- Swoole 3087 2019-12-07 13:32:03
-
- How to test swoole
- Swoole can use heartbeat detection, which is very simple to use. You only need to configure heartbeat_check_interval and heartbeat_idle_time.
- Swoole 2893 2019-12-07 13:21:26