/ Zope / Apsis / Pound Mailing List / Archive / 2008 / 2008-10 / reading request parameters

[ << ] [ >> ]

[ Need comments on renter or managed servers / ... ] [ Global TimeOut Value / "Kiriki Delany" ... ]

reading request parameters
"Andreas Andersson" <andreas.andersson(at)gmail.com>
2008-10-15 09:35:53 [ FULL ]
Hi!

I've been running pound to do simple load balancing/failover between 3
machines using round robin and session tracking via cookies. Now I have new
need. I need to be able to send an additional request parameter (ie
myPage.php?host=host_1) and have pound direct me to host_1 instead of the
one in the session (or instead of the next one in the case of no cookie).

Is that possible using pound?

Psedo code:
if host_parameter
  use host_parameter
else if session cookie
  use session cookie
else
  use default / round robin

Thanks
[...]
Attachments:  
text.html text/html 731 Bytes

Re: [Pound Mailing List] reading request parameters
Albert <pound(at)alacra.com>
2008-10-15 14:42:38 [ FULL ]
Yes, we do something similar here.  Create a new "Service" directives, 
using "URL" directive to catch "host=host_1". It'll look something like 
this:
Service
    URL ".*host=host_1*"
    BackEnd
       Address host_1
       Port   80
    End
End

Make sure this Service is declared before your session cookie and 
round-robin Service directives.


Andreas Andersson wrote:[...]
Attachments:  
text.html text/html 1473 Bytes

RE: [Pound Mailing List] reading request parameters
"Alfonso Espitia" <aespitia(at)castleworldwide.com>
2008-10-15 14:52:32 [ FULL ]
I've been playing around with a similar configuration here and it seems
to work the way I want it to.

Basically, I set up a bunch of different services that match on
different extensions.

I believe the first match in the config is what gets used.

So, if you have a service (listed first) that looks for the host
parameter it should trigger that service first.  I believe this is how
it works, at least it seems to behave that way.  Can anyone confirm that
the first match is what gets used?

Thanks.

--Alfonso

 

-----Original Message-----
From: Andreas Andersson [mailto:andreas.andersson(at)gmail.com] 
Sent: Wednesday, October 15, 2008 3:36 AM
To: pound(at)apsis.ch
Subject: [Pound Mailing List] reading request parameters

Hi!

I've been running pound to do simple load balancing/failover between 3
machines using round robin and session tracking via cookies. Now I have
new need. I need to be able to send an additional request parameter (ie
myPage.php?host=host_1) and have pound direct me to host_1 instead of
the one in the session (or instead of the next one in the case of no
cookie).

Is that possible using pound?

Psedo code:
if host_parameter
  use host_parameter
else if session cookie
  use session cookie
else
  use default / round robin

Thanks

--
Read my blog (at) http://www.raven.nu/blog


--
To unsubscribe send an email with subject unsubscribe to pound(at)apsis.ch.
Please contact roseg(at)apsis.ch for questions.
[...]

Re: [Pound Mailing List] reading request parameters
Dave Steinberg <dave(at)redterror.net>
2008-10-15 16:36:56 [ FULL ]
Alfonso Espitia wrote:[...]

Yes, in my experience that's how pound works.

[...]

Re: [Pound Mailing List] reading request parameters
"Andreas Andersson" <andreas.andersson(at)gmail.com>
2008-10-16 09:29:51 [ FULL ]
Thanks. This looks promising, I have one question and one problem though :)

1) What did I do to deserv "pound: MONITOR: worker exited normally 127,
restarting..." on all request? I don't seem to get anything back either, it
just closes immediately.

2) Will the services that holds the URL requirement store information about
the cookies for future request? I would like it to go the same machine on
subsequent calls even without the host=host_1.

Thanks.

On Wed, Oct 15, 2008 at 14:42, Albert <pound(at)alacra.com> wrote:
[...][...][...]

[...]
Attachments:  
text.html text/html 2475 Bytes

Re: [Pound Mailing List] reading request parameters
"Andreas Andersson" <andreas.andersson(at)gmail.com>
2008-10-17 16:47:51 [ FULL ]
No one that have seen this error?

Thanks.

On Thu, Oct 16, 2008 at 09:29, Andreas Andersson <
andreas.andersson(at)gmail.com> wrote:
[...]
[...]
Attachments:  
text.html text/html 1054 Bytes

Re: [Pound Mailing List] reading request parameters
"Andreas Andersson" <andreas.andersson(at)gmail.com>
2008-10-20 08:35:25 [ FULL ]
Is there any other source of help than this mailinglist?

Thanks.

On Fri, Oct 17, 2008 at 16:47, Andreas Andersson <
andreas.andersson(at)gmail.com> wrote:
[...]

[...]
Attachments:  
text.html text/html 1689 Bytes

Re: [Pound Mailing List] reading request parameters
Miles Raymond <miles.raymond(at)itinternet.net>
2008-10-20 17:51:56 [ FULL ]
I've never heard of this issue, but you could always look through the source to
determine the exact conditions need to print such a message.  That might be the
next place to consider...

-Miles

Andreas Andersson wrote:[...][...]
>>> 1) What did I do to deserv "pound: MONITOR: worker exited normally
127,
>>> restarting..." on all request? I don't seem to get anything back
either,[...]
>>> just closes immediately.
>>>
>>> 2) Will the services that holds the URL requirement store
information[...]
>>> the cookies for future request? I would like it to go the same
machine on
>>> subsequent calls even without the host=host_1.
>>>
>>> Thanks.

Re: [Pound Mailing List] reading request parameters
Robert Segall <roseg(at)apsis.ch>
2008-10-21 18:26:53 [ FULL ]
On Thu, 2008-10-16 at 09:29 +0200, Andreas Andersson wrote:[...]

You probably have a miscompiled binary, a library mismatch or just a
very old version...
[...]

No.[...]

Re: [Pound Mailing List] reading request parameters
"Andreas Andersson" <andreas.andersson(at)gmail.com>
2008-10-22 14:52:21 [ FULL ]
On Tue, Oct 21, 2008 at 18:26, Robert Segall <roseg(at)apsis.ch> wrote:
[...]
I compiled the newest one and it works. Thanks. That should teach me to not
use old packages :)

[...]



Is there any way to do it? Like adding the same session block to all
services?

Thanks.
[...]
Attachments:  
text.html text/html 1555 Bytes

MailBoxer