2017 © Pedro Peláez
 

silverstripe-module distributedparallelrequests

Distrubutes requests across different domains to allow them to be run in parallel

image

internetrix/distributedparallelrequests

Distrubutes requests across different domains to allow them to be run in parallel

  • Wednesday, October 12, 2016
  • by Internetrix
  • Repository
  • 5 Watchers
  • 2 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Distributed Parallel Requests

Maintainer Contact

Requirements

SilverStripe 3.4.1. (Not tested with any other versions), (*1)

Description

The Distributed Parallel Requests module replaces the domain for relative images, js and css. The idea is to trick the browser into thinking they are on different domains so that requests can be made concurrently, (*2)

Configuration

After installation, make sure you rebuild your database through dev/build and run ?flush=all Unfortunatly the framework does not have a suitable extension hook. Add the following function to Page_Controller.php, (*3)

protected function handleAction($request, $action) {
    $result = parent::handleAction($request, $action);
    $this->extend('modifyResponse', $result);

    return $result;
}

You will then need to define what domains should be used. By default subdomains are used i.e cdn1, cdn2, cdn3, cdn4, (*4)

Example 1 (setup with sub domains)

Configure the domains, (*5)

ParallelLinkExtension:
    servers:
        - 'cdn0'
        - 'cdn1'
        - 'cdn2'
        - 'cdn3'

Example 2 (setup with full domains)

Configure the domains, (*6)

ParallelLinkExtension:
    use_full_server_domain: true
    servers:
        - '//cdn0.mysite.com.au'
        - '//cdn1.mysite.com.au'
        - '//cdn2.mysite.com.au'
        - '//cdn3.mysite.com.au'

The Versions

12/10 2016

dev-master

9999999-dev

Distrubutes requests across different domains to allow them to be run in parallel

  Sources   Download

The Requires

 

by Guy Watson

silverstripe distribute requests parallel