You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Chris D <un...@hotmail.com> on 2002/01/21 17:46:12 UTC

Clustering James?

Hello,

I would like to use James strictly as a mail-forwarding server (SMTP).  I 
have been able to install James and configure the JDBCAlias mailet to 
perform forwarding based on a database table.  I also intend on moving the 
user repository into the database as well.

My question is this.  Can I have two servers in a cluster running instances 
of James to forward mail?  I am assuming that since I am only using SMTP 
there should not be a problem.  Also, since only one server will be 
accepting a given request, there should not be a problem with duplicated 
messages.

Any thoughts?

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Clustering James?

Posted by Serge Knystautas <se...@lokitech.com>.
Yeah, we're actually do Resin consulting and drive Scott Ferguson crazy with
feature requests and bug reports.
It might be nice to have the failover JVM support that Resin has, but that's
more the domain of Avalon than James.

James should be a lot easier to cluster since SMTP is really geared to
support failover.  POP3 isn't quite so ready for it, but because these are
both connection/stateful protocols instead of HTTP, clustering is
significantly easier because you don't have to work extra hard to make sure
the same user goes to the same box and otherwise track sessions.  Once
someone writes a patch to optionally storing locks in the db (or some place
central), it should be as easy as sticking a network load balancer in front
of a group of James servers.

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
----- Original Message -----
From: "Keith Chew" <ke...@jungledrum.co.nz>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Monday, January 21, 2002 3:15 PM
Subject: RE: Clustering James?


>
> Just some clustering information:
>
> What would be nice to have is load balancing and fail-over, typically seen
> in servers like Resin (www.caucho.com) and Jboss (www.jboss.org). What
Resin
> does is install a module in Apache, which makes it the *smart* balancer:
> - knowing which resin servers are out there
> - knowing how to forward requests to them
> - knowing which ones are up/down
>
> I think we can achieve the same with James using LVS (linux virtual server
> project). I have only tried this with Apache, and it works pertty well.
>
> So, when James supports SMTP clustering, we can have one LVS and several
> James for a scalable and reliable system.
>
> Keep up the good work guys!
> Keith
>
> -----Original Message-----
> From: Serge Knystautas [mailto:sergek@lokitech.com]
> Sent: Tuesday, 22 January 2002 6:05 a.m.
> To: James Users List
> Subject: Re: Clustering James?
>
>
> Actually, pop3 would work but SMTP would not.  The problem is the spooling
> system does not record in the DB when it is locking (processing) a message
> in the spool.  This means if server A receives a message via SMTP and
dumps
> it into the spool, both server A and server B would see the message and
> potentially both grab it and store it in the outgoing spool, so messages
> could get duplicated.  pop3 actually works since once the message is in an
> inbox, there's no chance of it getting duplicated.
>
> What someone would need to do is add a DB locking system, so as the spool
> repository grabs a message, it records in the DB that it is grabbing that
> message.  The problem is a) how does each server uniquely identify itself
to
> the DB (so you know which server has the lock), and b) what happens if
that
> server dies, since the DB lock would remain.  These aren't impossible to
> address (perhaps just use IP address, or something like that, and probably
> use some timeout to kill aged locks), but it's not ready yet.  That said,
> you're by no means the first to request this feature, and it would be a
nice
> differentiator for James since I don't know of other mail servers that
> support this.
>
> Serge Knystautas
> Loki Technologies - Unstoppable Websites
> http://www.lokitech.com/
> ----- Original Message -----
> From: "Chris D" <un...@hotmail.com>
> To: <ja...@jakarta.apache.org>
> Sent: Monday, January 21, 2002 4:46 PM
> Subject: Clustering James?
>
>
> > Hello,
> >
> > I would like to use James strictly as a mail-forwarding server (SMTP).
I
> > have been able to install James and configure the JDBCAlias mailet to
> > perform forwarding based on a database table.  I also intend on moving
the
> > user repository into the database as well.
> >
> > My question is this.  Can I have two servers in a cluster running
> instances
> > of James to forward mail?  I am assuming that since I am only using SMTP
> > there should not be a problem.  Also, since only one server will be
> > accepting a given request, there should not be a problem with duplicated
> > messages.
> >
> > Any thoughts?



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Clustering James?

Posted by Keith Chew <ke...@jungledrum.co.nz>.
Just some clustering information:

What would be nice to have is load balancing and fail-over, typically seen
in servers like Resin (www.caucho.com) and Jboss (www.jboss.org). What Resin
does is install a module in Apache, which makes it the *smart* balancer:
- knowing which resin servers are out there
- knowing how to forward requests to them
- knowing which ones are up/down

I think we can achieve the same with James using LVS (linux virtual server
project). I have only tried this with Apache, and it works pertty well.

So, when James supports SMTP clustering, we can have one LVS and several
James for a scalable and reliable system.

