🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
11 messages
11 total messages Started by Geek Marc Wed, 21 Dec 2011 03:39
[request] INN2 and HA/DRBD-active-passive ? how to build a HA solution for INN2 ?
#84550
Author: Geek Marc
Date: Wed, 21 Dec 2011 03:39
79 lines
4118 bytes
Hello,

I was wondering how to build an High Availability cluster for inn2 with 
two nodes.

Little googling on the subject gave me : 
- NNTPSwitch - http://redmine.chiparus.net/projects/nntpswitch/wiki
- http://www.newsreaders.com/unix/servers.html
- http://www.eyrie.org/~eagle/faqs/inn.html

A.
On first test, I created two independent INN2 servers.
The replication between servers works well, but in case of one server 
fail, for users :
- they need to connect to the other NNTP server
- they lose their client configuration (read/unread/deleted articles as 
message-IDs are different).

B.
On a second step, I was thinking about an active/passive drbd file system 
with HA with a virtual IP for INN2 service (an eth0:0 IP address)

In /etc/drbdlinks.conf 
link('/etc/news', '/data/etc_news')
link('/usr/lib/news', '/data/usr_lib_news')
link('/var/lib/news', '/data/var_lib_news')
link('/var/log/news', '/data/var_log_news')
# a link('/var/run/news', '/data/var_run_news') seems a bad idea
link('/var/spool/news', '/data/var_spool_news')

But I did not find any inn2 resource agent - http://www.linux-ha.org/wiki/
Resource_Agents

So, I imagined to add an /init.d/inn2 stop and an /init.d/inn2 start 
(with some conditions/delay) into /etc/ha.d/resource.d/MailTo script plus 
maybe a /usr/lib/news/bin/tdx-util -R $newsgroupdir -n $newsgroup ; for 
all newsgroupsdirectories.
Not a clean way to do but probably it would work when node is moving.

C.
For measuring time response onto port 119, I was thinking s small test 
script which will record time response and would send ONE alert email 
when the server stops to give correct response and would send ONE OK 
email when back to normal operation.

D.
As I saw nfswriter parameter into inn.conf, I was wondering if 2 inn2 
servers can use at same time the same /var/spool/news/ and /var/lib/news/.
Probably yes for reading, but what happen when writing???
If only one writes data it could sound OK.

In that case maybe a DRBD active/active with gfs with HA could be a great 
solution with a virtual IP for INN2 service (an eth0:0 IP address).

An /init.d/inn2 stop and an /init.d/inn2 start on node moving would 
probably deal the solution.


E.
For NNTPSwitch solution, I don't think a message sent to the NNTPSwitch 
could be sent to two servers at same time and would have same message-ID.

F.
In a HA/DRBD-active-passive, I can do 2 independent INN2 servers with 
only INN2 running on active node while there is each 5 minutes a rsync 
from active to passive for /var/spool/news and for /var/lib/news/.


I think to do a test for B solution but would like to know if it is a 
good way to do or not.
Solution F seems OK, but some messages could be lost.

Any advice would be appreciated by the new INN2 user I am.
 
Thanks

Geek Marc

Re: [request] INN2 and HA/DRBD-active-passive ? how to build a HA solution for INN2 ?
#84555
Author: Steve Crook
Date: Wed, 21 Dec 2011 15:55
22 lines
2047 bytes
On 21 Dec 2011 03:39:05 GMT, Geek Marc wrote in
Message-Id: <4ef154d9$0$8820$426a74cc@news.free.fr>:

> A.
> On first test, I created two independent INN2 servers.
> The replication between servers works well, but in case of one server 
> fail, for users :
> - they need to connect to the other NNTP server
DNS could do this for you, or preferrably a load balancer across 2 (or
more) INN servers.

> - they lose their client configuration (read/unread/deleted articles as 
> message-IDs are different).
No, Message-IDs are consistent across all newsservers.  The article
number is the inconsistent part.  You can use the xrefslave setting in
inn.conf to overcome this issue.

Of the options you defined, I think this is the best.  You didn't state
if it was going to be text-only or a full-feed including binary.  If
binary is in the equation then I think you'd find yourself having to use
this option to balance load, regardless of HA.
Re: [request] INN2 and HA/DRBD-active-passive ? how to build a HA solution for INN2 ?
#84556
Author: Julien ÉLIE
Date: Wed, 21 Dec 2011 16:27
94 lines
4775 bytes
Hi Marc,

> A.
> On first test, I created two independent INN2 servers.
> The replication between servers works well, but in case of one server
> fail, for users :
> - they need to connect to the other NNTP server
> - they lose their client configuration (read/unread/deleted articles as
> message-IDs are different).

