|
/
Zope
/
Apsis
/
Pound Mailing List
/
Archive
/
2006
/
2006-10
/
Configuration reload
[
check for release / "Hennie Dekker" ... ]
[
Dynamic scaling of backends / "Dean" ... ]
Configuration reload
"ForAll.pl - Firma" <firma(at)forall.pl> |
2006-10-26 20:03:43 |
[ FULL ]
|
Hello,
Is there any option to reload configuration in pound without sending
to program SIGTERM ?? We are currenlty using pound as load balancer
between 5 servers and over 2k sites. We are using header filtering to
decide to which backend request should be send, and we really need to
reload configuration ever 10minutes. killall -9 pound && pound does
the work, but by doing this we have nearly 1,2sec downtime which is
unacceptable. Have you got and ideas how to solve this problem, or how
to modify source of pound to allow reloading without restarting ??
Virtual host on the backend is impossible in our case.
[...]
|
|
|
Re: [Pound Mailing List] Configuration reload
Ted Dunning <tdunning(at)veoh.com> |
2006-10-26 20:15:08 |
[ FULL ]
|
Pound really doesn't do this.
Take a look at haproxy.
On 10/26/06 11:03 AM, "ForAll.pl - Firma" <firma(at)forall.pl> wrote:
[...]
|
|
|
Re: [Pound Mailing List] Configuration reload
SF Markus Elfring <elfring(at)users.sourceforge.net> |
2006-10-26 20:56:03 |
[ FULL ]
|
[...]
Will the feature "dynamic service configuration" be added?
How much can the new tool "poundctl" help in this use case?
[...]
Is there a little competion running between free load balancers?
Regards,
Markus
|
|
|
Re: [Pound Mailing List] Configuration reload
"ForAll.pl - Firma" <firma(at)forall.pl> |
2006-10-26 21:04:15 |
[ FULL ]
|
[...][...]
[...][...]
[...]
poundctl didn't help - it can only manage backends that was already
readed from the config file.
|
|
|
Re: [Pound Mailing List] Configuration reload
"ForAll.pl - Firma" <firma(at)forall.pl> |
2006-10-26 21:19:33 |
[ FULL ]
|
But I've found another solution - we can run two instances of pound
(one, primary on port 80 which will redirect to the second one on port
81)
It could look like this:
POUND Primary
(port 80)
|
|
|
|
POUND Secondary
(port 81, restart every 10minutes)
| |
| |
| |
| |
BACKENDS
And now I have to change sources of primary Pound to wait 2 seconds,
when connection to backend fails(restarting secondary pound). And by
this way client won't see "connection refused", but simple will have
to wait 2 seconds to load page.
So My question is... how to change pound to wait for example 2 seconds
on backend error and then repeat connection without sending any error
to client ??
|
|
|
Re: [Pound Mailing List] Configuration reload
"David Rees" <drees76(at)gmail.com> |
2006-10-26 21:35:03 |
[ FULL ]
|
On 10/26/06, ForAll.pl - Firma <firma(at)forall.pl> wrote:[...]
Using your diagram, your frontend pound on port 80 can forward
requests to 2 pounds, say on port 81 and 82.
When you are ready to restart one to reload the configuration, disable
backend pound 81, wait for all requests to finish then restart it, and
enable it, disable pound 82, wait for all requests to finish and
enable it.
Repeat when you are ready to reload again. You should be able to
automate this with a shell script...
-Dave
|
|
|
Re: [Pound Mailing List] Configuration reload
"ForAll.pl - Firma" <firma(at)forall.pl> |
2006-10-26 22:24:28 |
[ FULL ]
|
> On 10/26/06, ForAll.pl - Firma <firma(at)forall.pl> wrote:[...]
[...]
[...]
[...]
[...]
Nice idea, but running 3 pounds on one machine, which process over
20mln requests per day is not very efficient.
Also one more thing - how can I check in my shell script that all requests to
pound are
finished ??
|
|
|
Re: [Pound Mailing List] Configuration reload
"David Rees" <drees76(at)gmail.com> |
2006-10-27 00:02:04 |
[ FULL ]
|
On 10/26/06, ForAll.pl - Firma <firma(at)forall.pl> wrote:[...]
Sorry, best I can come up with right now! I also wish that you could
gracefully reload pound configs as well. :-)
[...]
Check for established connections to the port that pound is bound to.
For example, on Linux:
netstat -an | grep "$IP_ADDR:81" | grep ESTABLISHED
will help.
-Dave
|
|
|
Re: [Pound Mailing List] Configuration reload
Ted Dunning <tdunning(at)veoh.com> |
2006-10-27 00:10:26 |
[ FULL ]
|
Or just wait 30 seconds if your longest request can't be more than 10
seconds.
On 10/26/06 3:02 PM, "David Rees" <drees76(at)gmail.com> wrote:
[...][...]
|
|
|
Re: [Pound Mailing List] Configuration reload
"ForAll.pl - Firma" <firma(at)forall.pl> |
2006-10-27 00:52:39 |
[ FULL ]
|
> Or just wait 30 seconds if your longest request can't be more than 10[...]
[...]
>>> Also one more thing - how can I check in my shell script that all
requests to
>>> pound are
>>> finished ??[...]
If somebody is downloading 100mb file it could take a long time :)
With about 200conn/sec there are nearly 50connections to big files, so
it is almost impossible to restart pound without breaking connections.
The best option will be to reload config without restarting pound, but
I have no idea on how to do this.
|
|
|
Re: [Pound Mailing List] Configuration reload
"David Rees" <drees76(at)gmail.com> |
2006-10-27 01:18:32 |
[ FULL ]
|
On 10/26/06, ForAll.pl - Firma <firma(at)forall.pl> wrote:[...]
Yes, long established connections will make it nearly impossible to
restart pound in a timely manner, without a large pool of pounds to
rotate through. For example, say you expect the longest connection to
stay open 60 minutes, you would need to have 6 pounds available to
rotate through if you are reloading the configuration every 10
minutes.
A bit of a hack, but luckily pound doesn't use much memory when running.
-Dave
|
|
|
Re: [Pound Mailing List] Configuration reload
Ted Dunning <tdunning(at)veoh.com> |
2006-10-27 01:33:23 |
[ FULL ]
|
Just checking on assumptions here, but why is it that you need to reload the
pound configuration every 10 minutes? That seems kind of excessive. I
still think that pound should behave better in this regard, but I am still
surprised that you need to reload that often.
Is there something that you could generalize in your configuration, perhaps,
that would make much of this reloading unnecessary?
On 10/26/06 3:52 PM, "ForAll.pl - Firma" <firma(at)forall.pl> wrote:
[...][...][...][...]
>>>> Also one more thing - how can I check in my shell script that
all requests
>>>> to
>>>> pound are
>>>> finished ??
>>>
>>> Check for established connections to the port that pound is bound
to.[...]
|
|
|
Re: [Pound Mailing List] Configuration reload
"ForAll.pl - Firma" <firma(at)forall.pl> |
2006-10-27 08:22:44 |
[ FULL ]
|
> Just checking on assumptions here, but why is it that you need to reload
the[...]
[...]
[...]
>>> Or just wait 30 seconds if your longest request can't be more than
10
>>> seconds.[...]
>>> On 10/26/06 3:02 PM, "David Rees" <drees76(at)gmail.com>
wrote:[...]
>>>>> Also one more thing - how can I check in my shell script
that all requests
>>>>> to
>>>>> pound are
>>>>> finished ??
>>>>
>>>> Check for established connections to the port that pound is
bound to.[...]
I'm doing Virtual hosts managing in pound, thats why I have to reload
config every 10minutes. I know that pound is not dedicated to manage
VH, but I have no other way to do this at backends.
|
|
|
Re: [Pound Mailing List] Configuration reload
Ted Dunning <tdunning(at)veoh.com> |
2006-10-27 08:53:40 |
[ FULL ]
|
Do hosts move from backend to backend that often?
If not, why not give each host a range of first letters and split things
evenly using regexps?
For that matter you could even go a bit overboard and have extra patterns
available that would assign different first letters differently.
For instance if you have 6 backends, you could define 10 backends for each
possible first letter in the host name. Then by enabling or disabling the
correct hosts, you have just about all the control you might like with room
for nearly 70% expansion in the 4 backends that do not yet exist.
You could then write a simple front-end for poundctl that would manipulate
all of this for you.
On 10/26/06 11:22 PM, "ForAll.pl - Firma" <firma(at)forall.pl> wrote:
[...]
[...]
|
|
|
Re: [Pound Mailing List] Configuration reload
"ForAll.pl - Firma" <firma(at)forall.pl> |
2006-10-27 09:32:53 |
[ FULL ]
|
> Do hosts move from backend to backend that often?
[...]
[...]
[...]
[...]
[...]
>>> Just checking on assumptions here, but why is it that you need to
reload the
>>> pound configuration every 10 minutes?
[...]
It is not so simple. I have 500users per one backend, and each user
have different domain, but also domain can ba shared:
for example user on backend 1 has assigned: subdomain1.domain.com
user on backend 2 has assigned subdomain2.domain.com
user on backend 3 has assigned subdomain3.domain.com
etc
In this case we cannot manage backend based on domain patterns, but
only on full domain name.
|
|
|
Re: [Pound Mailing List] Configuration reload
Ted Dunning <tdunning(at)veoh.com> |
2006-10-27 09:43:20 |
[ FULL ]
|
Write an extension to pound that reads from a sql-lite database which domain
goes to which backend.
That would give you everything you need.
On 10/27/06 12:32 AM, "ForAll.pl - Firma" <firma(at)forall.pl> wrote:
[...][...][...][...][...][...][...][...][...][...][...][...]
>>>> Just checking on assumptions here, but why is it that you need
to reload
>>>> the
>>>> pound configuration every 10 minutes?[...]
>>> I'm doing Virtual hosts managing in pound, thats why I have to
reload
>>> config every 10minutes. I know that pound is not dedicated to
manage
>>> VH, but I have no other way to do this at backends.
>>> [...]
|
|
|
Re: [Pound Mailing List] Configuration reload
"ForAll.pl - Firma" <firma(at)forall.pl> |
2006-10-27 11:31:35 |
[ FULL ]
|
[...]
[...]
[...]
>>> Do hosts move from backend to backend that often?[...]
>>> If not, why not give each host a range of first letters and split
things
>>> evenly using regexps?[...]
>>> For that matter you could even go a bit overboard and have extra
patterns
>>> available that would assign different first letters
differently.[...]
>>> For instance if you have 6 backends, you could define 10 backends
for each
>>> possible first letter in the host name. Then by enabling or
disabling the
>>> correct hosts, you have just about all the control you might like
with room
>>> for nearly 70% expansion in the 4 backends that do not yet
exist.[...]
>>> You could then write a simple front-end for poundctl that would
manipulate
>>> all of this for you.[...]
>>> On 10/26/06 11:22 PM, "ForAll.pl - Firma"
<firma(at)forall.pl> wrote:[...]
>>>>> Just checking on assumptions here, but why is it that you
need to reload
>>>>> the
>>>>> pound configuration every 10 minutes?[...]
>>>> I'm doing Virtual hosts managing in pound, thats why I have to
reload
>>>> config every 10minutes. I know that pound is not dedicated to
manage
>>>> VH, but I have no other way to do this at backends.
>>>> [...]
Nice idea.
|
|
|
Re: [Pound Mailing List] Configuration reload
Rune Saetre <rune.saetre(at)netcom-gsm.no> |
2006-10-27 19:57:14 |
[ FULL ]
|
Hi
I think pound creates a list of precompiled regular expressions at
startuptime, kept in memory for speed. These REs are applied to the URL
and headers of each request to determine which Service is to be used.
Fetching this from some kind of sql server in an equally efficient manner
may be a bit involved, I guess.
Extending poundctl to being able to alter the URL, HeadRequire and
HeadDeny RE's will probably be much simpler, but you will probably have
some synchronisation and session problems there as well.
If session persistence is of little importance I think the simplest fix
would be making pound close down the listening sockets immediately when it
is signalled to shut down. Then a new pound instance can start
immediately, even if the old one is still processing existing tcp
connections. A restart of pound would then require just milliseconds of
downtime.
Regards
Rune
---
Rune Sætre <rune.saetre(at)netcom-gsm.no>
NetCom as
..
On Fri, 27 Oct 2006, ForAll.pl - Firma wrote:
[...][...][...][...][...]
>>>
>>>> If not, why not give each host a range of first letters and
split things
>>>> evenly using regexps?
>>>
>>>> For that matter you could even go a bit overboard and have
extra patterns
>>>> available that would assign different first letters
differently.
>>>
>>>> For instance if you have 6 backends, you could define 10
backends for each
>>>> possible first letter in the host name. Then by enabling or
disabling the
>>>> correct hosts, you have just about all the control you might
like with room
>>>> for nearly 70% expansion in the 4 backends that do not yet
exist.
>>>
>>>> You could then write a simple front-end for poundctl that
would manipulate
>>>> all of this for you.
>>>
>>>
>>>> On 10/26/06 11:22 PM, "ForAll.pl - Firma"
<firma(at)forall.pl> wrote:
>>>
>>>>>> Just checking on assumptions here, but why is it that
you need to reload
>>>>>> the
>>>>>> pound configuration every 10 minutes?
>>>
>>>>> I'm doing Virtual hosts managing in pound, thats why I
have to reload
>>>>> config every 10minutes. I know that pound is not dedicated
to manage
>>>>> VH, but I have no other way to do this at backends.
>>>>>
>>>
>>>
>>> It is not so simple. I have 500users per one backend, and each
user
>>> have different domain, but also domain can ba shared:
>>> for example user on backend 1 has assigned: subdomain1.domain.com
>>> user on backend 2 has assigned subdomain2.domain.com
>>> user on backend 3 has assigned subdomain3.domain.com
>>> etc
>>> In this case we cannot manage backend based on domain patterns,
but
>>> only on full domain name.
>>>[...]
|
|
|
|