Preloading Cached Contents into Varnish?

Joe Chen joec1502 at gmail.com
Fri Jun 11 22:40:55 CEST 2010


On Fri, Jun 11, 2010 at 1:23 PM, Adrian Otto <aotto at mosso.com> wrote:
>
> I like Varnish's performance in caching and try to add a capability of
>> preloading cached contents into Varnish server.
>>
>> My understanding is that I need to find a right spot for inserting hash
>> index, and then right spot for inserting cached contents into cache storage.
>>
>
> Why not just implement a simple HTTP client script to walk the list of
> URL's you want to load on some suitable interval? This way you don't need
> any code modifications.
>
> This would work if I could pull the contents.  Unfortunately, my cached
contents can not be pulled in, can only be pushed in by an outside  server.
So my own program will receive the pushed-in contents in terms of http
header and body, and then inserted them into the Varnish cache storage.

>
>  I also intend to use memory as only cache storage, not hard disk.
>>
>
> Simply define the storage file/volume to be smaller than your main memory
> minus some capacity for the server to run in. In my use case on a server
> with 32 GB RAM, I use a 30GB storage volume, and I see practically no disk
> access because the cached pages always fit in memory.
>

Didn't known that, I'll definitely try it.  But my running system will be
disk-less, so not sure if I have to change the code or not.

Thanks,

--Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20100611/9b93f4ff/attachment-0003.html>


More information about the varnish-dev mailing list