For the first point, couldn't you use a balancing service (a virtual IP 
redirecting a user to a given server during a whole session) as Steve 
also suggests?

I do not understand your second point.  Why would message-IDs be 
different?  Maybe you are speaking about article numbers; if that is the 
case, did not you run one of the two INN servers in slave mode (see 
xrefslave in inn.conf, and also nnrpdposthost in the same file)?

     http://www.eyrie.org/~eagle/software/inn/docs/inn.conf.html


Depending on which server fails, you have to (automatically) modify its 
configuration.  For instance, when the active server fails, the passive 
(slave) one should become the active one.



> B.
> On a second step, I was thinking about an active/passive drbd file system
> with HA with a virtual IP for INN2 service (an eth0:0 IP address)
>
> So, I imagined to add an /init.d/inn2 stop and an /init.d/inn2 start
> (with some conditions/delay) into /etc/ha.d/resource.d/MailTo script plus
> maybe a /usr/lib/news/bin/tdx-util -R $newsgroupdir -n $newsgroup ; for
> all newsgroupsdirectories.
> Not a clean way to do but probably it would work when node is moving.

I believe it should work.
Only one instance should be working at the same time (otherwise, your 
history, overview or spool will get corrupted).



> C.
> For measuring time response onto port 119, I was thinking s small test
> script which will record time response and would send ONE alert email
> when the server stops to give correct response and would send ONE OK
> email when back to normal operation.

When the server is heavily loaded, or throttled during expiry, it will 
not send the expected 200 response.  It still works, though.  It should 
not always be considered as down.



> D.
> As I saw nfswriter parameter into inn.conf, I was wondering if 2 inn2
> servers can use at same time the same /var/spool/news/ and /var/lib/news/.
> Probably yes for reading, but what happen when writing???
> If only one writes data it could sound OK.

I am unsure that the newly written data is properly seen by all the 
readers.  Maybe it works, but I have not tested.



> E.
> For NNTPSwitch solution, I don't think a message sent to the NNTPSwitch
> could be sent to two servers at same time and would have same message-ID.

The Message-ID is the same.  It identifies a given news article on all 
servers in the world.



> F.
> In a HA/DRBD-active-passive, I can do 2 independent INN2 servers with
> only INN2 running on active node while there is each 5 minutes a rsync
> from active to passive for /var/spool/news and for /var/lib/news/.

Your previous suggestions are more robust than this one.



> Solution F seems OK, but some messages could be lost.

Yes.

-- 
Julien ÉLIE

« Le carré est une figure qui a un angle droit dans chaque coin. »
   (Jean-Charles)
Re: [request] INN2 and HA/DRBD-active-passive ? how to build a HA solution for INN2 ?
#84557
Author: Julien ÉLIE
Date: Wed, 21 Dec 2011 16:30
14 lines
1864 bytes
> Little googling on the subject gave me :
> - NNTPSwitch - http://redmine.chiparus.net/projects/nntpswitch/wiki
> - http://www.newsreaders.com/unix/servers.html
> - http://www.eyrie.org/~eagle/faqs/inn.html

+ http://web.inter.NL.net/users/Elena.Samsonova/unix/INN/v2.3/architectures.html

which will give you useful information about what you would like to do.

-- 
Julien ÉLIE

« Le carré est une figure qui a un angle droit dans chaque coin. »
  (Jean-Charles)
Re: [request] INN2 and HA/DRBD-active-passive ? how to build a HA solution for INN2 ?
#84568
Author: Geek Marc
Date: Thu, 22 Dec 2011 07:27
56 lines
3482 bytes
Le Wed, 21 Dec 2011 15:55:31 +0000, Steve Crook a écrit :

> On 21 Dec 2011 03:39:05 GMT, Geek Marc wrote in Message-Id:
> <4ef154d9$0$8820$426a74cc@news.free.fr>:
> 
>> A.
>> On first test, I created two independent INN2 servers.
>> The replication between servers works well, but in case of one server
>> fail, for users :
>> - they need to connect to the other NNTP server
> DNS could do this for you, or preferrably a load balancer across 2 (or
> more) INN servers.

As I need HA, if I put one load balancer, I need to have two load 
balancer system too.

Either I have 4 servers, either I have 2 - I put loadbalancer and INN2 on 
same servers.

Maybe for a small infrastructure, heartbeat with a virtual IP address 
could do the moving between the two INN2 servers without loadbalancing.
Usually I measure 4-7 seconds for a moving between 2 nodes after an 
heartbeat restart.

But when some time available, I will install a load balancing system to 
better know that.


