Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-3505

New plugin: cache promotion policies

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.0.0
    • Plugins

    Description

      This plugin will let you decide at cache write time if you really want to allow the object to get into cache or not. Once in cache, it'll of course continue to be served out of cache. The typical use case here is for a small cache, where the tail-end content is huge. Instead of churning the disks, we only allow to write objects to cache if they are "popular" enough.

      The first implementation only implements a very simple statistical policy, ChancePolicy() which takes a percentage argument. So, you give it a percentage, say 5%, which means there's a 5% chance that the response gets written to cache. 95% of the time the requests will go to origin instead.

      Caveat: There's an unfortunate problem with the APIs I was hoping to use, so right now it can only make the decision to write to cache or not in the TS_HTTP_READ_RESPONSE_HDR_HOOK hook using TSHttpTxnServerRespNoStoreSet(txnp, 1);

      Attachments

        Issue Links

          Activity

            People

              zwoop Leif Hedstrom
              zwoop Leif Hedstrom
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: