perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cosimo Streppone <cos...@streppone.it>
Subject Re: mod_perl in larger scale environments
Date Wed, 14 Apr 2010 22:27:11 GMT
In data 14 aprile 2010 alle ore 22:57:06, Brad Van Sickle  
<bvs7085@gmail.com> ha scritto:

> My first question relates to quality of service and load balancing:

Hi Brad,

we're using LVS (http://en.wikipedia.org/wiki/Linux_Virtual_Server),
and I find it very useful and reliable.

Our infrastructure for the modperl application, simplifying,
consists of:

a) 1 main "front" lvs load balancer
b) 2 web frontends
c) 1 "back" lvs load balancer
d) 12 apache/modperl backends
e) 5 db servers
f) ...other stuff... :)

a) load balances incoming traffic between the 2 web frontends.
b) rewrites backend requests to a single address, "wlb" (web load balancer)
    which is handled by c)
c) takes incoming requests for several different "virtual" hostnames, as  
in:
    wlb.domain.com => {weighted round robin to} => (back1,back2,...,back12)
    mlb.domain.com => {wrr} => (db1, db2, ..., db5) (mysql load balancer)
    s-mlb.domain.com => {wrr} => (search-db1, search-db2, ...) (search  
mysql lb)
d) app servers are "stateless", so we don't need sticky sessions

This architecture can be simplified, and we're trying to do it.
So, I'm not saying this is the best practice or not even sane. :)

LVS performs health checking via HTTP requests,
with or without md5 checksum of the responses,
or direct TCP connections to the port you specify (f.ex. for db servers).

> I'm currently using mod_proxy on the web layer, and I know I can set  
> that up to load balance requests to multiple app layer nodes, but to the  
> best of my knowledge mod_proxy is not able to provide any quality of  
> service.  So if a node in the app layer had a problem (or was shut down  
> for maintenance) mod_proxy would be unaware of that and would still send  
> requests to that node.

That's where LVS is useful.

LVS can do direct routing or tcp handoff IIRC, and we're using it.
The client and servers talk directly to each other,
without taking up too much resources on the LVS machine itself.

> I'd rather not use a hardware load balancer here if I can avoid it.

LVS usually runs on our older less powerful machines.

> My second question deals with management of multiple mod_perl nodes:
> At some point, if you have enough app layer nodes, managing the code  
> deployments, apache configs and server restarts becomes very cumbersome  
> if you're doing it all manually.

We're using a simple but limited in-house tool that basically uses
rsync, ssh, and keeps list of hosts w/ roles.

Currently for a pilot project I used puppet for config management
and fabric as "last mile" deployment tool. So far I'm happy
with the result.

> Are there any tools that can make these tasks easier or give me one  
> management view?

I don't know. Everything we've done is command line based,
so it's not very friendly. Actually I'm currently looking into
higher level tools to integrate what we've done.

I also looked at ControlTier, but it feels too heavy for me.
Needs its own (powerful) machine. I'd be glad to hear experiences on it.

> Again, I'm used to working in web applications with a full blown app  
> server. I love working with mod_perl, but I do find myself missing the  
> advantages an app server gives me sometimes.

I'm ignorant there. What advantages exactly?

-- 
Cosimo

Mime
View raw message