> 
>> - they lose their client configuration (read/unread/deleted articles as
>> message-IDs are different).
> No, Message-IDs are consistent across all newsservers.  The article
> number is the inconsistent part.  You can use the xrefslave setting in
> inn.conf to overcome this issue.
> 
> Of the options you defined, I think this is the best.  You didn't state
> if it was going to be text-only or a full-feed including binary.  If
> binary is in the equation then I think you'd find yourself having to use
> this option to balance load, regardless of HA.

I did a confusion between messages-IDs and article number for server.

For my case it is a text-only intranet system but about 15.000 messages a 
week.

So for active node, I have to put xrefslave to false and nnrpdposthost to 
false.
So for passive node, I have to put xrefslave to true and nnrpdposthost to 
true.
Then, all posts will go to active node and be replicated with same number 
to passive node.


A big thank you for your comments

When reading about xrefslave I didn't catch the good way to use it.
Re: [request] INN2 and HA/DRBD-active-passive ? how to build a HA solution for INN2 ?
#84572
Author: Geek Marc
Date: Thu, 22 Dec 2011 07:43
100 lines
5081 bytes
Le Wed, 21 Dec 2011 17:27:42 +0100, Julien ÉLIE a écrit :

> Hi Marc,
> 
>> A.
>> On first test, I created two independent INN2 servers.
>> The replication between servers works well, but in case of one server
>> fail, for users :
>> - they need to connect to the other NNTP server - they lose their
>> client configuration (read/unread/deleted articles as message-IDs are
>> different).
> 
> For the first point, couldn't you use a balancing service (a virtual IP
> redirecting a user to a given server during a whole session) as Steve
> also suggests?
> 
> I do not understand your second point.  Why would message-IDs be
> different?  Maybe you are speaking about article numbers; if that is the
> case, did not you run one of the two INN servers in slave mode (see
> xrefslave in inn.conf, and also nnrpdposthost in the same file)?
I confused Message-IDs and article numbers.

> 
>      http://www.eyrie.org/~eagle/software/inn/docs/inn.conf.html
> 
> 
> Depending on which server fails, you have to (automatically) modify its
> configuration.  For instance, when the active server fails, the passive
> (slave) one should become the active one.
OK I will do this test.


>> B.
>> On a second step, I was thinking about an active/passive drbd file
>> system with HA with a virtual IP for INN2 service (an eth0:0 IP
>> address)
>>
>> So, I imagined to add an /init.d/inn2 stop and an /init.d/inn2 start
>> (with some conditions/delay) into /etc/ha.d/resource.d/MailTo script
>> plus maybe a /usr/lib/news/bin/tdx-util -R $newsgroupdir -n $newsgroup
>> ; for all newsgroupsdirectories.
>> Not a clean way to do but probably it would work when node is moving.
> 
> I believe it should work.
> Only one instance should be working at the same time (otherwise, your
> history, overview or spool will get corrupted).
May be it would give less maintenance for creating/deleting groups.
Only one place to manage.
May be more stress when big problems - when drbd disks are not sync...


>> C.
>> For measuring time response onto port 119, I was thinking s small test
>> script which will record time response and would send ONE alert email
>> when the server stops to give correct response and would send ONE OK
>> email when back to normal operation.
> 
> When the server is heavily loaded, or throttled during expiry, it will
> not send the expected 200 response.  It still works, though.  It should
> not always be considered as down.
OK

>> D.
>> As I saw nfswriter parameter into inn.conf, I was wondering if 2 inn2
>> servers can use at same time the same /var/spool/news/ and
>> /var/lib/news/.
>> Probably yes for reading, but what happen when writing???
>> If only one writes data it could sound OK.
> 
> I am unsure that the newly written data is properly seen by all the
> readers.  Maybe it works, but I have not tested.

I don't think I would have time to test that.


>> E.
>> For NNTPSwitch solution, I don't think a message sent to the NNTPSwitch
>> could be sent to two servers at same time and would have same
>> message-ID.
> 
> The Message-ID is the same.  It identifies a given news article on all
> servers in the world.
Using Message-ID with intranet hostnames does not cause problem?
Right?

>> F.
>> In a HA/DRBD-active-passive, I can do 2 independent INN2 servers with
>> only INN2 running on active node while there is each 5 minutes a rsync
>> from active to passive for /var/spool/news and for /var/lib/news/.
> 
> Your previous suggestions are more robust than this one.
> 
> 
> 
>> Solution F seems OK, but some messages could be lost.
> 
> Yes.


A big thank you for your assistance.
Re: [request] INN2 and HA/DRBD-active-passive ? how to build a HA solution for INN2 ?
#84573
Author: Julien ÉLIE
Date: Thu, 22 Dec 2011 11:45
20 lines
2209 bytes
Hi Marc,

