Varnish as a redirector for a millions URLs

Rangel, Raul Raul.Rangel at disney.com
Thu May 23 15:57:56 CEST 2013


Can you make a backend that takes a url, looks it up in the database and returns a 301? You could then cache the 301 in varnish. Thought tht will only work for GETs. Once you get into POST requests it's another story.

Raul

From: varnish-dev-bounces at varnish-cache.org [mailto:varnish-dev-bounces at varnish-cache.org] On Behalf Of Aleem B
Sent: Thursday, May 23, 2013 7:41 AM
To: Poul-Henning Kamp
Cc: varnish-dev at varnish-cache.org
Subject: Re: Varnish as a redirector for a millions URLs

It's based on a DB lookup. Currently I am using NGINX + Redis and there are about a million URLs.

Aleem

On Thu, May 23, 2013 at 6:37 PM, Poul-Henning Kamp <phk at phk.freebsd.dk<mailto:phk at phk.freebsd.dk>> wrote:
In message <CA+=Uhp_pepXsb6Q_ORQpYe+AhWSh_yytRNjKBzBBA_FxwJb28Q at mail.gmail.com<mailto:Uhp_pepXsb6Q_ORQpYe%2BAhWSh_yytRNjKBzBBA_FxwJb28Q at mail.gmail.com>>

>I currently use nginx + redis + lua module to setup redirects for close to
>a million old URLs that have been ported to a new platform.
Are the redirects based on rules ?

Ie, something like:

        /article?ID=#####  -> /#####

or is it a database lookup to figure out the mapping ?



--
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG<mailto:phk at FreeBSD.ORG>         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20130523/259bd863/attachment-0001.html>


More information about the varnish-dev mailing list