Keep up the good work guys!
Keith

-----Original Message-----
From: Serge Knystautas [mailto:sergek@lokitech.com]
Sent: Tuesday, 22 January 2002 6:05 a.m.
To: James Users List
Subject: Re: Clustering James?


Actually, pop3 would work but SMTP would not.  The problem is the spooling
system does not record in the DB when it is locking (processing) a message
in the spool.  This means if server A receives a message via SMTP and dumps
it into the spool, both server A and server B would see the message and
potentially both grab it and store it in the outgoing spool, so messages
could get duplicated.  pop3 actually works since once the message is in an
inbox, there's no chance of it getting duplicated.

What someone would need to do is add a DB locking system, so as the spool
repository grabs a message, it records in the DB that it is grabbing that
message.  The problem is a) how does each server uniquely identify itself to
the DB (so you know which server has the lock), and b) what happens if that
server dies, since the DB lock would remain.  These aren't impossible to
address (perhaps just use IP address, or something like that, and probably
use some timeout to kill aged locks), but it's not ready yet.  That said,
you're by no means the first to request this feature, and it would be a nice
differentiator for James since I don't know of other mail servers that
support this.

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
----- Original Message -----
From: "Chris D" <un...@hotmail.com>
To: <ja...@jakarta.apache.org>
Sent: Monday, January 21, 2002 4:46 PM
Subject: Clustering James?


> Hello,
>
> I would like to use James strictly as a mail-forwarding server (SMTP).  I
> have been able to install James and configure the JDBCAlias mailet to
> perform forwarding based on a database table.  I also intend on moving the
> user repository into the database as well.
>
> My question is this.  Can I have two servers in a cluster running
instances
> of James to forward mail?  I am assuming that since I am only using SMTP
> there should not be a problem.  Also, since only one server will be
> accepting a given request, there should not be a problem with duplicated
> messages.
>
> Any thoughts?



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Clustering James?

Posted by Serge Knystautas <se...@lokitech.com>.
Actually, pop3 would work but SMTP would not.  The problem is the spooling
system does not record in the DB when it is locking (processing) a message
in the spool.  This means if server A receives a message via SMTP and dumps
it into the spool, both server A and server B would see the message and
potentially both grab it and store it in the outgoing spool, so messages
could get duplicated.  pop3 actually works since once the message is in an
inbox, there's no chance of it getting duplicated.

What someone would need to do is add a DB locking system, so as the spool
repository grabs a message, it records in the DB that it is grabbing that
message.  The problem is a) how does each server uniquely identify itself to
the DB (so you know which server has the lock), and b) what happens if that
server dies, since the DB lock would remain.  These aren't impossible to
address (perhaps just use IP address, or something like that, and probably
use some timeout to kill aged locks), but it's not ready yet.  That said,
you're by no means the first to request this feature, and it would be a nice
differentiator for James since I don't know of other mail servers that
support this.

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
----- Original Message -----
From: "Chris D" <un...@hotmail.com>
To: <ja...@jakarta.apache.org>
Sent: Monday, January 21, 2002 4:46 PM
Subject: Clustering James?


> Hello,
>
> I would like to use James strictly as a mail-forwarding server (SMTP).  I
> have been able to install James and configure the JDBCAlias mailet to
> perform forwarding based on a database table.  I also intend on moving the
> user repository into the database as well.
>
> My question is this.  Can I have two servers in a cluster running
instances
> of James to forward mail?  I am assuming that since I am only using SMTP
> there should not be a problem.  Also, since only one server will be
> accepting a given request, there should not be a problem with duplicated
> messages.
>
> Any thoughts?



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Clustering James?

Posted by Danny Angus <da...@thought.co.uk>.
The problem is in theory that the spool locks the messages in memory,
therefore two instances of James accessing the same db would be unable to
share the locks, and may try to simultaneously process the same message.

I expect you could use configuration to make one instance the reciever, and
you could have several recievers, and another (single instance) the
transmitter, but that isn't really clustering, more just "crowding round".
There was a discussion about making the lock visible as a db field, but
AFAIK this hasn't been done yet.
d.

> -----Original Message-----
> From: Chris D [mailto:unngh@hotmail.com]
> Sent: Monday, January 21, 2002 4:46 PM
> To: james-user@jakarta.apache.org
> Subject: Clustering James?
>
>
> Hello,
>
> I would like to use James strictly as a mail-forwarding server (SMTP).  I
> have been able to install James and configure the JDBCAlias mailet to
> perform forwarding based on a database table.  I also intend on
> moving the
> user repository into the database as well.
>
> My question is this.  Can I have two servers in a cluster running
> instances
> of James to forward mail?  I am assuming that since I am only using SMTP
> there should not be a problem.  Also, since only one server will be
> accepting a given request, there should not be a problem with duplicated
> messages.
>
> Any thoughts?
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>