Skip navigation
2005

Bela Ban's Blog

December 2005 Previous month Next month
I like open source. This is a little example of how AUTH was conceived.

 

 

JGroups has always been pretty weak on the security front, so there wasn't any encryption until about 2 years ago (ENCRYPT), and any member could join a group and wreak havoc. To be quite honest, I never cared much about security (I think it's pretty boring), and in most cases JGroups is used behind a firewall anyway, which is generally considered a safe zone.

 

 

However, with more and more users using JGroups in a WAN setting, this meant that (unless you used VPNs or secure IP tunnels), anybody could eavesdrop on JGroups traffic, and even worse: anybody with a matching stack could join the group and start receiving and sending messages !

 

 

So about 2 years ago, Steve Woodcock, a smart bloke from London wrote ENCRYPT, or rather rewrote it (the first version was pretty bad). So we had encryption of messages... but still anybody could join the group.

 

Over the last couple of months I've heard more and more requests for a feature that allowed only authorized members into the group. So naturally that feature was discussed on the JGroups dev list. However, often times a lot of people add their 2 cents, but nobody is willing to actually implement it :-) Then, this summer I went to do a JGroups consulting at a large insurance company in Switzerland, and we somehow got into the topic of authentication. The discussion got pretty detailed (I think we had time left at the end of the 2 days), and we came up with a pretty detailed description of AUTH). They, however, didn't have the time or resources to implement it right away.

 

Enter Chris Mills, who attended my Clustering training in Washington D.C. in October. In the JGroups presentation I mentioned AUTH, and he started hacking away at it. At the end of the training, he had a prototype ready, and last week during my Clustering training in London, he presented a quite complete version of it. I think he started writing it because he wanted to see how a JGroups protocol works, and (maybe unexpectedly?) ended up with a full blown protocol. Great job Chris ! We will see this being integrated into the 2.3 head version of JGroups early next year. This is how it works:

  • AUTH is just below GMS and intercepts JOIN_REQ requests
  • On the client side, AUTH adds some credentials (e.g. a X.509 cert or a password) to the JOIN message
  • On the server side (coordinator), AUTH extracts the credentials and verifies it. If true, it passes the request up to GMS, otherwise it sends back a JOIN_RSP, which will causes an exception at the client on Channel.connect().
The providing of credentials (client side) and the validation of them (server side) are exposed as policies, so anybody can implement their own. Chris has a X.509 policy and a simple oone-way hased password policy. This is only a small example of how open source works, but it shows that there can be many stakeholders involved, from wishlist creating to requirements gathering to specification and finally implementation...
belaban

Stressing JGroups

Posted by belaban Dec 13, 2005
My first blog entry... I never thought I'd sink that low, but anways, here goes... :-)

 

I recently ran a simple performance test on my laptop (a Windows XP Dell D-810 with 2GB of memory and a single processor). I had 2 processes on the same box, each process multicasting 500 million 1K messages, for a total of 1 billion 1K messages, so 1TB of data exchanged between the 2 processes. The switch used was a simple $20 100Mbps switch. The setup (and how to run the tests yourselves) is described here.

 

Having the 2 processes on the same machine probably (negatively) affected the test results a bit, but my main goal was really to see whether I had any memory leaks.

Anyway the results I got were promising: the time taken was roughly 22 hours, with an average message rate of ca 10300 messages per second. The standard deviation was actually very small, and the memory used was roughly 40MB (I used -Xmx100M, which is relatively small and used a conservative (a.k.a. non aggressive flow control). Attaching jconsole to it showed that free memory stayed flat during the entire run, so I'm confident that I could run the test for a couple of billion messages and still get stable memory... The one problem with jconsole though was that it ran out of memory after ca. 600 million messages but simply restarting it helped - and this didn't affect the running test. I suspect jconsole must be storing some information in memory, and accumulating that info triggers an OOM. Guess it wasn't meant to be used for such large scale tests. I actually had started a run of 2 members where every member sent 1 billion 1K messages, for a total of 2 billion messages. But then my little daughter closed the lid on my laptop after 800 million messages whiel I was away... I guess one of the perils of working at home :-)

 

Stay tuned for more detailed performance numbers; we will have 8 new boxes in our Atlanta lab in January and I should have some numbers by the end of February if everything goes according to plan. Also, the Novell guys working on TCP_NIO are working on an article on performance, which they measured on a 4 node cluster, and their numbers are excellent (roughly 13000 1K messages/sec). Stay tuned !