Warm up a server (populate cache)

If you need to start a server, you might want to populate it first with some content, before putting it live to the public

wget --no-directories --recursive --level 2 --delete-after http://your-host.com

The publications you want to warm up need to be inside the the host file
The

/etc/hosts

on all the machines point the URL of the publications to 127.0.1.1, so you will hit varnish directly, and warm it up.

It takes about 5 minutes: it fetches the front page, and everything linked on the front page, a lot of stories and a lot of section pages.

By the time it’s done it will have expired from cache, but it will be kept around for “grace”.

To check if the precess has finished:

ps ww -fC wget