current location:Home > Technical Articles > PHP Framework > Swoole

  • How to run swoole in php-fpm mode
    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
    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
    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 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?
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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
    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

Tool Recommendations

jQuery enterprise message form contact code

jQuery enterprise message form contact code is a simple and practical enterprise message form and contact us introduction page code.
form button
2024-02-29

HTML5 MP3 music box playback effects

HTML5 MP3 music box playback special effect is an mp3 music player based on HTML5 css3 to create cute music box emoticons and click the switch button.

HTML5 cool particle animation navigation menu special effects

HTML5 cool particle animation navigation menu special effect is a special effect that changes color when the navigation menu is hovered by the mouse.
Menu navigation
2024-02-29

jQuery visual form drag and drop editing code

jQuery visual form drag and drop editing code is a visual form based on jQuery and bootstrap framework.
form button
2024-02-29

Organic fruit and vegetable supplier web template Bootstrap5

An organic fruit and vegetable supplier web template-Bootstrap5
Bootstrap template
2023-02-03

Bootstrap3 multifunctional data information background management responsive web page template-Novus

Bootstrap3 multifunctional data information background management responsive web page template-Novus
backend template
2023-02-02

Real estate resource service platform web page template Bootstrap5

Real estate resource service platform web page template Bootstrap5
Bootstrap template
2023-02-02

Simple resume information web template Bootstrap4

Simple resume information web template Bootstrap4
Bootstrap template
2023-02-02

Cute summer elements vector material (EPS PNG)

This is a cute summer element vector material, including the sun, sun hat, coconut tree, bikini, airplane, watermelon, ice cream, ice cream, cold drink, swimming ring, flip-flops, pineapple, conch, shell, starfish, crab, Lemons, sunscreen, sunglasses, etc., the materials are provided in EPS and PNG formats, including JPG previews.
PNG material
2024-05-09

Four red 2023 graduation badges vector material (AI EPS PNG)

This is a red 2023 graduation badge vector material, four in total, available in AI, EPS and PNG formats, including JPG preview.
PNG material
2024-02-29

Singing bird and cart filled with flowers design spring banner vector material (AI EPS)

This is a spring banner vector material designed with singing birds and a cart full of flowers. It is available in AI and EPS formats, including JPG preview.
banner picture
2024-02-29

Golden graduation cap vector material (EPS PNG)

This is a golden graduation cap vector material, available in EPS and PNG formats, including JPG preview.
PNG material
2024-02-27

Home Decor Cleaning and Repair Service Company Website Template

Home Decoration Cleaning and Maintenance Service Company Website Template is a website template download suitable for promotional websites that provide home decoration, cleaning, maintenance and other service organizations. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-05-09

Fresh color personal resume guide page template

Fresh color matching personal job application resume guide page template is a personal job search resume work display guide page web template download suitable for fresh color matching style. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-29

Designer Creative Job Resume Web Template

Designer Creative Job Resume Web Template is a downloadable web template for personal job resume display suitable for various designer positions. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28

Modern engineering construction company website template

The modern engineering and construction company website template is a downloadable website template suitable for promotion of the engineering and construction service industry. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28