HTTP Requests Aggregator
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

HRA - HTTP Requests Aggregator

This is a legacy prototype project!

This project is not supported or updated anymore. If you're looking for a way to execute multiple queries in parallel, you should consider using HTTP Pipelining or (preferably) SPDY instead.


HTTP Requests Aggregator bundles multiple HTTP requests into one. You may use it to reduce the number of HTTP requests that browser has to perform in order to get all the data it needs.


  1. Send POST request to URL /hra/json with JSON body like this:

         google: {
             url: ''
         facebook: {
             url: ''
  2. Receive response like this:

         google: {
             statusCode: 301,
             headers: {...},
             body: '<HTML>...</HTML>\r\n'    // yup, Google doesn't give a damn about markup validity
         facebook: {
             statusCode: 302,
             headers: {...},
             body: ''                        // and Facebook doesn't even bother to explain anything


  1. Install latest node.js

  2. Clone the git repository

  3. Create config.local.js and redefine any settings you wish from config.js like so:

     config = module.parent.exports;
     config.http.port = 8000;
  4. Configure your frontend server to proxy requests to HRA. Here's example for nginx:

     location /hra/ {
  5. Start HRA: bin/hra-server

  6. Force your fontend server to reload config, e.g. /etc/init.d/nginx reload

Optional steps for devs:

  1. Install npm
  2. npm install nodeunit
  3. npm install request
  4. Create test/config.local.js and redefine any settings you wish from test/config.js.
  5. Run tests: nodeunit test/test.js