<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jason's .plan &#187; Technology</title>
	<atom:link href="http://blogs.digitar.com/jjww/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.digitar.com/jjww</link>
	<description>thoughts &#38; musings</description>
	<lastBuildDate>Thu, 18 Mar 2010 06:29:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rabbits and warrens.</title>
		<link>http://blogs.digitar.com/jjww/2009/01/rabbits-and-warrens/</link>
		<comments>http://blogs.digitar.com/jjww/2009/01/rabbits-and-warrens/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 01:21:38 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[amqp]]></category>
		<category><![CDATA[py-amqplib]]></category>
		<category><![CDATA[rabbitmq]]></category>

		<guid isPermaLink="false">http://blogs.digitar.com/jjww/2009/01/rabbits-and-warrens/</guid>
		<description><![CDATA[<p>However, there are three in-particular, that are designed to be highly flexible message queues for their own sake: Apache ActiveMQ ZeroMQ RabbitMQ Apache ActiveMQ seems to get the most press, but it appears to have some issues not losing messages. ... So, without further ado...here is a reduction of a weeks' worth of reading up on AMQP and how it works in RabbitMQ...and how to play with it in Python: Playing telephone There are four building blocks you really care about in AMQP: virtual hosts, exchanges, queues and bindings.</p>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.dkimages.com/discover/previews/811/20089825.JPG" border="0" alt="20089825.JPG" width="384" height="293" />The goal was simple enough: decouple a particular type of analysis out-of-band from mainstream e-mail processing. We started down the MySQL road…put the things to be digested into a table…consume them in another daemon…bada bing bada boom. But pretty soon, complex ugliness crept into the design phase… You want to have multiple daemons servicing the queue?…no problem we&#8217;ll just hard code node numbers…what? you want dynamic load re-assignment when daemons join and die?</p>
<p>You get the idea…what was supposed to be simple (decouple something) was spinning its own <a href="http://en.wikipedia.org/wiki/Gordian_knot">Gordian knot</a>. It seemed like a good time to see if every problem was looking like a nail (table), because all we had were hammers (MySQL).</p>
<p>A short search later, and we entered the world of message queueing. No, no…we know obviously what a message queue is. Heck, we do e-mail for a living. We&#8217;ve implemented all sorts of specialized, high-speed, in-memory queues for e-mail processing. What we weren&#8217;t aware of was the family of off-the-shelf, generalized, message queueing (MQ) servers…a language-agnostic, no-assembly required way to wire routing between applications over a network. A message queue we didn&#8217;t have to write ourselves? Hold your tongue.</p>
<h2>Open up your queue…</h2>
<p>Cutting to the chase, over the last 4 years there have been no shortage of open-source message queueing servers written. Most of them are one-offs by folks like LiveJournal to scratch a particular itch. Yeah, they don&#8217;t really care what kind of messages they carry, but their design parameters are usually creator-specific (and message persistence after a crash usually isn&#8217;t one of them). However, there are three in-particular, that are designed to be highly flexible message queues for their own sake:</p>
<ul>
<li><a href="http://activemq.apache.org/">Apache ActiveMQ</a></li>
<li><a href="http://www.zeromq.org/">ZeroMQ</a></li>
<li><a href="http://www.rabbitmq.com/">RabbitMQ</a></li>
</ul>
<p>Apache ActiveMQ gets the most press, but it appears to have some issues not losing messages. <strong>Next.</strong></p>
<p>ZeroMQ and RabbitMQ both support an open messaging protocol called <span class="caps">AMQP.</span> The advantage to <span class="caps">AMQP</span> is that it&#8217;s designed to be a highly-robust and open alternative to the two commercial message queues out there (IBM and Tibco). Muy bueno. However, ZeroMQ doesn&#8217;t support message persistence across crashes reboots. No muy bueno. That leaves us with RabbitMQ. (That being said if you don&#8217;t need persistence ZeroMQ is pretty darn interesting…incredibly low latency and flexible topologies).</p>
<h2>That leaves us with the carrot muncher…</h2>
<p><img src="http://www.rabbitmq.com/img/RabbitMQLogo.png" border="0" alt="" /></p>
<p>RabbitMQ pretty much sold me the minute I read “written in Erlang”. <a href="http://en.wikipedia.org/wiki/Erlang_(programming_language)">Erlang</a> is a highly parallel programming language developed over at Ericsson for running telco switches…yeah the kind with six bazillion 9s of uptime. In Erlang, its supposedly trivial to spin off processes and then communicate between them using message passing. Seems like the ideal underpinning for a message queue no?</p>
<p>Also, RabbitMQ supports persistence. Yes Virginia, if your RabbitMQ dies, your messages don&#8217;t have to die an unwitting death…they can be reborn in your queues on reboot. Oh…and as is always desired @ DigiTar, it <a href="http://barryp.org/software/py-amqplib/">plays nicely with python</a>. All that being said, RabbitMQs documentation is well…horrible. Lemme rephrase, if you already understand <span class="caps">AMQP,</span> the docs are fine. But how many folks know <span class="caps">AMQP</span>? It&#8217;d be like MySQL docs assuming you knew some form of <span class="caps">SQL…</span>er…nevermind.</p>
<p>So, without further ado…here is a reduction of a weeks&#8217; worth of reading up on <span class="caps">AMQP</span> and how it works in RabbitMQ…and how to play with it in Python:</p>
<h2>Playing telephone</h2>
<p>There are four building blocks you really care about in <span class="caps">AMQP</span>: virtual hosts, exchanges, queues and bindings. A virtual host holds a bundle of exchanges, queues and bindings. Why would you want multiple virtual hosts? Easy. A username in RabbitMQ grants you access to a virtual host…in its entirety. So the only way to keep group A from accessing group B&#8217;s exchanges/queues/bindings/etc. is to create a virtual host for A and one for B. Every RabbitMQ server has a default virtual host named “/”. If that&#8217;s all you need, you&#8217;re ready to roll.</p>
<h2>Exchanges, Queues and bindings…oh my!</h2>
<p>Here&#8217;s where my railcar went off the tracks initially. How do all the parts thread together?</p>
<p>Queues are where your “messages” end up. They&#8217;re message buckets…and your messages sit there until a client (a.k.a. consumer) connects to the queue and siphons it off. However, you can configure a queue so that if there isn&#8217;t a consumer ready to accept the message when it hits the queue, the message goes poof. But we digress…</p>
<p>The important thing to remember is that queues are created programmatically by your consumers (not via a configuration file or command line program). That&#8217;s <span class="caps">OK,</span> because if a consumer app tries to “create” a queue that already exists, RabbitMQ pats it on the head, smiles gently and <span class="caps">NOOP</span>s the request. So you can keep your MQ configuration in-line with your app code…what a concept.</p>
<p><span class="caps">OK,</span> so you&#8217;ve created and attached to your queue, and your consumer app is drumming its fingers waiting for a message…and drumming…and drumming…but alas no message. What happened? Well you gotta pump a message in first! But to do that you&#8217;ve got to have an exchange…</p>
<p>Exchanges are routers with routing tables. That&#8217;s it. End stop. Every message has what&#8217;s known as a “routing key”, which is simply a string. The exchange has a list of bindings (routes) that say, for example, messages with routing key “X” go to queue “timbuktu”. But we get slightly ahead of ourselves.</p>
<p>Your consumer application should create your exchanges (plural). Wait? You mean you can have more than one exchange? Yes, you can, but why? Easy. Each exchange operates in its own userland process, so adding exchanges, adds processes allowing you to scale message routing capacity with the number of cores in your server. As an example, on an 8-core server you could create 5 exchanges to maximize your utilization, leaving 3 cores open for handling the queues, etc.. Similarly, in a RabbitMQ cluster, you can use the same principle to spread exchanges across the cluster members to add even more throughput.</p>
<p><span class="caps">OK,</span> so you&#8217;ve created an exchange…but it doesn&#8217;t know what queues the messages go in. You need “routing rules” (bindings). A binding essentially says things like this: put messages that show up in exchange “desert” and have routing key “ali-baba” into the queue “hideout”. In other words, a binding is a routing rule that links an exchange to a queue based on a routing key. It is possible for two binding rules to use the same routing key. For example, maybe messages with the routing key “audit” need to go <strong>both</strong> to the “log-forever” queue and the “alert-the-big-dude” queue. To accomplish this, just create two binding rules (each one linking the exchange to one of the queues) that both trigger on routing key “audit”. In this case, the exchange duplicates the message and sends it to both queues. Exchanges are just routing tables containing bindings.</p>
<p>Now for the curveball: there are multiple types of exchanges. They all do routing, but they accept different styles of binding “rules”. Why not just create one type of exchange for all style of rules? Because each rule style has a different <span class="caps">CPU</span> cost for analyzing if a message matches the rule. For example, a “topic” exchange tries to match a message&#8217;s routing key against a pattern like “<strong>dogs.*</strong>”. Matching that wildcard on the end takes more <span class="caps">CPU</span> than simply seeing if the routing key is “<strong>dogs</strong>” or not (e.g. a “direct” exchange). If you don&#8217;t need the extra flexibility of a “topic” exchange, you can get more messages/sec routed if you choose the “direct” exchange type. So what are the types and how do they route?</p>
<p><strong>Fanout Exchange</strong> &#8211; No routing keys involved. You simply bind a queue to the exchange. Any message that is sent to the exchange is sent to <strong>all</strong> queues bound to that exchange. Think of it like a subnet broadcast. Any host on the subnet gets a copy of the packet. Fanout exchanges route messages the fastest.</p>
<p><strong>Direct Exchange</strong> &#8211; Routing keys are involved. A queue binds to the exchange to request messages that match a particular routing key <em>exactly</em>. This is a straight match. If a queue binds to the exchange requesting messages with routing key “<strong>dog</strong>”, only messages labelled “<strong>dog</strong>” get sent to that queue (not “<strong>dog.puppy</strong>”, not “<strong>dog.guard</strong>“…only “<strong>dog</strong>”).</p>
<p><strong>Topic Exchange</strong> &#8211; Matches routing keys against a pattern. Instead of binding with a particular routing key, the queue binds with a pattern string. The symbol <strong>#</strong> matches one or more words, and the symbol <strong>*</strong> matches any single word (no more, no less). So “<strong>audit.#</strong>” would match “<strong>audit.irs.corporate</strong>”, but “<strong>audit.*</strong>” would only match “<strong>audit.irs</strong>”. Our friends at RedHat have put together a great image to express how topic exchanges work:</p>
<div><a href="http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/html/Messaging_Tutorial/sect-Messaging_Tutorial-Initial_Concepts-Topic_Exchange.html"><img src="http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/html/Messaging_Tutorial/images/topic-exchange.png" border="0" alt="" width="549" height="295" /></a></div>
<p>Source: <a href="http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_MRG/1.0/html/Messaging_Tutorial/sect-Messaging_Tutorial-Initial_Concepts-Topic_Exchange.html">Red Hat Messaging Tutorial: 1.3 Topic Exchange</a></p>
<p> </p>
<h2>Persistent little bugger…</h2>
<p>You spend all that time creating your queues, exchanges and bindings, and then <span class="caps">BANG</span>!…the server fries faster than the griddle at McDonald&#8217;s. All your queues, exchanges and bindings are there right? Oh geez…what about the messages in the queues you hadn&#8217;t serviced yet?</p>
<p>Relax, providing you created everything with the default arguments, it&#8217;s all gone…poof…whoosh…nada…nil. That&#8217;s right, RabbitMQ rebooted as empty as a baby&#8217;s noggin. You gotta redo everything kemosabe. How do you keep this from happening in the future?</p>
<p>On your queues and your exchanges there&#8217;s a creation-time flag called “durable”. There&#8217;s only one thing durable means in <span class="caps">AMQP</span>-land…the queue or exchange marked durable will be re-created automatically on reboot. It <strong>does not mean</strong> the messages in the queues will survive the reboot. They won&#8217;t. So how do we make not only our config but messages persist through a reboot?</p>
<p>Well the first question is, do you really want your messages to persist? For a message to last through a reboot, it has to be written to disk, and even a simple checkpoint to disk takes time. If you value message routing speed more than the contents of the message, don&#8217;t make your messages persistent. That being said, for our particular needs @ DigiTar, persistence is important.</p>
<p>When you publish your message to an exchange, there&#8217;s a flag called “Delivery Mode”. Depending on the <span class="caps">AMQP</span> library you&#8217;re using there will be different ways of setting it (we&#8217;ll cover the Python library later). But the long and the short of it is you want the “Delivery Mode” set to the value 2, which means “persistent”. “Delivery Mode” usually (depending on your <span class="caps">AMQP</span> library) defaults to a value of 1, which means “non-persistent”. So the steps for persistent messaging are:</p>
<ol>
<li>Mark the exchange “durable”.</li>
<li>Mark the queue “durable”.</li>
<li>Set the message&#8217;s “delivery mode” to a value of 2</li>
</ol>
<p>That&#8217;s it. Not really rocket science, but enough moving parts to make a mistake and send little Sally&#8217;s dental records into cyber-Nirvana.</p>
<p>There may be one thing nagging you though…what about the binding? We didn&#8217;t mark the binding “durable” when we created it. It&#8217;s alright. If you bind a durable queue to a durable exchange, RabbitMQ will automatically preserve the binding. Similarly, if you delete any exchange/queue (durable or not) any bindings that depend on it get deleted automatically.</p>
<p>Two things to be aware of:</p>
<ul>
<li>RabbitMQ will <strong>not</strong> allow you to bind a <strong>non-durable</strong> exchange to a <strong>durable</strong> queue, or vice-versa. Both the exchange and the queue must be durable for the binding operation to succeed.</li>
<li>You cannot change the creation flags on a queue or exchange after you&#8217;ve created it. For example, if you create a queue as “non-durable”, and want to change it to “durable”, the only way to do this is to destroy the queue and re-create it. It&#8217;s a good reason to double check your declarations.</li>
</ul>
<h2>Food for snakes</h2>
<p>A real empty area for <span class="caps">AMQP</span> usage is using it in Python programs. For other languages there are plenty of references:</p>
<ul>
<li>Java &#8211; <a href="http://www.rabbitmq.com/java-client.html">http://www.rabbitmq.com/java-client.html</a></li>
<li>.NET &#8211; <a href="http://www.rabbitmq.com/releases/rabbitmq-dotnet-client/v1.5.0/rabbitmq-dotnet-client-1.5.0-user-guide.pdf">http://www.rabbitmq.com/releases/rabbitmq-dotnet-client/v1.5.0/rabbitmq-dotnet-client-1.5.0-user-guide.pdf</a></li>
<li>Ruby &#8211; <a href="http://somic.org/2008/06/24/ruby-amqp-rabbitmq-example/">http://somic.org/2008/06/24/ruby-amqp-rabbitmq-example/</a></li>
</ul>
<p>But for little old Python, you need to dig it out yourself. So other folks don&#8217;t have to wander in the wilderness like I did, here&#8217;s a little primer on using Python to do the <span class="caps">AMQP</span>-tasks we&#8217;ve talked about:</p>
<p>First, you&#8217;ll need a Python <span class="caps">AMQP</span> library…and there are two:</p>
<ul>
<li><a href="http://barryp.org/software/py-amqplib/">py-amqplib</a> &#8211; General <span class="caps">AMQP</span> library</li>
<li><a href="https://launchpad.net/txamqp">txAMQP</a> &#8211; An <span class="caps">AMQP</span> library that uses the <a href="http://www.twistedmatrix.com">Twisted</a> framework, thereby allowing asynchronous I/O.</li>
</ul>
<p>Depending on your needs, py-amqplib or txAMQP may be more to your liking. Being Twisted-based, txAMQP holds the promise of building super performing <span class="caps">AMQP</span> consumers that use async I/O. But Twisted programming is a topic all its own…so we&#8217;re going to use py-amqplib for clarity&#8217;s sake. <strong>UPDATE: Please check the comments for example code showing use of txAMQP from Esteve Fernandez.</strong></p>
<p><span class="caps">AMQP</span> supports pipelining multiple MQ communication channels over one <span class="caps">TCP</span> connection, where each channel is a communication stream used by your program. Every <span class="caps">AMQP</span> program has at least one connection and one channel:</p>
<div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_about(1)" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="python" style="font-family:monospace;"><span class="kw1">from</span> amqplib <span class="kw1">import</span> client_0_8 <span class="kw1">as</span> amqp
conn = amqp.<span class="me1">Connection</span><span class="br0">&#40;</span>host=<span class="st0">&quot;localhost:5672 &quot;</span>, userid=<span class="st0">&quot;guest&quot;</span>,
    password=<span class="st0">&quot;guest&quot;</span>, virtual_host=<span class="st0">&quot;/&quot;</span>, insist=<span class="kw2">False</span><span class="br0">&#41;</span>
chan = conn.<span class="me1">channel</span><span class="br0">&#40;</span><span class="br0">&#41;</span></pre></div></div>
<p>Each channel is assigned an integer channel number automatically by the <strong>.channel()</strong> method of the <strong>Connection()</strong> class. Alternately, you can specify the channel number yourself by calling <strong>.channel(x)</strong> , where x is the channel number you want. More often than not, its a good idea to just let the <strong>.channel()</strong> method auto-assign the channel number to avoid collisions.</p>
<p>Now we&#8217;ve got a connection and channel to talk over. At this point, our code is going to diverge into two applications that use that same bit we&#8217;ve created so far: a consumer and the publisher. Let&#8217;s create the consumer app by creating a queue named “<strong>po_box</strong>” and an exchange named “<strong>sorting_room</strong>”:</p>
<div id="wpshdo_2" class="wp-synhighlighter-outer"><div id="wpshdt_2" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_2"></a><a id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_about(2)" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><pre class="python" style="font-family:monospace;">chan.<span class="me1">queue_declare</span><span class="br0">&#40;</span>queue=<span class="st0">&quot;po_box&quot;</span>, durable=<span class="kw2">True</span>,
    exclusive=<span class="kw2">False</span>, auto_delete=<span class="kw2">False</span><span class="br0">&#41;</span>
chan.<span class="me1">exchange_declare</span><span class="br0">&#40;</span>exchange=<span class="st0">&quot;sorting_room&quot;</span>, <span class="kw2">type</span>=<span class="st0">&quot;direct&quot;</span>, durable=<span class="kw2">True</span>,
    auto_delete=<span class="kw2">False</span>,<span class="br0">&#41;</span></pre></div></div>
<p>What did that do? First, it created a queue called “<strong>po_box</strong>” that is durable (will be re-created on reboot) and will not be automatically deleted when the last consumer detaches from it (<strong>auto_delete=False</strong>). It&#8217;s important to set <strong>auto_delete</strong> to false when making a queue (or exchange) durable, otherwise the queue itself will disappear when the last consumer detaches (regardless of the <strong>durable</strong> flag). Setting both <strong>durable</strong> and <strong>auto_delete</strong> to true, would make a queue that would be recreated only if RabbitMQ died unexpectedly with consumers still attached.</p>
<p>(You may have noticed there&#8217;s another flag specified called “<strong>exclusive</strong>”. If set to true, only the consumer that creates the queue will be allowed to attach to it. It&#8217;s a queue that is private to the creating consumer.)</p>
<p>There&#8217;s also the exchange declaration for the “<strong>sorting_room</strong>” exchange. <strong>auto_delete</strong> and <strong>durable</strong> mean the same things as they do in a queue declaration. However, <strong>.exchange_declare()</strong> introduces an argument called <strong>type</strong> that defines what type of exchange you&#8217;re making (as described earlier): <strong>fanout</strong>, <strong>direct</strong> or <strong>topic</strong>.</p>
<p>At this point, you&#8217;ve got a queue to receive messages and an exchange to publish them to initially…but we need a binding to link the two together:</p>
<div id="wpshdo_3" class="wp-synhighlighter-outer"><div id="wpshdt_3" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_3"></a><a id="wpshat_3" class="wp-synhighlighter-title" href="#codesyntax_3"  onClick="javascript:wpsh_toggleBlock(3)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_3" onClick="javascript:wpsh_code(3)" title="Show code only"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_3" onClick="javascript:wpsh_print(3)" title="Print code"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="#codesyntax_3" onClick="javascript:wpsh_about(3)" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_3" class="wp-synhighlighter-inner" style="display: block;"><pre class="python" style="font-family:monospace;">chan.<span class="me1">queue_bind</span><span class="br0">&#40;</span>queue=<span class="st0">&quot;po_box&quot;</span>, exchange=<span class="st0">&quot;sorting_room&quot;</span>,
      routing_key=<span class="st0">&quot;jason&quot;</span><span class="br0">&#41;</span></pre></div></div>
<p>The binding is pretty straight forward. Any messages arriving at the “<strong>sorting_room</strong>” exchange with the routing key “<strong>jason</strong>” gets routed to the “<strong>po_box</strong>” queue.</p>
<p>Now, there&#8217;s two methods of getting messages out of the queue. The first is to call <strong>chan.basic_get()</strong> to pull the next message off the queue (if there are no messages waiting on the queue, <strong>chan.basic_get()</strong> will return a None object&#8230;thereby blowing up the <strong>print msg.body</strong> code below if not trapped) :</p>
<div id="wpshdo_4" class="wp-synhighlighter-outer"><div id="wpshdt_4" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_4"></a><a id="wpshat_4" class="wp-synhighlighter-title" href="#codesyntax_4"  onClick="javascript:wpsh_toggleBlock(4)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_4" onClick="javascript:wpsh_code(4)" title="Show code only"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_4" onClick="javascript:wpsh_print(4)" title="Print code"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="#codesyntax_4" onClick="javascript:wpsh_about(4)" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_4" class="wp-synhighlighter-inner" style="display: block;"><pre class="python" style="font-family:monospace;">msg = chan.<span class="me1">basic_get</span><span class="br0">&#40;</span><span class="st0">&quot;po_box&quot;</span><span class="br0">&#41;</span>
<span class="kw1">print</span> msg.<span class="me1">body</span>
chan.<span class="me1">basic_ack</span><span class="br0">&#40;</span>msg.<span class="me1">delivery_tag</span><span class="br0">&#41;</span></pre></div></div>
<p>But what if you want your application to be notified as soon as a message is available for it? To do that, instead of <strong>chan.basic_get()</strong>, you need to register a callback for new messages using <strong>chan.basic_consume()</strong>:</p>
<div id="wpshdo_5" class="wp-synhighlighter-outer"><div id="wpshdt_5" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_5"></a><a id="wpshat_5" class="wp-synhighlighter-title" href="#codesyntax_5"  onClick="javascript:wpsh_toggleBlock(5)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_5" onClick="javascript:wpsh_code(5)" title="Show code only"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_5" onClick="javascript:wpsh_print(5)" title="Print code"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="#codesyntax_5" onClick="javascript:wpsh_about(5)" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_5" class="wp-synhighlighter-inner" style="display: block;"><pre class="python" style="font-family:monospace;"><span class="kw1">def</span> recv_callback<span class="br0">&#40;</span>msg<span class="br0">&#41;</span>:
     <span class="kw1">print</span> <span class="st0">'Received: '</span> + msg.<span class="me1">body</span>
chan.<span class="me1">basic_consume</span><span class="br0">&#40;</span>queue=<span class="st0">'po_box'</span>, no_ack=<span class="kw2">True</span>,
                callback=recv_callback, consumer_tag=<span class="st0">&quot;testtag&quot;</span><span class="br0">&#41;</span>
<span class="kw1">while</span> <span class="kw2">True</span>:
     chan.<span class="me1">wait</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
chan.<span class="me1">basic_cancel</span><span class="br0">&#40;</span><span class="st0">&quot;testtag&quot;</span><span class="br0">&#41;</span></pre></div></div>
<p><strong>chan.wait()</strong> is looped infinitely, which is what causes the channel to wait for the next message notification from the queue. <strong>chan.basic_cancel()</strong> is how you unregister your message notification callback. The argument specifies the <strong>consumer_tag</strong> you specified in the original <strong>chan.basic_consume()</strong> registration (that&#8217;s how it figures out which callback to unregister). In this case <strong>chan.basic_cancel()</strong> never gets called due to the infinite loop that precedes it…but you need to know about it, so it&#8217;s in the snippet.</p>
<p>The one additional thing you should pay attention to in the consumer is the <strong>no_ack</strong> argument. It&#8217;s accepted on both <strong>chan.basic_get()</strong> and <strong>chan.basic_consume()</strong> and defaults to false. When you grab a message off a queue, RabbitMQ needs you to explicitly acknowledge that you have it. If you don&#8217;t, RabbitMQ will re-assign the message to another consumer on the queue after a timeout interval (or on disconnect by the consumer that initially received it  without ack&#8217;ing it). If you set the <strong>no_ack</strong> argument to true, then <strong>py-amqplib</strong> will add a &#8220;no_ack&#8221; property to your AMQP request for the next message. That will instruct the AMQP server to not expect an acknowledgement for that get/consume. However, in most cases, you probably want to send the acknowledgement yourself (e.g. you need to put the message contents in a database before you acknowledge). Acknowledgements are done by caling the <strong>chan.basic_ack()</strong> method, using the <strong>delivery_tag</strong> property of the message you&#8217;re acknowledging as the argument (see the <strong>chan.basic_get()</strong> code snippet above for an example).</p>
<p>That&#8217;s all she wrote for the consumer. (Download: <a href="/jjww/code-samples/amqp_consumer.py">amqp_consumer.py</a>)</p>
<p>But what good is a consumer, if nobody is sending it messages? So you need a publisher. The code below will publish a simple message to the “<strong>sorting_room</strong>” exchange and mark it with the routing key “<strong>jason</strong>”:</p>
<div id="wpshdo_6" class="wp-synhighlighter-outer"><div id="wpshdt_6" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_6"></a><a id="wpshat_6" class="wp-synhighlighter-title" href="#codesyntax_6"  onClick="javascript:wpsh_toggleBlock(6)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_6" onClick="javascript:wpsh_code(6)" title="Show code only"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_6" onClick="javascript:wpsh_print(6)" title="Print code"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="#codesyntax_6" onClick="javascript:wpsh_about(6)" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_6" class="wp-synhighlighter-inner" style="display: block;"><pre class="python" style="font-family:monospace;">msg = amqp.<span class="me1">Message</span><span class="br0">&#40;</span><span class="st0">&quot;Test message!&quot;</span><span class="br0">&#41;</span>
msg.<span class="me1">properties</span><span class="br0">&#91;</span><span class="st0">&quot;delivery_mode&quot;</span><span class="br0">&#93;</span> = <span class="nu0">2</span>
chan.<span class="me1">basic_publish</span><span class="br0">&#40;</span>msg,exchange=<span class="st0">&quot;sorting_room&quot;</span>,routing_key=<span class="st0">&quot;jason&quot;</span><span class="br0">&#41;</span></pre></div></div>
<p>You may notice that we set the <strong>delivery_mode</strong> element of the message&#8217;s properties to “2”. Since the queue and exchange were marked durable, this will ensure the message is sent as persistent (i.e. will survive a reboot of RabbitMQ while it is in transit to the consumer).</p>
<p>The only other thing we need to do (and this needs to be done on both consumer and publisher apps), is close the channel and connection:</p>
<div id="wpshdo_7" class="wp-synhighlighter-outer"><div id="wpshdt_7" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_7"></a><a id="wpshat_7" class="wp-synhighlighter-title" href="#codesyntax_7"  onClick="javascript:wpsh_toggleBlock(7)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_7" onClick="javascript:wpsh_code(7)" title="Show code only"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_7" onClick="javascript:wpsh_print(7)" title="Print code"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="#codesyntax_7" onClick="javascript:wpsh_about(7)" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blogs.digitar.com/jjww/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_7" class="wp-synhighlighter-inner" style="display: block;"><pre class="python" style="font-family:monospace;">chan.<span class="me1">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span>
conn.<span class="me1">close</span><span class="br0">&#40;</span><span class="br0">&#41;</span></pre></div></div>
<p>Pretty simple, no? (Download: <a href="/jjww/code-samples/amqp_publisher.py">amqp_publisher.py</a>)</p>
<h2>Giving it a shot…</h2>
<p>Now we&#8217;ve written our consumer and publisher, so let&#8217;s give it a go. (This assumes you have RabbitMQ <a href="http://www.rabbitmq.com/install.html">installed</a> and running on <strong>localhost</strong>.)</p>
<p>Open up the first terminal, and run <strong>python ./amqp_consumer.py</strong> to get the consumer running and to create your queues, exchanges and bindings.</p>
<p>Then run <strong>python ./amqp_publisher.py &#8220;AMQP rocks.&#8221;</strong> in a second terminal. If everything went well, you should see your message printed by the consumer on the first terminal.</p>
<h2>Taking it all in</h2>
<p>I realize this has been a really fast run through AMQP/RabbitMQ and using it from Python. Hopefully, it will fill in some of the holes of how all the concepts fit together and how they get used in a real Python program. If you find any errors in my write-up, I&#8217;d very much appreciate it if you&#8217;d please let me know (<a href="mailto:williamsjj@digitar.com">williamsjj@digitar.com</a>). Similarly, I&#8217;d be happy to answer any questions that I can. Next up&#8230;.clustering! But I&#8217;ve got to figure it out first. <img src='http://blogs.digitar.com/jjww/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>NB: Special thanks to Barry Pederson and Gordon Sims for correcting my understanding of no_ack&#8217;s operation and for catching syntactically incorrect Python code I missed.</p>
<p>NB: My knowledge on the subject was distilled from these sources, which are excellent further reading:</p>
<ul>
<li><a href="http://">zeromq: Message-oriented Middleware Analysis</a></li>
<li><a href="http://www.rabbitmq.com/releases/rabbitmq-dotnet-client/v1.5.0/rabbitmq-dotnet-client-1.5.0-user-guide.pdf">RabbitMQ .NET Client Library User Guide </a></li>
<li><a href="http://jira.amqp.org/confluence/download/attachments/720900/amqp0-8.pdf?version=1">Advanced Message Queuing Protocol: Protocol Specification Version 0-8</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitar.com/jjww/2009/01/rabbits-and-warrens/feed/</wfw:commentRss>
		<slash:comments>48</slash:comments>
		</item>
		<item>
		<title>Viva la storage.</title>
		<link>http://blogs.digitar.com/jjww/2008/11/viva-la-storage/</link>
		<comments>http://blogs.digitar.com/jjww/2008/11/viva-la-storage/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 12:56:22 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[DigiTar]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Coming soon&#8230;  

[Posted with iBlogger from my iPhone]

]]></description>
			<content:encoded><![CDATA[<p>Coming soon&#8230; <img src='http://blogs.digitar.com/jjww/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<div class="iblogger-footer"><br clear="all"/>
<p style="text-align:right;font-size:10px;">[Posted with <a href="http://illuminex.com/iBlogger/index.html">iBlogger</a> from my iPhone]</p>
<p></div>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitar.com/jjww/2008/11/viva-la-storage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HSPA (AT&amp;T) vs. EV-DO (Verizon)</title>
		<link>http://blogs.digitar.com/jjww/2008/05/hspa-att-vs-ev-do-verizon/</link>
		<comments>http://blogs.digitar.com/jjww/2008/05/hspa-att-vs-ev-do-verizon/#comments</comments>
		<pubDate>Fri, 30 May 2008 21:22:44 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Some folks hate to be offline, and some folks can&#39;t afford to be. I suppose I fit somewhere in between. About a month ago, I realized I was going to be doing some significant traveling&#8230;probably nowhere near a decent WiFi access point. Thus arose the question&#8230;how do you connect back to the office regardless of [...]]]></description>
			<content:encoded><![CDATA[<p>Some folks hate to be offline, and some folks can&#39;t afford to be. I suppose I fit somewhere in between. About a month ago, I realized I was going to be doing some significant traveling&#8230;probably nowhere near a decent WiFi access point. Thus arose the question&#8230;how do you connect back to the office regardless of where your derri&#232;re happens to be? There were only a couple of minor requirements:</p>
<ul>
<li>(Good) National 3G (U.S.A.) coverage</li>
<li>Minimum top end throughput around 1Mb/s</li>
<li>ExpressCard form factor (nothing sexier than a wrist-sized dongle cantilevered off your USB port)</li>
<li>Support for Mac OS X</li>
</ul>
<p>Folks that know me probably are stunned at the last one. As of April 29th I kicked the Dell habit. My regular target of abuse is now a MacBook Pro. But that&#39;s a whole other story&#8230;</p>
<p>Anywho, those req&#39;s really narrowed it down to two players: AT&amp;T and Verizon. Both offer national 3G access at speeds of 1Mb/s or greater. But they take two different approaches to it&#8230;</p>
<p><strong><span style="text-decoration: underline;">HSPA (High Speed Packet Access)</span></strong></p>
<p><a href="http://en.wikipedia.org/wiki/High-Speed_Packet_Access">High Speed Packet Access</a> is really the joining of two different 3G GSM protocols: <a href="http://en.wikipedia.org/wiki/High-Speed_Packet_Access#High_Speed_Downlink_Packet_Access_.28HSDPA.29">HSDPA</a> and <a href="http://en.wikipedia.org/wiki/High-Speed_Packet_Access#High_Speed_Uplink_Packet_Access_.28HSUPA.29">HSUPA</a> (the D and the U are &#8220;downlink&#8221; and &#8220;uplink&#8221; respectively). On AT&amp;T&#39;s network, HSPA should give you average speeds around 1.8 Mb/s down and 800 Kb/s up. My experience has been that this is true across their network&#8230;as long as you can get a 3G signal. In fact, in some areas (LA and San Antonio) it wasn&#39;t uncommon for me to get around 2.2-2.5 Mb/s down. With tower upgrades coming early next year, the downlink speed should boost further to about 7.2 Mb/s. Overall, pretty darn good for no leash. Factor in the fact that HSPA is a 3G GSM standard widely deployed across Europe/Japan and suddenly you&#39;ve got a great data solution worldwide (an issue given some upcoming trips). Oh, I forgot to mention&#8230;some places in Europe have already deployed 14.4Mb/s HSDPA (HSUPA deployment is somewhat spottier).</p>
<p>Compared to EV-DO, HSPA also has some design advantages. For example, both EV-DO and HSPA time slice transmission to connected clients, but HSPA can transmit to 10 clients in single time slice, whereas EV-DO can only transmit to one client per time slice. Also, HSPA towers possess the capability to figure out which clients have the best signal quality and will transfer bandwidth capacity from clients who can&#39;t use it (bad signal) to clients that can (excellent signal). Of course, even with all of its advantages, the HSPA network is being run by AT&amp;T&#8230;and they could screw up implementation of a PB&amp;J sandwich&#8230;</p>
<p><strong><span style="text-decoration: underline;">EV-DO (EVolution &#8211; Data Optimized)</span></strong></p>
<p>Like HSPA, <a href="http://en.wikipedia.org/wiki/Evolution-Data_Optimized">EV-DO</a> is a CDMA-based 3G protocol. Unlike HSPA however, it is not a GSM body standard and is instead the successor to CDMA2000. So, outside of the U.S.A, Korea, areas of Japan and piroshki stands in the former Soviet-bloc you&#39;re pretty much out of luck for access. However, it does provide 1Mb/s speeds regularly. Upload speeds are in the 200-500 Kb/s range.</p>
<p>With that brief understanding, I motored down to the Verizon and AT&amp;T stores and picked up service with both companies (AT&amp;T and Verizon have 30-day refund and new service cancellation policies).</p>
<p><span style="font-weight: bold; text-decoration: underline;">Behind door number 1&#8230;</span></p>
<p>For a couple of years now, I&#39;ve heard phenomenal things about <a href="http://b2b.vzw.com/productsservices/wirelessinternet/">Verizon&#39;s BroadbandAccess</a> (EV-DO) service. People seemed to rave about it&#39;s coverage and reliability&#8230;and they&#39;re right. Verizon&#39;s biggest plus is it&#39;s consistency. It may not be as fast or have as low latency when AT&amp;T is on the ball, but they&#39;ll deliver the same service levels every time you power up. I don&#39;t care if I was in Boise, LA, or San Antonio, Verizon delivered 800-1000 Kb/s throughput and 230ms latency like clockwork. Sometimes it was a bit better or a bit worse, but only by about 10% (exception was the trip up the coast to Malibu where Verizon dropped down to 2.5G service and AT&amp;T was nowhere to be seen).</p>
<p>The other nice thing about Verizon is the <a href="http://www.evdoinfo.com/content/view/1919/64/">Novatel V740 ExpressCard</a>. It has excellent support in OS X. Pop it in and OS X&#39;s built-in WWAN manager configures the card, activates it with Verizon and away you go. No special software to install. You even get a nice little signal strength meter on the task bar (yeah&#8230;yeah&#8230;taskbar&#8230;Windows habits die hard <img src='http://blogs.digitar.com/jjww/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ).</p>
<p><strong><span style="text-decoration: underline;">The gal you really wanna take home to Mom&#8230;</span></strong></p>
<p>I wanted AT&amp;T to be the best&#8230;honest. I&#39;m a current AT&amp;T Wireless voice customer and love the phones, the stores and the service. However, 3G service with AT&amp;T lacks Verizon&#39;s consistency. Initially, 3G coverage could be hit and miss when I started 4 weeks ago. However, their big push for blanket 3G coverage in advance of the 3G iPhone launch has improved the 3G network dramatically in the last week. Although the coverage is spot on now, the service level is not in terms of latency. Throughput however is phenomenal. 1500-1800 Kb/s downlink speeds over 90% of the time, with solid 2200-2500 Kb/s in areas with the latest tower gear. So for the majority of applications, <a href="http://www.wireless.att.com/businesscenter/solutions/wireless-laptop/overview.jsp">AT&amp;T LaptopConnect</a> is a superior solution to Verizon. But&#8230;not for me.</p>
<p>Quite a bit of the remote work I do involves either SSH or Windows Remote Desktop over VPN. There&#39;s few things more annoying than mistyping a command and waiting for the refresh to catch up so you can go correct it. As a result, better latency means a happier camper &#39;round these parts. That&#39;s not to say that AT&amp;T&#39;s latency is awful. In fact, it&#39;s better than Verizon about 80% of the time when you measure it. So why am I complaining about it? Well, 150ms latency is only good if it <span style="font-weight: bold; font-style: italic;">stays</span> at 150ms. AT&amp;T&#39;s deployment of HSPA causes latency spikes regularly, particularly under load. As a result, I started doing an combo test on both services&#8230;load a YouTube video and concurrently check the ping over a VPN tunnel. If you try it, you&#39;ll see both Verizon and AT&amp;T&#39;s latency spike dramatically. Hmm..you&#39;re probably thinking, &#8220;so AT&amp;T is better than Verizon both with and without heavy load&#8230;why won&#39;t you say its better?&#8221;. Because, it doesn&#39;t feel faster. It was really hard to put a metric on this, because while the measurements were better on AT&amp;T, the lag while typing on an SSH connection always felt a little (to a lot) bit slower. In fact, I kept reminding myself that this had to be in my head, because the ping measurements were better than Verizon. Then while in San Antonio I tried using Skype.</p>
<p>San Antonio expectedly has the best coverage of any AT&amp;T area I&#39;ve been in. Consistent throughput above 2200 Kb/s and latency below 150ms. So imagine my surprise when my SSH sessions seemed laggy, and the Skype calls would start great and then break down within about 3-4 minutes. You could hear the person on the other end of the call fine, but they started having issues hearing me and my video would lock up for them. If you turn the video off it&#39;d buy you another 4-5 minutes before the call went haywire. So back in went the Verizon card. Bang. Perfect SSH sessions. Crystal clear call quality on Skype&#8230;and the folks on the other end said not only was the video smooth but the quality of the picture was better (Skype must adjust video quality based on connection quality). A 45-minute Skype call completed with no audio or video issues on Verizon.</p>
<p>I tried the Skype exercise about 3-4 times over a 48-hour period with the same results. Every time I&#39;d give AT&amp;T a shot, and every time I&#39;d have to drop in the Verizon card to complete a decent conversation. This bodes not well for the rumor that the 3G iPhone will take advantage of HSUPA for video conferencing. On the positive side, those consistent 2200 Kb/s AT&amp;T downlink speeds meant I was able to suck down the OS X 10.5.3 system update (420MB) in about 30 minutes (~1500 Kb/s sustained average).</p>
<p>The other major issue with AT&amp;T is the <a href="http://www.wireless.att.com/cell-phone-service/cell-phone-details/?device=Option+GT+Ultra+Express&amp;q_sku=sku1190105">Option GT Ultra Express</a> card. On the positive side, it supports HSUPA so you can take advantage of fast uplink speeds. Unfortunately, it isn&#39;t supported natively by the OS X WWAN subsystem (unlike it&#39;s unavailable predecessor, the Option GT 3.6 Express which is natively supported). So you have to install <a href="http://support.option.com/att/">Option&#39;s GlobeTrotter software</a>, which isn&#39;t a slick as the native support and frankly feels poorly built. A lot of folks on the Apple and AT&amp;T forums have also complained about GlobeTrotter frequently crashing for them. To some degree I suspect the inconsistent performance I get from AT&amp;T (despite the metrics) might be due to GlobeTrotter. There&#39;s also <a href="http://www.novamedia.de/e_pages/e_produkte_mac_l2n.html">Launch2Net</a> by NovaMedia, which provides 3rd party drivers for the GT Ultra Express. Still not native, and amazingly Launch2Net axes the native WWAN utilities that the Verizon card leverages (Launch2Net got uninstalled faster than Vista on a 286). Supposedly, OS X 10.5.3 was going to include native support for the GT Ultra Express, but as of 10.5.3&#39;s release yesterday&#8230;no dice.</p>
<p>Lastly, there&#39;s price. Both AT&amp;T and Verizon charge $60/month. However, AT&amp;T&#39;s service is unlimited where Verizon&#39;s service is 5GB/month (and $0.49/MB over that).</p>
<p><span style="font-weight: bold; text-decoration: underline;">End of the road&#8230;</span></p>
<p>So where does that leave us? If you need reliable latency and pretty darn good speed, Verizon is your best bet in my opinion. On the other hand, if the majority of your remote work involves the web, e-mail or anything else that&#39;s not latency sensitive, AT&amp;T is far superior and will allow global roaming. Frankly, I&#39;m kind of anxious to hear from someone who has the GT Ultra Express on a Windows machine to find out if the inconsistent performance I experienced was specific to GlobeTrotter for Mac. Personally, I&#39;m going to keep both services. There were a handful of times that Verizon&#39;s latency was abysmal, but AT&amp;T&#39;s was great. Enough that I realized in an emergency I&#39;d really need to have the option of either service.</p>
<p>Here&#39;s hoping AT&amp;T&#39;s 3G latency improves&#8230;and that Apple gets with the program and includes native support for the Option GT Ultra Express&#8230;the 3G ExpressCard of choice for Apple&#39;s carrier of choice. Sorry that this post blathered on a bit long. I hope this saves other folks from having to do this much evaluation legwork.</p>
<p>(Here is the XLS sheet with observed metrics for both services: <a href="http://blogs.digitar.com/media/2/20080530-AT&amp;T%20vs.%20Verizon%20Benchmarks.xls">AT&amp;T vs. Verizon Benchmarks</a> )</p>
<div class="posttagsblock"><a href="http://technorati.com/tag/AT&amp;T%20Wireless" rel="tag">AT&amp;T Wireless</a>, <a href="http://technorati.com/tag/BroadbandConnect" rel="tag">BroadbandConnect</a>, <a href="http://technorati.com/tag/DigiTar" rel="tag">DigiTar</a>, <a href="http://technorati.com/tag/EVDO" rel="tag">EVDO</a>, <a href="http://technorati.com/tag/HSDPA" rel="tag">HSDPA</a>, <a href="http://technorati.com/tag/HSPA" rel="tag">HSPA</a>, <a href="http://technorati.com/tag/HSUPA" rel="tag">HSUPA</a>, <a href="http://technorati.com/tag/LaptopConnect" rel="tag">LaptopConnect</a>, <a href="http://technorati.com/tag/Verizon%20Wireless" rel="tag">Verizon Wireless</a></div>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitar.com/jjww/2008/05/hspa-att-vs-ev-do-verizon/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Remember the Alamo&#8230;</title>
		<link>http://blogs.digitar.com/jjww/2008/05/remember-the-alamo/</link>
		<comments>http://blogs.digitar.com/jjww/2008/05/remember-the-alamo/#comments</comments>
		<pubDate>Thu, 29 May 2008 03:54:16 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[DigiTar]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Tomorrow (05/28/2008) I&#39;m giving a talk on moving to open storage (i.e. ethernet, OpenSolaris and SATA&#8230;in no particular order) at the Diocesan Information Systems Conference in San Antonio. It&#39;s a closed event, but here are the slides from the talk&#8230;including the talking notes which cover a lot more than I&#39;ll probably have time for:
PDF
Slideshare
DigiTar, DISC, [...]]]></description>
			<content:encoded><![CDATA[<p>Tomorrow (05/28/2008) I&#39;m giving a talk on moving to open storage (i.e. ethernet, OpenSolaris and SATA&#8230;in no particular order) at the <a href="http://www.discinfo.org/index.html">Diocesan Information Systems Conference</a> in San Antonio. It&#39;s a closed event, but here are the slides from the talk&#8230;including the talking notes which cover a lot more than I&#39;ll probably have time for:</p>
<p><a href="http://blogs.digitar.com/media/2/Ditching%20Fibre%20Channel%20and%20SCSI%20-%20Slides%20&amp;%20Notes.pdf" title="PDF">PDF</a><br />
<a href="http://tinyurl.com/69ewhm" title="Slideshare">Slideshare</a></p>
<div class="posttagsblock"><a href="http://technorati.com/tag/DigiTar" rel="tag">DigiTar</a>, <a href="http://technorati.com/tag/DISC" rel="tag">DISC</a>, <a href="http://technorati.com/tag/OpenSolaris" rel="tag">OpenSolaris</a>, <a href="http://technorati.com/tag/Solaris" rel="tag">Solaris</a></div>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitar.com/jjww/2008/05/remember-the-alamo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pretty on the inside&#8230;working with the UI on the AX2200.</title>
		<link>http://blogs.digitar.com/jjww/2008/04/pretty-on-the-inside-working-with-the-ui-on-the-ax2200/</link>
		<comments>http://blogs.digitar.com/jjww/2008/04/pretty-on-the-inside-working-with-the-ui-on-the-ax2200/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 02:27:05 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[It&#39;s nice when you boot an appliance and&#160;the web user interface doesn&#39;t look like it was designed by a guy who thought Jurassic Park and&#160;The Net&#160;were the pinnacle of UI design. The A10 Advanced Core OS (ACOS) has an incredibly polished look to the WebUI. Frankly, its beautiful. All chrome and glass so to speak&#8230;
&#160;
Overall,&#160;the [...]]]></description>
			<content:encoded><![CDATA[<p>It&#39;s nice when you boot an appliance and&nbsp;the web user interface doesn&#39;t look like it was designed by a guy who thought Jurassic Park and&nbsp;The Net&nbsp;were the pinnacle of UI design. The A10 Advanced Core OS (ACOS) has an incredibly polished look to the WebUI. Frankly, its beautiful. All chrome and glass so to speak&#8230;</p>
<p><a href="http://blogs.digitar.com/media/2/AX2200_unbox_pics/ACOS_WebUI_Summary.jpg" rel="lightbox[61]"><img border="0" src="http://blogs.digitar.com/media/2/AX2200_unbox_pics/ACOS_WebUI_Summary.jpg" width="246" height="303" /></a>&nbsp;</p>
<p>Overall,&nbsp;the Web UI&nbsp;is very easy to navigate and options are not buried more than 2 clicks deep. However, there are two areas where the ACOS Web UI is absolutely a pain in the rear:</p>
<ul>
<li> Grid-metaphor editing.</li>
<li> Heinous layout for the relationship between physical interfaces, VLANs and virtual interfaces.</li>
</ul>
<p><strong><u>Grid Editing</u></strong>&nbsp;</p>
<p>One of the most common day-to-day tasks we end up doing with a load balancer is enabling/disabling a batch of real servers for upgrade. Generally, we want to:</p>
<ol>
<li> Disable real servers A, C, and E. (Leaving B &amp; D enabled).</li>
<li> Upgrade A, C, and E.</li>
<li> Swap A, C, and E back into battery and take B &amp; D out.</li>
<li> Upgrade B &amp; D.</li>
<li> Put B &amp; D back in.</li>
</ol>
<p>This is a perfect application where you want to be able to pull up the settings for multiple entries&nbsp;in one edit table. With the settings for real servers A,B,C,D, and E up on the same page, you can change all of the applicable settings all at the same time, verify each server&nbsp;is correct, then bam!&#8230;slam the new settings into place all at once. Unfortunately, this is not possible with the ACOS Web UI. The only thing you can do to multiple entries at once is delete them:</p>
<p><a href="http://blogs.digitar.com/media/2/AX2200_unbox_pics/ACOS_GridView.jpg" rel="lightbox[61]"><img border="0" src="http://blogs.digitar.com/media/2/AX2200_unbox_pics/ACOS_GridView.jpg" width="246" height="303" /></a>&nbsp;</p>
<p>But simple maintenance of real server status is not the only place with the table&nbsp;editing&nbsp;metaphor is helpful. It is indispensable when trying to balance which VLANs are on which physical ports. Having to drill into an entry, make the change, and then re-examine the grid view to see how it looks is very tedious. It&#39;s much easier to pull up&nbsp;all the necessary interface/VLAN assignments on one view, edit them in-place and then apply them with a single-click once they look right. It seems that the goal of any good Web UI&nbsp;should be &nbsp;to minimize round trips and enable batch application as much as possible. This was an area where the Nauticus/Sun Web UI was phenomenal. Any grid view could be turned into an edit table. On the other hand, if you only selected one entry to edit, the Nauticus Web UI was smart enough to reformat the one entry into a single column of editable values (so it fit horizontally&nbsp;without scrolling). Quickly swapping batches of real servers in and out of service is not a task&nbsp;we&#39;re looking forward to with the AX2200.</p>
<p><strong><u>Network Relationships &amp; Just Being Friendly</u></strong>&nbsp;</p>
<p>This is&nbsp;not an uncommon metaphor for dealing with VLANs and the IP interfaces that sit on them:</p>
<ul>
<li> VLANs entries belong to physical interfaces.</li>
<li> Virtual IP interfaces are created and belong to specific VLANs entries.</li>
</ul>
<p>To A10s credit, it&#39;s a familiar metaphor that is instantly accessible, and they even kept the ve0, ve1 virtual interface naming convention that&#39;s&nbsp;common to Cisco and Foundry equipment. Where they went wrong is not making it easy to tag a friendly name onto the VLAN and virtual interface entries.</p>
<p>What&#39;s the purpose of VLAN 1234? Well it&#39;s attached virtual interface ve0&#8230;that&#39;s helpful. What on God&#39;s Green Earth does ve0 serve? You can&#39;t tell easily from the VLAN page. You either have to dig out your documentation, or open the virtual interface list in a separate window:</p>
<p><a href="http://blogs.digitar.com/media/2/AX2200_unbox_pics/ACOS_VLANs_GridView.jpg" rel="lightbox[61]"><img border="0" src="http://blogs.digitar.com/media/2/AX2200_unbox_pics/ACOS_VLANs_GridView.jpg" width="246" height="303" /></a>&nbsp;</p>
<p>The simple solution on Foundry and Nauticus/Sun gear was what you could call &#8220;friendly names&#8221;: A simple user description for each VLAN, interface and virtual interface. Can&#39;t remember what VLAN 1234 does&#8230;no problem&#8230;it&#39;s friendly name says &#8220;tier1_realservers&#8221;. Oh! That&#39;s right, VLAN 1234 contains the application servers for tier 1 of our application and ve0 is the virtual interface that serves that subnet. Toggling back and forth between tabs in Firefox for VLANs and virtual interfaces while setting up the test AX2200 has been a barrel of monkeys. Frankly, &#8220;friendly&#8221; or &#8220;vanity&#8221; names should be able to be attached to any type of entry whether it&#39;s a real server, a physical interface, or an SSL certificate.</p>
<p><strong><u>Other nits so far:</u></strong>&nbsp;</p>
<ul>
<li> Appliance will not boot if hard drives are not in exactly the same slots as shipped (not expected for a RAID-1 setup).</li>
<li> Can&#39;t find a&nbsp;mechanism in&nbsp;the Web UI&nbsp;to generate a CSR.</li>
<li> Can&#39;t find a way to import a PEM file (Must import certificate and key file separately.)</li>
<li> There doesn&#39;t appear to be a way to load certificates and keys by pasting them into a text box.</li>
<li> Host name is not notated at the top of the GUI and in the page title at all times to help identify which box you&#39;re in.</li>
<li> Virtual interfaces that are already in use still show up in the VLAN creation screen as assignable. Only when &#8220;Apply&#8221; is clicked does a JavaScript alert box tell you there&#39;s an issue.</li>
<li> Physical front panel status light only blinks when there&#39;s a problem. Does not turn amber or red. Very unnoticeable if you don&#39;t already know there&#39;s an issue.</li>
<li> Showing system interfaces via the CLI&nbsp;is &#8220;sh int&#8221; instead of &#8220;sh sys int&#8221; on Foundry gear.</li>
</ul>
<p>The last one is not something normally you&#39;d complain about. All networking vendors seem to do it differently. However, given the fact that A10 is staffed with so many ex-Foundry Networks folks, and the fact that the ACOS CLI is identical to Ironware in so many areas, it&#39;s an unwelcome surprise when &#8220;sh sys int&#8221; errors out while you&#39;re in the CLI.</p>
<p>Needless to say, we&#39;re still talking about the AX2200, so we&#39;re fairly happy with what we&#39;ve seen so far. However, &#8220;friendly naming&#8221; and&nbsp;table editing &nbsp;really need to be fixed in an upcoming version of ACOS. The current way of doing things is probably only acceptable in very small environments where the boxes don&#39;t get touched very much. This weekend is dedicated to SLB testing&#8230;so hopefully more advanced configuration is where the Web UI really comes together.</p>
<p>That&#39;s all that&#39;s fit to print as they say.</p>
<p><!-- technorati tags start -->
<p style="text-align:right;font-size:10px;">Technorati Tags: <a href="http://www.technorati.com/tag/A10 Networks" rel="tag">A10 Networks</a>, <a href="http://www.technorati.com/tag/ACOS" rel="tag">ACOS</a>, <a href="http://www.technorati.com/tag/AX2200" rel="tag">AX2200</a>, <a href="http://www.technorati.com/tag/DigiTar" rel="tag">DigiTar</a>, <a href="http://www.technorati.com/tag/Sun" rel="tag">Sun</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitar.com/jjww/2008/04/pretty-on-the-inside-working-with-the-ui-on-the-ax2200/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lost in wonderland again&#8230;unboxing the AX2200</title>
		<link>http://blogs.digitar.com/jjww/2008/04/lost-in-wonderland-again-unboxing-the-ax2200/</link>
		<comments>http://blogs.digitar.com/jjww/2008/04/lost-in-wonderland-again-unboxing-the-ax2200/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 19:47:07 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[It&#39;s been nearly two years since we&#160;ventured into the wonderland of&#160;replacing our Alteon gear with the Sun N1216. It was a big risk because load balancers are interlaced tightly with our multi-phased mail logistics architecture. To say the least, we have not been disappointed. The Sun N1216 series is by far the best load balancer [...]]]></description>
			<content:encoded><![CDATA[<p>It&#39;s been nearly two years since we&nbsp;ventured into the wonderland of&nbsp;replacing our Alteon gear with the <a href="http://www.sun.com/products/networking/switches/n1000/">Sun N1216</a>. It was a big risk because load balancers are interlaced tightly with our multi-phased mail logistics architecture. To say the least, we have not been disappointed. The Sun N1216 series is by far the best load balancer we&#39;ve ever worked with. Almost limitless power (~3Gbps) for a $25K list price. (Its big brother the <a href="http://www.sun.com/products/networking/switches/n2000/">N2120</a> was the <a href="http://en.wikipedia.org/wiki/Bugatti_Veyron">Bugatti Veyron</a> of the load balancer world.) But more than power, the N series provides&nbsp;an incredibly elegant and powerful virtualization&nbsp;that is irreplaceable. It enabled us to reduce what were&nbsp;multiple pairs of <a href="http://en.wikipedia.org/wiki/Alteon">Alteons</a> down to a single pair of N1216s running multiple virtual load balancer instances.</p>
<p>But what blew us away was a very simple feature we&#39;ll call &#8220;assignable virtual IP address (VIP)&#8221;. Assignable VIP functionality allows you to create two virtual load balancers (internal and external) with no routing in common, and attach your real servers to one (internal), while advertising the VIP on the other (external). Because there is no routing path between them (all traffic hitting the VIP is essentially memory copied to the internal load balancer for SLB processing), no servers sitting in your DMZ can compromise or talk directly to your real servers. They simply can&#39;t talk to something that there&#39;s no routing path to. As a result, you have a separate clean management path to your real servers that is entirely inside your trusted network, and incredibly simplifies your topology (no ACLs!). It is by far the best application of virtualization in a network device we&#39;ve ever seen. However, the halcyon days came to an end in April of 2007 when we were informed that Sun intended to EOL the entire N series and shutdown the load balancing&nbsp;group they had acquired with Nauticus. Given that there were no other products on the market in April of 2007 that could even remotely drop seamlessly into our new topology, we decided&nbsp; to wait and see what Sun might do next.</p>
<p>A year later not&nbsp;much has changed, and Sun still doesn&#39;t have a coherent strategy on load balancing to replace the N series. While our units would continue to be supported for the next 5 years, there won&#39;t be&nbsp;software updates, and definitely no updates to the phenomenal FPGAs that make the box scream.&nbsp;There are flaws in the N series that need bug updates&#8230;things that would be livable if they were going to be fixed. But in a production environment&nbsp;no bug fixes is&nbsp;simply not an acceptable strategy. So we&#39;re back in wonderland&#8230;</p>
<p>To cut to the chase, we talked with all the major vendors and settled down to <a href="http://www.f5.com/products/big-ip/">F5</a>, <a href="http://citrix.com/English/ps2/products/product.asp?contentID=21679&amp;ntref=hp_nav_US">Citrix/NetScaler</a>, and <a href="http://www.cisco.com/en/US/products/ps8361/index.html">Cisco</a>. Only Cisco, with their ACE platform, has any virtualization story whatsoever. Everyone else has no virtualization plans that they&#39;re telling their sales dudes about. All 3 can cobble together an inelegant and obfuscated configuration to allow us to maintain our topology and security stance, but none can do the &#8220;assignable VIP&#8221; magic that made Sun/Nauticus such an amazing application of virtualization and so clean to administer.</p>
<p>In the middle of all this, a trusted friend at Sun recommended we take a look at a new load balancing company, <a href="http://www.a10networks.com/products/axseries.html">A10 Networks</a>. Now A10 doesn&#39;t have virtualization in their platform today, and they definitely don&#39;t have &#8220;assignable VIP&#8221;. But they have a story and roadmap that will make any Sun/Nauticus customer get a big silly grin on their face. You&#39;ll have to talk to A10 to find out the particulars. <img src='http://blogs.digitar.com/jjww/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> &nbsp;</p>
<p>What does A10 have? A phenomenal architecture on paper, and sane licensing.&nbsp;While FPGAs are what made the Nauticus design scream, being entirely FPGA and ASIC&nbsp;driven was also what drove the cost of bug fixes up. It was difficult for them to add L4/L7 features at the same rate that F5 and others were, because it usually required a modification of the FPGA layout. Enter what appears to be a brilliant design compromise and excellent capitalization on the Intel/AMD race for core count. The A10 AX2200 and above have L2/L3 ASICs, SSL ASICs, &nbsp;and a L4/L7 traffic director FPGA. The FPGA dynamically assigns new connections to each of the box&#39;s&nbsp;4-8 Xeon cores for full L4/L7 processing. Also, each core operates independently from the others. That is to say, there is no contention or synchronization penalties for using more cores. Add more connections and the traffic&nbsp;FPGA evenly distributes them among the cores, and stitches the results back together for the client. Near perfect parallelization. All of the heavy L4/L7 lifting is done entirely in software on generic Xeon cores. This allows A10 to quickly add the complex features (like F5)&nbsp;that would have required an FPGA modification on the Nauticus gear. The excellent parallelization model ensures the performance hit encountered by using generic CPUs instead of FPGAs can be made up for linearly by adding buckets of cores. The FPGA is therefore much simpler in design than what Nauticus required. But as I said, this is all on paper.</p>
<p>However, it is an equally seductive&nbsp;design to what Nauticus created. F5, NetScaler and Cisco all have L2/L3 ASICs in their boxes but nothing really significant in terms of hardware acceleration in the L4/L7 areas (F5 does have their L4 ASIC that does provide good acceleration of basic L4 TCP termination load balancing). So we&#39;ve decided to&nbsp;leap again&nbsp;and take a chance with A10. Also, A10 includes&nbsp;Global Server Load Balancing for free and does not engage in F5&#39;s hideous practice of licensing HTTP compression and SSL offload capacity&nbsp;by the MB/s&#8230;oh and A10 has TCL-based aRules. <img src='http://blogs.digitar.com/jjww/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>So we eagerly awaited the FedEx guy on Thursday to deliver our new pair of AX2200s for validation testing. With a 100lb thump they landed solidly on our testing table, and a couple flicks of a box cutter later&#8230;</p>
<p><a href="http://blogs.digitar.com/media/2/AX2200_unbox_pics/AX2200Front(Close-up).jpg" border="0" rel="lightbox[60]"><img src="http://blogs.digitar.com/media/2/AX2200_unbox_pics/AX2200Front(Close-up).jpg" width="400" height="300" /></a><br /> A10 Networks AX2200 &#8211; Front Panel</p>
<p>What came out of the box looked like the unholy progeny of a <a href="http://en.wikipedia.org/wiki/Sega_Master_System">Sega Master System</a> and the portholes from a <a href="http://en.wikipedia.org/wiki/Image:1950_Buick_Roadmaster_Estate_Wagon.jpg" rel="lightbox[60]">Buick Roadmaster</a>. Needless to say she ain&#39;t a looker. Frankly, at this price level the gear should&nbsp;be drop-dead sexy. Yes, it may be shallow, but its a requirement when you&#39;re trying to justify an $80 grand list price. To add insult to injury, the portholes don&#39;t serve any utilitarian purpose like cooling&#8230;they&#39;re actually a solid piece of plastic. As a counter example, the N2120 and Sun&#39;s standard 2U server design are phenomenal:</p>
<p><a href="http://blogs.digitar.com/media/2/AX2200_unbox_pics/N2120-T5220(Close-up).jpg" rel="lightbox[60]"><img border="0" src="http://blogs.digitar.com/media/2/AX2200_unbox_pics/N2120-T5220(Close-up).jpg" width="400" height="300" /></a><br /> Sun N2120 &amp; Sun 2U Server &#8211; Front Panel</p>
<p>They exude the&nbsp;simplicity and power that&#39;s concealed inside&#8230;a little glimpse to the upper echelons of what you&#39;re spending the company&#39;s hard earned bananas on. But what the AX2200 gets right is spot on build quality. It&#39;s solid with no rattles. The power supplies slide smoothly and easily. Re-seating a supply gives a firm click and solidly locks them from removal. Overall, it&#39;s downright Teutonic in construction. Sort of like an older <a href="http://en.wikipedia.org/wiki/Audi_S8">Audi S8</a>, built to run forever like greased lightning, but not much to look at.&nbsp;A10 could take Audi&#39;s cue and start paying attention to <a href="http://en.wikipedia.org/wiki/Audi_R8">creating&nbsp;looks&nbsp;that match the engineering</a>.</p>
<p><a href="http://blogs.digitar.com/media/2/AX2200_unbox_pics/AX2200Back(Close-up).jpg" rel="lightbox[60]"><img border="0" src="http://blogs.digitar.com/media/2/AX2200_unbox_pics/AX2200Back(Close-up).jpg" width="400" height="300" /></a><br /> A10 Networks AX2200 &#8211; Back Panel</p>
<p>One very nice feature of the AX2200 for a&nbsp;load balancer&nbsp;is the&nbsp;hot swap&nbsp;fan tray. Not having to spirit the whole unit back to Boston because a fan went South is a nice change from the N1216. Also, the interior build quality is just as clean and professional as the exterior components. Hard edge connectors and system board tracings are used almost entirely, with nearly no ribbon cables cluttering up the interior. Only nit is the front management NIC is run to the motherboard via an RJ-45 cable routed to the back. Don&#39;t let the server exterior of this box fool you, this is a purpose built&nbsp;system with specialized ASICs and FPGAs inside.</p>
<p><a href="http://blogs.digitar.com/media/2/AX2200_unbox_pics/AX2200-N2120-T5220(SideView).jpg" rel="lightbox[60]"><img border="0" src="http://blogs.digitar.com/media/2/AX2200_unbox_pics/AX2200-N2120-T5220(SideView).jpg" width="400" height="300" /></a><br /> A10 Networks AX2200 &amp; Sun N2120 &#8211; Side View</p>
<p>As with any new appliance, this one has a couple of strange design foibles that go deeper than its looks. First, the box vents in from the sides and exhausts out the back. In that regard, its neither quite&nbsp;at home in a rack with your servers or with your switching and routing gear. The strange intake flow means if you rack the AX2200 above your side-to-side vented switching gear, you&#39;ll likely overheat the AX2200 as it sucks in the switches&#39; side exhaust air. Luckily, we have some Juniper kit that vents front to back, so we will likely rack the AX2200s with them. Also, the locking drive carriers are a bit frustrating. It&#39;s a nice feature that they can be locked, but inserting the key with any more force than a gnat breaking wind pops out the removal handle. It&#39;s obviously an off-the-shelf carrier that no&nbsp;designer actually tried before&nbsp;spec&#39;ing it out of the part book.</p>
<p><a href="http://blogs.digitar.com/media/2/AX2200_unbox_pics/AX2200Front-No%20Bezel(Close-up).jpg" rel="lightbox[60]"><img border="0" src="http://blogs.digitar.com/media/2/AX2200_unbox_pics/AX2200Front-No%20Bezel(Close-up).jpg" width="400" height="300" /></a><br /> A10 Networks AX2200 &#8211; Front Panel No Bezel</p>
<p>On the positive side, the serial connection is on the front and is a Cisco-style RJ-45. Yippeee! No RS-232-to-rollover adapters to hook it into our Dominion SX! It may seem like a small thing, but it really means fewer parts to lose, break and stock at the data center. I wish I could say they had the foresight to also put a sticker on the front with the box&#39;s serial number&#8230;but unfortunately not so much. <strike>You&#39;d better note the serial number before you rack the AX2200, otherwise its going to be crane and strain time to see the sticker on the bottom of the unit.</strike> Scratch that&#8230;the serial number is conveniently placed on the rear left of the unit as well. It&#39;s not as easy to see as the front given the Also, they did show the company&#39;s Foundry Networks pedigree by shipping a very Foundry Networks-esque self-test sheet with the unit:</p>
<p><a href="http://blogs.digitar.com/media/2/AX2200_unbox_pics/Self-TestShippingPaper.jpg" rel="lightbox[60]"><img border="0" src="http://blogs.digitar.com/media/2/AX2200_unbox_pics/Self-TestShippingPaper.jpg" width="400" height="300" /></a><a><br /> AX2200 Self-Test Slip </a>&nbsp;</p>
<p>Kudos for the self-test paperwork. If you keep that on file, you can probably forgive the serial number sticker&#39;s&nbsp;ill fated position&nbsp;on the unit&#39;s underside.</p>
<p>Overall, first impressions&#8230;the construction and major design decisions are terrific. This box looks the part internally, and feels the part&nbsp;externally as a major piece of core infrastructure. Next step is to rack her and beat the heck out of her with our test rig: a screaming UltraSPARC T2. <img src='http://blogs.digitar.com/jjww/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  WIll post more soon on how the AX2200 stands the scorching&#8230;</p>
<p><!-- technorati tags start -->
<p style="text-align:right;font-size:10px;">Technorati Tags: <a href="http://www.technorati.com/tag/A10 Networks" rel="tag">A10 Networks</a>, <a href="http://www.technorati.com/tag/ACOS" rel="tag">ACOS</a>, <a href="http://www.technorati.com/tag/AX2200" rel="tag">AX2200</a>, <a href="http://www.technorati.com/tag/Sun" rel="tag">Sun</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitar.com/jjww/2008/04/lost-in-wonderland-again-unboxing-the-ax2200/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SunFish Chum&#8230;er&#8230;Odds and ends.</title>
		<link>http://blogs.digitar.com/jjww/2006/08/sunfish-chum-er-odds-and-ends/</link>
		<comments>http://blogs.digitar.com/jjww/2006/08/sunfish-chum-er-odds-and-ends/#comments</comments>
		<pubDate>Tue, 15 Aug 2006 23:44:19 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[DigiTar]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Currently, we&#39;re putting the N1400Vs into production and there were two odds and ends that came to mind that I wanted to mention:

No client/server settings per port! Hooray! The Alteons (even the 2424s) inherited from the Alteon AD4s and 184s the need to enable client and/or server processing per port. For those who are not [...]]]></description>
			<content:encoded><![CDATA[<p>Currently, we&#39;re putting the N1400Vs into production and there were two odds and ends that came to mind that I wanted to mention:</p>
<ol>
<li><strong>No client/server settings per port!</strong> Hooray! The Alteons (even the 2424s) inherited from the Alteon AD4s and 184s the need to enable client and/or server processing per port. For those who are not familiar, server load balancing basically can be reduced into two operations:</li>
<ul>
<li><strong>Client processing: </strong>When a packet comes in from a web browser to the web switch, its header has a TO fieldthat&#39;s the IP address of the web switch, and a FROM fieldthat&#39;s the IP address of the web browser. Once the web switch gets the packet and decides which back-end server to send it to, it has to replace the packet&#39;s TOwith the IP address of the back-end server. If the web switch didn&#39;t change the TOand simply sent the packet on, the server would ignore the packet. Sort<br />
of like receiving a letter addressed to somebody you don&#39;t know. So in a nutshell, server processing is simply replacing the web switch&#39;s IP address with the selected back-endserver&#39;s IP address in packets from the client.</li>
<li><strong>Server processing:</strong> When the back-end server decides to send a response packet back to the client, the reverse of server processing has to occur. If the web switch were to simply send the packet from the server back to the client without client processing, the client would ignore the packet. Why? Well, the client sent the packet to the IP address of the web switch and expects a reply from that IP address, not the server&#39;s IP. It sort of like sending a letter to Aunt Gertie, but getting the reply<br />
from Aunt Gertie&#39;s nurse Josie. You don&#39;t know who Josie is, so you toss the reply thinking its junk mail. Client processing fixes this by rewriting the FROM in the server&#39;s reply to the IP address of the web switch.</li>
<li>An Alteon is a bit unusual in that instead of one massive SLB processor it has 8&#8230;one per port (this is fixed in the 2424s, but they imitate the older behavior for backward compatibility). So if you have one port connected to your servers and a second port connected to the Internet, you have to enable Client processing on the Internet-facing port and Server processing on the server-facing port. The reason is that the 8 individual processors aren&#39;t bulky enough to do BOTH the client and server processing. As<br />
a result, the operation gets split between ports in a way you specify. So you have to remember which kind of processingis which, and set it appropriately on the right ports. This is a MAJOR pain in the butt. If you get client and server processing confused and set a port to the wrong one, load balancing just isn&#39;t gonna work for you today.</li>
<li>The SunFish don&#39;t have this limitation. They just make it work. Concentrate on creating your VIPs and RIPs and the rest is taken care of for you. Its really a spectacular change for us! It was so easy, that it wasn&#39;t until I was driving home that it struck me I hadn&#39;t had to fool with client or server processing at all.</li>
</ul>
<li><strong>XML-over-HTTP!</strong> As I was complaining about the lack of a heads-up-display on the SunFish, I ran into a very cool feature!On most of the pages that list settings or statistics in the SunFish WebUI, there&#39;s a little button labeled &#8220;XML&#8221;. If you click on it, you get the settings or stats you were looking at&#8230;but XML encoded! This means you can write your own scripts to consume the status of the SunFish! All your program needs to be capable of is downloading pages via HTTP, and consuming XML.<br />
The upshot is that this feature enables us to write our own stop gap heads-up-display. <img src='http://blogs.digitar.com/jjww/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Its much simpler than messing around with SNMP calls and the like. Particularly, given our familiarity with consuming web services. This is a terrific feature! Props to the SunFish team for providing an XML interface to the unit. Simply amazing.</li>
</ol>
<p><!-- technorati tags start -->
<p style="text-align:right;font-size:10px;">Technorati Tags: <a href="http://www.technorati.com/tag/N1400V" rel="tag">N1400V</a>, <a href="http://www.technorati.com/tag/Sun" rel="tag">Sun</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitar.com/jjww/2006/08/sunfish-chum-er-odds-and-ends/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Take Two: SunFish takes incoming fire&#8230;</title>
		<link>http://blogs.digitar.com/jjww/2006/08/take-two-sunfish-takes-incoming-fire/</link>
		<comments>http://blogs.digitar.com/jjww/2006/08/take-two-sunfish-takes-incoming-fire/#comments</comments>
		<pubDate>Wed, 09 Aug 2006 04:37:42 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[

The biggest toughest fish in the sea&#8230;and load-balancer on earth&#8230; 
Might as well call it CryptoFish&#8230; 
Up until this point, we&#39;ve never had the pleasure of using SLB-based SSL-offload. We&#39;ve just trudged along&#8230;scaling the ol&#39; SSL proxies along with the app servers. While cost-effective, the customer doesn&#39;t get Speedy Gonzales latencies, and the number of [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/98/Mola_mola.jpg/250px-Mola_mola.jpg"/><br />
<br />
<em>The biggest toughest fish in the sea&#8230;and load-balancer on earth&#8230;</em> </p>
<p><strong>Might as well call it CryptoFish&#8230;</strong> </p>
<p>Up until this point, we&#39;ve never had the pleasure of using SLB-based SSL-offload. We&#39;ve just trudged along&#8230;scaling the ol&#39; SSL proxies along with the app servers. While cost-effective, the customer doesn&#39;t get <a href="http://en.wikipedia.org/wiki/Speedy_Gonzales">Speedy Gonzales</a> latencies, and the number of moving parts goes up. As you might guess from yesterday&#39;s entry, a main design goal for us is reducing moving parts. DigiTar believes y&#39;all can&#39;t break stuff that doesn&#39;t exist. Needless to say, moving to SSL-offload in our load-balancers is something we&#39;re pretty keen on. Among other things, we&#39;ll be able re-purpose all those beefy SSL proxy servers for other things&#8230;like space heaters. </p>
<p>Enter today&#39;s first chore&#8230;migrate the HTTP SLB VIP to an HTTPS config leveraging the SSL-offload capabilities of the SunFish. While we&#39;ve never configured SSL-offload before, given this <a href="http://www.networkcomputing.com/showitem.jhtml?docid=1501sp2">review</a> on the Alteon 2424-SSL, I was prepped for beastly day. In case you don&#39;t want to read the link, on a 2424-SSL, you&#39;re looking at a configuration task that involves redirection and 3 sets of filters on 3 different VLANs. This is all to get the traffic to and from the SSL card&#8230;which is more of a <a href="http://en.wikipedia.org/wiki/Remora">suckerfish</a> (yeah the ones that feed on sharks) than a real part of the box.</p>
<p><img src="http://upload.wikimedia.org/wikipedia/en/thumb/4/46/Nurse_shark_with_remoras.jpg/320px-Nurse_shark_with_remoras.jpg" /><br />
<br />
<em>An Alteon 2424 with its SSL card in tow&#8230;</em> </p>
<p>So what&#39;s all this leading up to? We had SSL up on the SunFish in about 5 minutes! That&#39;s right, four clicks of the mouse and <strong><em>bang</em></strong> I was done. What&#39;s more&#8230;it worked! The hardest part was trying to pull the proxies&#39; key and cert out of the Subversion repository. Here&#39;s the 4 steps to converting an existing SunFish HTTP SLB group to utilize SSL-offload goodness: </p>
<ol>
<li>Copy your existing key from its Apache <a href="http://en.wikipedia.org/wiki/Public-key_cryptography">PEM</a> file, and paste it into the import page on the SunFish WebUI. Oh&#8230;you&#39;ve also got to name it something clever. Alright, maybe not clever, but its gotta have a name.</li>
<li>Grab the certificate portion from the aforementioned PEM, and paste into the import page on the SunFish WebUI&#8230;and select the name you assigned the key in the last step using the drop-down.</li>
<li>Delete the existing HTTP virtual service.</li>
<li>Re-create the HTTP virtual service as an HTTPS virtual service with all the same parameters as before, only this time select your cert and key from the &#8220;Certificate And Key Name&#8221; drop-down.</li>
</ol>
<p>Its that easy. No redirection filters. No funky hidden VLANs. No nothin&#39;&#8230;no kidding. There was so much time left-over, I spent 20 minutes figuring out how to do on-the-fly HTTP header modification&#8230;which also worked perfectly. The SunFish is so easy to use for crypto, its purchase price is probably justified by what we&#39;ll save doing things other than configuring Apache SSL proxies. If the 2424 wasn&#39;t dead on our purchase list by now, this was certainly a double-tap to its mainboard.</p>
<p><strong>You need GigE?</strong></p>
<p>Well we tried to setup redundancy&#8230;but the effort was a bit stillborn. One of the only complaints I&#39;ve got about the physical aspects of the SunFish is that all of its ports are <a href="http://en.wikipedia.org/wiki/SFP">SFPs</a>. As a result, to use RJ-45 cables you have to use GigE copper SFPs (which David C was very generous to provide). The problem is that an SFP has no concept of 10/100/1000. Its designed to be a gig optical port. As a result, we&#39;re pretty limited in our dev server room as to what we can hook it up to. In terms of the test, the X4100s are directly connected (they&#39;ve got GigE ports), and the &#8220;Internet&#8221; port goes to a GigE-capable firewall we use. Yeah&#8230;I know. Its weird. We have a GigE firewall but no GigE switches in our dev lab. Alas, that means we can&#39;t test the redundancy&#8230;but that doesn&#39;t mean I can&#39;t pontificate about it. <img src='http://blogs.digitar.com/jjww/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>The SunFish definitely has Alteon-rising when it comes to redundancy. No elegant custom protocol that binds two units as one. Rather, they use VRRP to tie the interfaces of redundant SunFish together, and an unnatural progeny of VRRP they call VSRP to handle failover of SLB virtual services between units. All-in-all darn identical to the Alteon&#8230;almost.</p>
<p>Like the Alteon, VRRP has to be set up separately on each interface you want failover for. That&#39;s a royal pain in the keester. However, VSRP is a little different, and lot better than the Alteon&#39;s way of hacking VRRP to handle virtual service failover. With the Alteon you have to configure a VRRP instance for each SLB virtual service&#8230;just like the interfaces. When you&#39;re running close to 15 virtual services per web switch, this is beyond a royal pain. Its excruciating. <a href="http://en.wikipedia.org/wiki/Rube_Goldberg">Rube Goldberg</a> could design a better way. </p>
<p>The SunFish does it much better. You just turn VSRP on. Yes&#8230;that&#39;s just about it. Of course, you have to set which unit in a pair is the master and which is the backup&#8230;but that&#39;s all you&#39;re <em>required</em> to do. No matter how many virtual services across a disparate number of vSwitches might catch your fancy, you only have one VSRP instance to enable per web switch. For us that&#39;s incredible! As much as I would prefer a custom protocol that makes the entire process transparent, I&#39;ll take a SunFish thank you very much.</p>
<p><strong>Feelings thus far&#8230;</strong></p>
<p> So far I&#39;ve been incredibly impressed by the SunFish. It is by far the most robust and powerful web switch a kid with a shiny nickel can buy (OK&#8230;500,000 shiny nickels)&#8230;without buying its big brother. There isn&#39;t one thing so far that wouldn&#39;t allow the SunFish to surpass our needs in the following areas: </p>
<ul>
<li>Consolidating a gaggle of web switches down to 2. <strong>Securely</strong>.</li>
<li>Putting a brigade of SSL proxy servers out of commission.</li>
<li>Giving us more power than we&#39;ll ever need in a single rack. Heck, this baby will run multiple processing silos for us without breaking a sweat.</li>
</ul>
<p>The one area I can&#39;t really stress enough is the amount of flexibility the SunFish will give us. The raw power combined with the virtualization capabilities will only increase our ability to deliver mind-blowing solutions to our customers (and keep the price lower than our competitors). Now the task is to put these boxes into a more production environment. More on this soon. <img src='http://blogs.digitar.com/jjww/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>P.S.</strong><br />
<em>We still want our AlteonEMS for SunFish!</em> This would make the SunFish far and above the best web switch period. Yeah F5 may have its iRules&#8230;but you put a few of those on one of their boxes and the gear keels over. To meet our needs with F5 gear we&#39;d need to buy enough to finance a fleet of Ferraris. SunFish or Alteons baby. Power over looks. <img src='http://blogs.digitar.com/jjww/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> <!-- technorati tags start --></p>
<p style="text-align:right;font-size:10px;">Technorati Tags: <a href="http://www.technorati.com/tag/N1400V" rel="tag">N1400V</a>, <a href="http://www.technorati.com/tag/Sun" rel="tag">Sun</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitar.com/jjww/2006/08/take-two-sunfish-takes-incoming-fire/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First Impressions: SunFish aka. N1400V</title>
		<link>http://blogs.digitar.com/jjww/2006/08/first-impressions-sunfish-aka-n1400v/</link>
		<comments>http://blogs.digitar.com/jjww/2006/08/first-impressions-sunfish-aka-n1400v/#comments</comments>
		<pubDate>Mon, 07 Aug 2006 23:37:56 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[First off, I have to give many deepest apologies to David C. in the Sun/Nauticus group who was kind enough to send us a pair of N1400Vs for demo purposes. They&#39;ve been here longer than I care to own up to, waiting on me to demo them. Its definitely not been for lack of interest&#8230;but [...]]]></description>
			<content:encoded><![CDATA[<p>First off, I have to give many deepest apologies to David C. in the Sun/Nauticus group who was kind enough to send us a pair of N1400Vs for demo purposes. They&#39;ve been here longer than I care to own up to, waiting on me to demo them. Its definitely not been for lack of interest&#8230;but rather has been related to an all consuming Sun Cluster project that&#39;s about 8 weeks over schedule! In any event, I FINALLY was able to put the SC project on hold (more to come on this soon!), in order to get the SunFish swimming</p>
<p>(the N1400V was codenamed SunFish, which is infinitely cooler <img src='http://blogs.digitar.com/jjww/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ).</p>
<p><strong>A little background:</strong></p>
<p>DigiTar uses load balancers like a Frenchman uses perfume&#8230;everywhere and often. Given our predilection for them, we need the most powerful web switches we can get our hands on. They&#39;re the sinew that holds us together. Up until now we&#39;ve been deploying pairs of Nortel Alteon 184s everywhere we needed load balancing, which has included our MySQL fail-over strategy (which the SC project is supposed to replace&#8230;ugh!). Our Alteons have been rock solid, and frankly, are my favorite pieces of gear. They work&#8230;all the time&#8230;every time. We&#39;ve truly abused them, and they keep humpin&#39; it up the mountain&#8230; If you need a load balancer, you can&#39;t go wrong with an Alteon and I can&#39;t say enough nice things about these bad boys.</p>
<p>Unfortunately, going back to &#8220;needing the most powerful ones&#8221;, the 184s are starting to get tapped out. Also, we&#39;d like to consolidate down into fewer of them. So just about the time the SunFish arrived, we were getting ready to replace our 184s with a fewer number of Alteon 2424-SSLs. (If you&#39;ve never seen an Alteon 2424 do its magic&#8230;you&#39;re missing out. Its a beast! Tapping it out is a challenge.) Alas, our local Sun evangelists asked if we&#39;d looked at the Sun load-balancers&#8230;and thus like so many of our odysseys of late, began our ascent into another Sun journey of discovery&#8230;(thanks Jamison &amp; Elizabeth!) </p>
<p><strong>Its only a phone call&#8230;</strong></p>
<p>Like every one of our technology disruptions, this one began with a tiny little con call&#8230;what could it hurt? Right? On the other end of that call was David C. David put up with every single pushy (and somewhat Alteon-bigoted) question we had. At the end of the phone call we were a bit intrigued, but it was the presentation numbers after the call that sold us on ripping out our beloved Alteons.The fact that we&#39;ve been told by our &#8220;sources&#8221; that a lot of the original Alteon engineers went to Nauticus (pre-Sun) didn&#39;t hurt. <img src='http://blogs.digitar.com/jjww/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>So what sold us? Well, the L4-L7 load balancing throughput was more than 3x what we were expecting from the 2424-SSLs, and the SSL acceleration throughput was so much higher I can&#39;t even mention it without embarrassing Nortel. If the 2424-SSLs are beasts, then the SunFish are 8000lb silverbacks on a steroid-regimen that would make Barry Bonds permanently sterile. And the REALLY ridiculous part&#8230; the SunFish (N1400) are the babies of the line. There is an N2120 with twice the performance.</p>
<p>Outside of the performance, what really convinced us to attempt a heart transplantwas the ability of a SunFish to slice itself into 10 virtualSLB switches. One thing we had tried to do early on was consolidate multiple SLB groups into a single Alteon switch. The problem was security. Because the Alteon (like the SunFish) is first and foremost a switch (the source of its power), it is almost impossible to segment SLB groups on secure subnets from SLB groups on insecure subnets. Even using VLANs we&#39;ve occasionally seen packet leakage in testing. So here was what was buzzing around in our brains:</p>
<p>1.) We want to consolidate down to fewer web switches (load balancers).<br />
2.) Secure subnets have to be absolutely segregated from insecure subnets.<br />
3.) One SunFish pair could easily replace 5 of our Alteon pairs.<br />
4.) SunFish can slice themselves into completely separated vSwitches.</p>
<p>hmmm&#8230;.I wonder&#8230;.could we collapse down to a single pair of SunFish per facility?</p>
<p>
As with many things in DigiTar&#39;s history, Providence has introduced what we didn&#39;t know we needed at the precisely right time&#8230;</p>
<p><strong>Enough already&#8230;where are those first impressions?</strong></p>
<p>I&#39;m running out of time tonight&#8230;so here&#39;s a quick run-down (there&#39;ll be more, I promise):</p>
<ul></p>
<li>SunFish are truly&#8230;completely&#8230;utterly different animals from any other web switch. The concepts of vSwitches make it necessary, but boy is it worth it.</li>
<p></p>
<li>Any schlocker can configure the whole thing from an incredibly slick Flash WebUI&#8230;and the CLI ain&#39;t half bad. It isn&#39;t the Alteon CLI but, hey, nothing &#39;cept <a href="http://www.juniper.net/products/junos/">JUNOS</a> has a better CLI than Alteon&#39;s WebOS.</li>
<p></p>
<li>Its a little harder than it should be to find the documentation. The SunFish OS 3.0 <a href="http://docs.sun.com/app/docs/doc/819-3045-10">documentation</a> is spotty as all get out. If you can configure this puppy from &#39;em, there&#39;s $20 waitin&#39; for ya. The trick is to grab the <a href="http://docs.sun.com/app/docs/doc/817-7637-12">System Configuration Guide for the N2000 OS 2.0</a>. The N1000 and N2000 series run the same OS, and thankfully the syntax has stayed the same from 2.0 to 3.0.</li>
<p></p>
<li>The System Configuration Guide for the 2.0 OS is a gem. Its crystal clear and logical. If you have a firm grasp ofSLB fundamentals, this is all you need. To be honest I can&#39;t say enough about this guide. Compared to the steaming piles of cow-manure that are the WebOS guides, the N2000 guide really blows ya out of the doors. Nothing stinky about it&#8230;even the English is crisp&#8230;smells of starch. <img src='http://blogs.digitar.com/jjww/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
<p></p>
<li>Alright&#8230;I still can&#39;t shut up about the guides. Thanks Sun for not making us go to gold-plated classes to configure this thing. Nortel&#8230;well you kind of suck about that&#8230;but that was your intention no?</li>
<p></p>
<li>Inside of 12 hours I had the guide read, my development servers configured for the test, and the web switch configured and running properly. That&#39;s pretty incredible to me. It took weeks of pain and suffering to get the first Alteons up over 2 years ago. Considering that this was a much more complicated setup than that one two years ago, its pretty amazing. Its a testament to the guides. Keep in mind that in both cases (the Alteons 2 years ago, and the SunFish today), there was <strong>zero</strong> help or training involved outside of the printed word.</li>
<p></p>
<ul></p>
<li>Test Config:</li>
<p></p>
<ul></p>
<li>1 SunFish load balancer.</li>
<p></p>
<li>1 SunFire X4100 sliced into 4 Solaris Zones.</li>
<p></p>
<li>2 of the Zones are tagged to VLAN 4001 on e1000g2 (Intel NIC 2).</li>
<p></p>
<li>2 of the Zones are tagged to VLAN 4002 on e1000g3 (Intel NIC 3).</li>
<p></p>
<li>2 vSwitches&#8230;one for the web servers on VLAN 4001, and one for the mail servers on VLAN 4002.</li>
<p></p>
<li>2 <a href="http://en.wikipedia.org/wiki/Load_balancer">VIPs</a> on the shared vRouter which connects to the &#8220;Internet&#8221; and the two backend vSwitches.</li>
<p>
</ul>
<p>
</ul>
<p></p>
<li>Its kind of strange and cool to design an entire web switching infrastructure virtually. If you&#39;ve ever set up a complicated virtual net in VMware, it&#39;s similar&#8230;but oh so much more seductive.</li>
<p></p>
<li>The two vSwitches are abso-positively separated. Despite having their VIPs on the same shared vRouter, neither the mail vSwitch nor the web vSwitch (or the real servers on them) can talk to each other. The wall between the vSwitches is steel-belted and brass riveted. That alone will keep my brain running with possibilities tonight!</li>
<p></p>
<li>The SunFish WebUI, while it blows the doors off Alteon&#39;s WebUI and Java client (AlteonEMS) for configuring the web switch, needs some work to be as good as the AlteonEMS for day-to-day monitoring and ops. One feature I&#39;d really like to see grafted into the SunFish CLI and WebUI is the Alteon&#39;s conception of &#8220;Apply&#8221;. Whenever any absent minded bloke (like myself) changes the configuration on an Alteon, those changes don&#39;t become active until you type <strong>apply</strong>. One of the cool side-effects of this paradigm is that you can darn near reconfigure an entire Alteon while its running, and have that baby <em>instantly</em> acquire all the facets of the new config when you type <strong>apply</strong>. Without <strong>apply</strong> you&#39;d have to take the web switch completely out of battery to do a similarly drastic config change. It also means that in a mission-critical environment, you don&#39;t have to sweat bullets about typos taking down an SLB group or the switch with a fat fingered command.</li>
<p></p>
<li>Also, the AlteonEMS has far superior heads-up displays of the health and status of all your load-balancing groups. You can find the displays in the SunFish WebUI, but they&#39;re scattered throughout the UI. There is no location you can see all of your groups, real servers and virtual servers on a single pane of glass like you can on the AlteonEMS. The AlteonEMS&#39;s single pane of glass also color-codes the individual elements (red, yellow or green) so you can instantly see whats dead and dying. If I&#39;m wrong about this, PLEASE tell me. Its a feature we&#39;re going to miss.</li>
<p></p>
<li>Unfortunately, the SunFish also inherits the Alteon&#39;s method of doing HA. We were really hoping to abandon VRRP and an SLB-hacked version of it on our web switches. For whatever reason, the SunFish does things the same way. While I&#39;m sure there&#39;s some esoteric config out there pairing a web switch with a normal router using VRRP&#8230;is it really worth the hassle? I&#39;d like to see a truly custom HA protocol where the two web switches merge as one&#8230;with stateful failover, and auto-sync of configuration between the units. Many firewalls now have this feature&#8230;lets bring it on over eh? VRRP is great for routers. End of story.</li>
<p>
</ul>
<p>That&#39;s all the blabbering there is for the moment.Thus far, the SunFish is an incredible piece of engineering. I&#39;m not quite ready to call it the <a href="http://en.wikipedia.org/wiki/F-35_Lightning_II">JSF</a> meets <a href="http://en.wikipedia.org/wiki/C17">C17</a> of load-balancers, but I can hear the after burners warming up&#8230;</p>
<p>Tomorrow is dedicated to redundancy and SSL-offload! I&#39;m stoked!<!-- technorati tags start -->
<p style="text-align:right;font-size:10px;">Technorati Tags: <a href="http://www.technorati.com/tag/Sun" rel="tag">Sun</a>, <a href="http://www.technorati.com/tag/N1400V" rel="tag">N1400V</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitar.com/jjww/2006/08/first-impressions-sunfish-aka-n1400v/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sun Cluster &amp; Solaris Express</title>
		<link>http://blogs.digitar.com/jjww/2006/07/sun-cluster-solaris-express/</link>
		<comments>http://blogs.digitar.com/jjww/2006/07/sun-cluster-solaris-express/#comments</comments>
		<pubDate>Tue, 18 Jul 2006 03:10:01 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[
Just a quick note&#8230; When Sun engineers look at you like you&#39;ve got the plague for mentioning Sun Cluster and Solaris Express in the same breath&#8230;there&#39;s a reason. The reason is that your breath is indeed infected with a plague&#8230;one that&#39;ll cause your Solaris Express instance to spew core dumps and kernel panics like a [...]]]></description>
			<content:encoded><![CDATA[<p>
Just a quick note&#8230; When Sun engineers look at you like you&#39;ve got the plague for mentioning Sun Cluster and Solaris Express in the same breath&#8230;there&#39;s a reason. The reason is that your breath is indeed infected with a plague&#8230;one that&#39;ll cause your Solaris Express instance to spew core dumps and kernel panics like a freshman at a frat party. </p>
<p>
Unsure what about Sun Cluster makes SXb41 crash uncontrollably, but the bug is not present in Solaris 10 6/06. It&#39;s truly a shame as mpathadm is an amazing tool&nbsp; from build 41 I miss already. Mpathadm is by far the slickest, most well-designed storage multipathing utility I&#39;ve had the privilege to use. If you don&#39;t need to run Sun Cluster I highly recommend running a current Solaris Express build. Mpathadm is worth it. You can fail MPXIO back and forth on a supported controller with the impunity of Superman<br />
at a paper-mache convention.</p>
<p><!-- technorati tags start -->
<p style="text-align:right;font-size:10px;">Technorati Tags: <a href="http://www.technorati.com/tag/Solaris Express" rel="tag">Solaris Express</a>, <a href="http://www.technorati.com/tag/Sun Cluster" rel="tag">Sun Cluster</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitar.com/jjww/2006/07/sun-cluster-solaris-express/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
