{"id":101,"date":"2007-08-17T04:00:00","date_gmt":"2007-08-17T11:00:00","guid":{"rendered":"http:\/\/www.jasemccarty.com\/blog\/2007\/08\/free-load-balancer-possible-connection-broker-for-vdi.html"},"modified":"2007-08-17T04:00:00","modified_gmt":"2007-08-17T11:00:00","slug":"free-load-balancer-possible-connection-broker-for-vdi","status":"publish","type":"post","link":"https:\/\/www.jasemccarty.com\/blog\/free-load-balancer-possible-connection-broker-for-vdi\/","title":{"rendered":"Free load balancer (possible connection broker) for VDI"},"content":{"rendered":"<p>Looking for an alternative (free) Connection Broker solution I stumbled across Crossroads.<\/p>\n<p>It is a little application that will run on pretty much any current Linux\/OSX build, and will load balance specific IP\u2019s, ports.<\/p>\n<p>Just because I wanted something quick and easy to test this on, I downloaded Ubuntu Desktop 6.0.6 LTS to try it out on.<\/p>\n<p>Download Crossroads <a href=\"http:\/\/crossroads.e-tunity.com\/\">here<\/a>.  I chose the 1.48 build, as it is the latest stable (at the time of this writing).<\/p>\n<p>So, download it, to your Linux system, and unpack it, and install it.<br \/>I downloaded\/copied it to \/tmp, and installed it as follows:<\/p>\n<p><span style=\"font-weight: bold;\">Unpacking the archive<\/span><br \/>root@ubuntu:\/tmp# gunzip crossroads-stable.tar.gz<br \/>root@ubuntu:\/tmp# tar \u2013xvf crossroads-stable.tar<br \/>root@ubuntu:\/tmp# cd crossroads-1.48<\/p>\n<p><span style=\"font-weight: bold;\">Compiling\/Installing Crossroads<br \/><\/span><span style=\"font-size:85%;\">(make sure you have a C compiler like gcc installed)<\/span><br \/>root@ubuntu:\/tmp\/crossroads-1.48# make install<br \/>root@ubuntu:\/tmp\/crossroads-1.48# touch \/etc\/crossroads.conf<\/p>\n<p><span style=\"font-weight: bold;\">Basic Configuring of Crossroads<\/span><br \/>edit \/etc\/crossroads.conf (with the below configuration)<\/p>\n<pre><br \/>service rdp {<br \/>port 3389;<br \/>revivinginterval 15;<br \/>backend one {<br \/>        server 10.1.1.100:3389;<br \/>        maxconnections 1;<br \/>        setserverheader \"X-Real-IP: %r\";<br \/>        trafficlog \/tmp\/backend.1.log;<br \/>       }<br \/>backend two {<br \/>        server 10.1.1.101:3389;<br \/>        maxconnections 1;<br \/>        setserverheader \"X-Real-IP: %r\";<br \/>        trafficlog \/tmp\/backend.2.log;<br \/>        }<br \/>}<\/pre>\n<p>I set the &#8220;maxconnections&#8221; to 1, because if I have XP\/Vista desktops on the backend, I don&#8217;t want someone attempting to connect to one that already has an active connection.<\/p>\n<p><span style=\"font-weight: bold;\">Starting Crossroads<\/span><br \/>\/usr\/local\/bin\/crossroads start<\/p>\n<p><span style=\"font-weight: bold;\">Checking the status of Crossroads<\/span><br \/>\/usr\/local\/bin\/crossroads status<\/p>\n<p><span style=\"font-weight: bold;\">Stopping Crossroads<\/span><br \/>\/usr\/local\/bin\/crossroads stop<\/p>\n<p>Keep in mind, this is just a rudimentary implementation of Crossroads in a Connection Broker capacity.<\/p>\n<p>The Crossroads documentation gives more parameters and information to have it start automatically at different run levels, allowed from\/denied from, etc.<\/p>\n<p>Additionally, <span style=\"font-style: italic;\">the default Makedef.def is setup for a maximum of 20 connections<\/span>.  So, before you compile it, adjust the number accordingly.<\/p>\n<p>The config file (\/etc\/crossroads.conf) also has many additional settings, that can customize the connections, including things such as allowed\/denied addresses, etc.<\/p>\n<p><span style=\"font-weight: bold;\">The Web Interface<\/span><br \/>There is also a web gui that will display connections\/etc.<br \/>To start it up, run \/usr\/local\/bin\/crossroads-mgr start PORT<\/p>\n<p>So if you run \/usr\/local\/bin\/crossroads-mgr start 80, you should see something like this:<\/p>\n<p><a onblur=\"try {parent.deselectBloggerImageGracefully();} catch(e) {}\" href=\"http:\/\/www.jasemccarty.com\/vmwareforum\/crossroads-mgr.jpg\"><img decoding=\"async\" style=\"cursor: pointer; width: 200px;\" src=\"http:\/\/www.jasemccarty.com\/vmwareforum\/crossroads-mgr.jpg\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>Now, in a production environment, I&#8217;d recommend creating a hardened Linux VM, and really tweaking \/etc\/crossroads.conf to get the best performance and security.<\/p>\n<p>This could be a really viable solution in a small environment where costs play a significant factor.<\/p>\n<p>As can be seen it really isn&#8217;t hard to do, doesn&#8217;t take long, and (by reading the docs) can be locked down enough to be a cheap (free) solution.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Looking for an alternative (free) Connection Broker solution I stumbled across Crossroads. It is a little application that will run on pretty much any current &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-101","post","type-post","status-publish","format-standard","hentry","category-virtualization"],"_links":{"self":[{"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/posts\/101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/comments?post=101"}],"version-history":[{"count":0,"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/posts\/101\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/media?parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/categories?post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/tags?post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}