https://github.com/nilportugues/php-parallel_request_playground
Testing fastest parallel HTTP requests with the existing PHP technologies.
https://github.com/nilportugues/php-parallel_request_playground
coroutines curl http parallel parallelization php php7 playground psr-7
Last synced: 3 months ago
JSON representation
Testing fastest parallel HTTP requests with the existing PHP technologies.
- Host: GitHub
- URL: https://github.com/nilportugues/php-parallel_request_playground
- Owner: nilportugues
- Created: 2016-02-21T12:34:34.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-05-23T09:53:17.000Z (about 7 years ago)
- Last Synced: 2025-03-05T15:05:48.284Z (3 months ago)
- Topics: coroutines, curl, http, parallel, parallelization, php, php7, playground, psr-7
- Language: PHP
- Homepage: http://nilportugues.com
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHP HTTP Request Coroutines
Playground to test how to make the fastest parallel HTTP requests with the existing PHP technologies.
## Install
This repository assumes that you're developing using modern tools such as `composer` and `docker`.
Just copy & paste this in your terminal.
```sh
composer install && sh docker.sh start
```## The Experiment
The test consists in firing 5 requests to a slow site, `http://localhost:8000`. This page by default, will load after `5 seconds`, so firing up 5 request leaves us with the following:
- Fastest parallel processing theoretical time: `5 seconds`.
- Fastest serial processing theoretical time: `25 seconds`.## Configuration
You may modify the delay time by modifying the `index.php` file found in `public/index.php`.
Its contents just simulate a slow loading website:
```php