Skip to content
This repository was archived by the owner on Sep 28, 2019. It is now read-only.
This repository was archived by the owner on Sep 28, 2019. It is now read-only.

Ensure support for pull-through caches #10

@jonasfj

Description

@jonasfj

A pull-though cache is just a simple HTTP cache... When working in data-center etc, we won't have cheap object storage available, so we have to do pull-through caches.

cloud-mirror can support this by taking the rawUrl choosing a cache server using something like: cacheServers[fnv(rawUrl) % cacheServers.length]...
So that if we have multiple cache servers, urls get distributed based on hash of the url...

The put operation for such a pull-through cache is pretty naive, as there is no copying, just choose a cache server and rewrite the url. This could be a special implementation CacheHandler as proposed in #9. Or we could do the redis and sqs messaging even if it is unnecessary and do a trivial implementation of StorageProvider.

Either way, when region detection based on ip ranges is moved to cloud-mirror (issue #6) it would be very nice to support backends that are essentially pull-through caches. Otherwise, support for data-center and providers like digital ocean or packet will be hard.

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