> So for active node, I have to put xrefslave to false and nnrpdposthost to
> false.
> So for passive node, I have to put xrefslave to true and nnrpdposthost to
> true.
> Then, all posts will go to active node and be replicated with same number
> to passive node.

Whereas xrefslave is a boolean, nnrpdposthost is a string.  For active 
node, it should be unset.  For passive node, it should contain the host 
name or IP of your slave.

-- 
Julien ÉLIE

« Cette apostrophe me déconcerte et me réduit au silence, parce que
   l'homme sensible comme moi, tout entier Ă  ce qu'on lui objecte, perd
   la tête, et ne se retrouve qu'au bas de l'escalier. » (Denis
   Diderot)
Re: [request] INN2 and HA/DRBD-active-passive ? how to build a HA solution for INN2 ?
#84574
Author: Julien ÉLIE
Date: Thu, 22 Dec 2011 11:48
29 lines
2354 bytes
Hi Marc,

>> Only one instance should be working at the same time (otherwise, your
>> history, overview or spool will get corrupted).
>
> May be it would give less maintenance for creating/deleting groups.
> Only one place to manage.

You could use (local) control messages to achieve that.
This way, the newsgroups are created and deleted on both your servers.

Another possibility would be to run actsync on your passive server. 
(Yet, you could lose the first few messages posted to a newsgroup, 
before actsync has been run on the passive server.)



>> The Message-ID is the same.  It identifies a given news article on all
>> servers in the world.
>
> Using Message-ID with intranet hostnames does not cause problem?
> Right?

No problem.

-- 
Julien ÉLIE

« Medicina animi. »
Re: [request] INN2 and HA/DRBD-active-passive ? how to build a HA solution for INN2 ?
#84577
Author: Geek Marc
Date: Fri, 23 Dec 2011 05:59
26 lines
2411 bytes
Le Thu, 22 Dec 2011 12:45:01 +0100, Julien ÉLIE a écrit :

> Hi Marc,
> 
>> So for active node, I have to put xrefslave to false and nnrpdposthost
>> to false.
>> So for passive node, I have to put xrefslave to true and nnrpdposthost
>> to true.
>> Then, all posts will go to active node and be replicated with same
>> number to passive node.
> 
> Whereas xrefslave is a boolean, nnrpdposthost is a string.  For active
> node, it should be unset.  For passive node, it should contain the host
> name or IP of your slave.
I responded in a hurry without reading nnrpdposthost

nnrpdposthost

    If set, nnrpd(8) and rnews(1) will pass all locally posted articles 
to the specified host rather than trying to inject them locally. See also 
nnrpdpostport. This should always be set if xrefslave is true. The 
default value is unset. 

The slave shouldn't inject itself messages, it should use the master nntp 
server - or others.
Re: [request] INN2 and HA/DRBD-active-passive ? how to build a HA solution for INN2 ?
#84576
Author: Geek Marc
Date: Fri, 23 Dec 2011 06:43
24 lines
2273 bytes
Le Thu, 22 Dec 2011 12:48:27 +0100, Julien ÉLIE a écrit :

> Hi Marc,
> 
>>> Only one instance should be working at the same time (otherwise, your
>>> history, overview or spool will get corrupted).
>>
>> May be it would give less maintenance for creating/deleting groups.
>> Only one place to manage.
> 
> You could use (local) control messages to achieve that.
> This way, the newsgroups are created and deleted on both your servers.
> 
> Another possibility would be to run actsync on your passive server.
> (Yet, you could lose the first few messages posted to a newsgroup,
> before actsync has been run on the passive server.)
Thanks for info


Actually I use about 10 scripts I installed over every server to do usual 
management in a really quick way with a few tests and displays.

I really need to read about control messages and actsync :)
Re: [request] INN2 and HA/DRBD-active-passive ? how to build a HA solution for INN2 ?
#84578
Author: Julien ÉLIE
Date: Fri, 23 Dec 2011 18:42
22 lines
2305 bytes
Hi Marc,

> I really need to read about control messages and actsync :)

A useful reading would be:
     http://www.eyrie.org/~eagle/faqs/usenet-hier.html

Of course you can skip the part dealing with public sharing of your 
hierarchy and PGP key.  Though private, your newsgroups can be 
administered the same way news.* or fr.* are (that is to say sending 
newgroup/rmgroup/checkgroups messages).
Existing tools to do that easily are mentioned at the end of the page.


As for actsync:
     http://www.eyrie.org/~eagle/software/inn/docs/actsync.html

-- 
Julien ÉLIE

« Hâte-toi de bien vivre et songe que chaque jour est à lui seul une
   vie. » (Sénèque)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads