Skip to content

reframe: HTTP Caching support #282

@lidel

Description

@lidel

Reframe spec was added in #272, and it includes HTTP as an interoperable way of sending request-response dag-json messages.

Problem

Reframe messages used in contexts like indexers are queries, being able to cache popular responses could significantly reduce the cost and improve performance when running an indexer or a similar service.

Initial spec in #272 requested all requests to be over HTTP POST method.

Caching in POST-only API will be... really tricky:

  • POST is not idempotent and not "cacheable" by default, or at least not the way one would think.
  • Specs are vague around this, but in practice clients and CDNs work more or less like this:
    • HTTP Caching model is around "resources", not "responses":
    • if you set Cache-Control or Expires headers AND set Content-Location on POST response, then response payload will be cached and returned for any future GET requests to the Content-Location – bit sketchy, and may not work this way everywhere
    • POST requests will not benefit from any preexisting cache, because they potentially mutate the resource, overriding anything that was cached.

Search for solution

Ideas welcome, feel free to comment below

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium: Good to have, but can wait until someone steps updif/expertExtensive knowledge (implications, ramifications) requiredhelp wantedneed/analysisNeeds further analysis before proceedingneed/community-inputNeeds input from the wider communitytopic/http-apiTopic http-api

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions