Limiting users to the website

Per Buer perbu at varnish-software.com
Mon Nov 19 09:41:13 CET 2012


Hi Roy,

I think the solution outlined could be implemented without changing your
application at all, actually. Once you are nearing capacity just signal it
to Varnish and new users will be kept in a holding pattern purely in
Varnish. Your application can be completely unaltered. The only change
outside Varnish would be the probe that detects that you are nearing full
capacity which sounds like a cronjob or some equivalent.

Cheers,

Per.


On Sun, Nov 18, 2012 at 11:42 PM, Narayan, Roy <
Roy.Narayan at au.harveynorman.com> wrote:

> Hi Simon,
>
> Thanks for your reply.
>
> I am looking to achieve the solution within our existing infrastructure
> and without performing much changes to the current application deployment.
>
> I was trialling with "first_byte_timeout" which if reached will fall into
> "vcl_error" and then serving a busy page from there. However there are
> certain hurdles (how to distinguish a new user with existing and other
> things that I have not been able to think of)
>
> Is there anything in this regard that you or someone may have done ?
>
> Thanks
> Roy N.
>
>
>
> -----Original Message-----
> From: varnish-misc-bounces at varnish-cache.org [mailto:
> varnish-misc-bounces at varnish-cache.org] On Behalf Of Simon Lyall
> Sent: Monday, 19 November 2012 9:17 AM
> To: varnish-misc at varnish-cache.org
> Subject: Re: Limiting users to the website
>
> On Mon, 19 Nov 2012, Narayan, Roy wrote:
> > I am looking to limit users to the website once we hit capacity. Any
> > new user will be directed to a “busy page” whilst existing users can
> continue on the site.
> >
> > How can this be achieved via varnish ?
> >
> > Any suggestions/solutions will be much appreciated.
>
> Give everybody a short-lived cookie. If they have the cookie then serve
> them pages as normal.
>
> "New" users won't have the cookie, so make the use a different backend and
> make that backend "fail first" with a pretty error page.
>
>
> --
> Simon Lyall  |  Very Busy  |  Web: http://www.darkmere.gen.nz/ "To stay
> awake all night adds a day to your life" - Stilgar | eMT.
>
>
> ************************************************************************************************
> DISCLAIMER
>
> Confidential Communication: This email and any attachments are intended
> for the addressee(s) only and are confidential. They may contain legally
> privileged or copyright material. If you are not the intended recipient,
> please contact the sender immediately by reply email and delete this email
> and any attachments. You must not read, copy, use, distribute or disclose
> the contents of this email without consent of Harvey Norman Holdings
> Limited ACN 003 237 545 (and its related subsidiaries) ("Harvey Norman")
> does not accept responsibility for any unauthorised use or reliance on the
> contents of this email.
>
> Harvey Norman does not represent or warrant that the integrity of this
> email has been maintained or that it is free from errors, viruses,
> interceptions or interference. Any views expressed by the sender do not
> necessarily represent the views of Harvey Norman.
>
> This notice should not be removed from this email.
>
> ************************************************************************************************
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc




-- 
 <http://www.varnish-software.com/> *Per Buer*
CEO | Varnish Software AS
Phone: +47 958 39 117 | Skype: per.buer
We Make Websites Fly!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20121119/7a24ce38/attachment.html>


More information about the varnish-misc mailing list