Skip to content

Multiple parallel subrequests #7

Closed
@bengrimm

Description

@bengrimm

Right now location capture is done in the background, but you're limited to issuing one request at a time. If you need to pull data from multiple sources, your page is as slow as the sum of all subrequests, but would be reduced to just the slowest if they could be issued in parallel.

If a table were passed to location.capture like this, then it would respond with an identical table of res objects.

res = ngx.location.capture({ "http://this/...", "http://that/...", "http://..." })
ngx.print( res[0].body, res[1].body, res[2].body )

Or it may be easier to use a separate function (e.g. capture_multi).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions