An open API service indexing awesome lists of open source software.

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.

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