AW: Limits for physical server

2013-09-03 Thread Andreas Mock
Hi Willy,

thank you for your suggestion. A first view let me
think the same as you: A little bit ugly.

Is there a way to dynamically check the saturation
of a backend server? Like the work of Simon Horman?
It should be quit easy to query an apache status
to calculate a kind of "idleness" of that.

Best regards
Andreas

---
drumedar Internet-Entwicklungs-GmbH
i...@drumedar.de
http://www.drumedar.de

Heisinger Strasse 12
D-87437 Kempten (Allgäu)
Fon: +49 (831) 5758-215
Fax: +49 (831) 5758-216

Geschäftsführer:
Dipl.Inf.(FH) Andreas Steidle, Rüdiger Hartmann,
Dipl.Kfm.(Univ.) Andreas Mock
Registergericht: Amtsgericht Kempten (Allgäu)
Registernummer: HRB 8626
Ust-IdNr.: DE 206335502

-Ursprüngliche Nachricht-
Von: Willy Tarreau [mailto:w...@1wt.eu] 
Gesendet: Dienstag, 3. September 2013 08:01
An: Andreas Mock
Cc: haproxy@formilux.org
Betreff: Re: Limits for physical server

Hi Andreas,

On Mon, Sep 02, 2013 at 09:15:14AM +, Andreas Mock wrote:
> Hi all,
> 
> I'm not sure if the following is doable:
> 
> I have several servers (processes providing services) on
> one physical server. Is there a way to limit the count
> of connections for the physical server?
> 
> backend num1
> server1 IP:Port1
> server2 IP:Port1
> backend num2
> server1 IP:Port2
> server2 IP:Port2
> 
> And I want to limit resources based on
> the entities server1, server2 while sharing
> their resources among the backends.

This was an old request we had in the past, even before the split into
frontend+backend. The question came from hosting providers relying on
virtual hosting on the same server component (eg: apache configured with
virtual hosts). But this mechanism was impossible to implement by then.
Then the request has almost disappeared and nobody has been working on
this. 1.6 should make this possible along with many other things with
the ability to wait on a resource (server's connection count being one
of these).

At the moment I don't have any simple solution to propose. One method
could be to chain two haproxy instances but I find this a bit ugly :

   frontend front
  use_backend num1 if { hdr(host) num1 }
  use_backend num2 if { hdr(host) num2 }

   backend num1
  server1 127.0.0.1:Port1 check
  server2 127.0.0.2:Port1 check

   backend num2
  server1 127.0.0.1:Port2 check
  server2 127.0.0.2:Port2 check

   listen server1
  bind 127.0.0.1:port1
  bind 127.0.0.1:port2
  server server1 $IP maxconn 1000 # no port, no check

   listen server2
  bind 127.0.0.2:port1
  bind 127.0.0.2:port2
  server server2 $IP maxconn 1000 # no port, no check

etc...
As you can see this will concentrate all connections for physical
server "server1" into a single proxy with a common maxconn setting
for all ports. It can do exactly what you want, but I tend to find
this a bit ugly!

Willy





AW: Limits for physical server

2013-09-02 Thread Andreas Mock
Hi Baptiste,

thank you for having a look at this.
Is my scenario so uncommon?

Regarding my "feature request": Do you think it would be
resible to have a kind of server grouping or a bundling named
"pyhiscal server"?

Best regards
Andreas Mock

-Ursprüngliche Nachricht-
Von: Baptiste [mailto:bed...@gmail.com] 
Gesendet: Montag, 2. September 2013 21:47
An: Andreas Mock
Cc: haproxy@formilux.org
Betreff: Re: Limits for physical server

Hi Andreas,

My last question was more related to how within HAProxy, you decided to forward 
one request to a particular backend.
What criteria are you using?

Anyway, your numbers are huge and so no simple workarounds may apply.

And unfortunately, the maxconn server parameter can't be changed using HAProxy 
socket.

I'm sorry I can't help here.

Baptiste

On Mon, Sep 2, 2013 at 2:00 PM, Andreas Mock  wrote:
> Hi Baptiste,
>
> the answers to your questions:
>
> 1) No persistence needed. http(s)-Proxy (1.5.x)
> 2) 6 + x physical servers, 97 frontend services 
> (IP-Port-Combinations), and almost any frontend service can be served 
> by a service on the physical server.
> 3) currently round robin. Open for other advice.
>
> Best regards
> Andreas Mock
>
> P.S.: Would a logical grouping of servers (in terms of HA) to server 
> groups with the ability to have config variables for server groups a 
> meaningful feature request?
>
>
> -Ursprüngliche Nachricht-
> Von: Baptiste [mailto:bed...@gmail.com]
> Gesendet: Montag, 2. September 2013 11:50
> An: Andreas Mock
> Cc: haproxy@formilux.org
> Betreff: Re: Limits for physical server
>
> Hi,
>
> This is not easily doable out of the box, but some workarounds may be doable.
> Please let me know the few information below:
> - Do you need persistence?
> - how many servers?
> - how many backends?
> - how do you take routing decision between backends
>
> Baptiste
>
>
> On Mon, Sep 2, 2013 at 11:15 AM, Andreas Mock  
> wrote:
>> Hi all,
>>
>> I'm not sure if the following is doable:
>>
>> I have several servers (processes providing services) on one physical 
>> server. Is there a way to limit the count of connections for the 
>> physical server?
>>
>> backend num1
>> server1 IP:Port1
>> server2 IP:Port1
>> backend num2
>> server1 IP:Port2
>> server2 IP:Port2
>>
>> And I want to limit resources based on the entities server1, server2 
>> while sharing their resources among the backends.
>>
>> Hint appreciated.
>>
>> Best regards
>> Andreas Mock
>>
>>
>




AW: Limits for physical server

2013-09-02 Thread Andreas Mock
Hi Baptiste,

the answers to your questions:

1) No persistence needed. http(s)-Proxy (1.5.x)
2) 6 + x physical servers, 97 frontend services (IP-Port-Combinations), 
and almost any frontend service can be served by a service on the physical
server.
3) currently round robin. Open for other advice.

Best regards
Andreas Mock

P.S.: Would a logical grouping of servers (in terms of HA)
to server groups with the ability to have config variables
for server groups a meaningful feature request?


-Ursprüngliche Nachricht-
Von: Baptiste [mailto:bed...@gmail.com] 
Gesendet: Montag, 2. September 2013 11:50
An: Andreas Mock
Cc: haproxy@formilux.org
Betreff: Re: Limits for physical server

Hi,

This is not easily doable out of the box, but some workarounds may be doable.
Please let me know the few information below:
- Do you need persistence?
- how many servers?
- how many backends?
- how do you take routing decision between backends

Baptiste


On Mon, Sep 2, 2013 at 11:15 AM, Andreas Mock  wrote:
> Hi all,
>
> I'm not sure if the following is doable:
>
> I have several servers (processes providing services) on
> one physical server. Is there a way to limit the count
> of connections for the physical server?
>
> backend num1
> server1 IP:Port1
> server2 IP:Port1
> backend num2
> server1 IP:Port2
> server2 IP:Port2
>
> And I want to limit resources based on
> the entities server1, server2 while sharing
> their resources among the backends.
>
> Hint appreciated.
>
> Best regards
> Andreas Mock
>
>