interesting posts from NANOG

Following reply by iljitsch van Beijnum about queueing delays in IP, looked to be a good little summary.

The answer is that delay is only one aspect of performance, another important one is packet loss. As link bandwidth increases, queuing delays decrease proportionally. So if you’re using your 10 Mbps link with average 500 byte packets at 98% capacity, you’ll generally have a 49-packet queue. (queue = utilization / (1 – utilization)) Our 500 byte packets are transmitted at 0.4 ms intervals, so that makes for a 19.6 ms queuing delay.

So now we increase our link speed to 100 Mbps, but for some strange reason this link is also used at 98%. So the average queue size is still 49 packets, but it now only takes 0.04 ms to transmit one packet, so the queuing delay is only 1.96 ms on average.

As you can see, as bandwidth increases, queuing delays become irrelevant. To achieve even 1 ms queuing delay (that’s only 120 miles extra fiber) at 10 Gbps you need an average queue size of 833 even with 1500-byte packets. For this, you need a link utilization of almost 99.9%.

However, due to IP’s bursty nature the queue size is quite variable. If there is enough buffer space to accommodate whatever queue size that may be required due to bursts, this means you get a lot of jitter. (And, at 10 Gbps, expensive routers, because this memory needs to be FAST.) On the other hand, if the buffer space fills up but packets keep coming in faster than they can be transmitted, packets will have to be dropped. As explained by others, this leads to undesired behavior such as TCP congestion synchronization when packets from different sessions are dropped and poor TCP performance when several packets from the same session are dropped. So it’s important to avoid these “tail drops”, hence the need for creative queuing techniques.

However, at high speeds you really don’t want to think about this too much. In most cases, your best bet is RED (random early detect/drop) which gradually drops more and more packets as the queue fills up (important: you need to have enough buffer space or you still get excessive tail drops!) so TCP sessions are throttled back gradually rather than traumatically. Also, the most aggressive TCP sessions are the most likely to see dropped packets. With weighted RED some traffic gets a free pass up to a point, so that’s nice if you need QoS “guarantees”. (W)RED is great because it’s not computationally expensive and only needs some enqueuing logic but no dequeuing logic.

scaling web apps

A little video, thin on detail of course, but hints at some home truths on building/designing scale-able applications (and i’d go so far to say that they are applicable to ALL applications not just webapps)

http://joyent.vo.llnwd.net/o25/videos/LinkedIn-Bumpersticker-LED-Scaling-Rails.m4v

Of course, I know Ben Rockwood like’s his solaris and F5′s – but that’s not going to surprise many (and I just LOVE f5s)

And here’s a blog entry with the details on /how/ that’s done:-

http://www.joyeur.com/2008/04/18/the-wonders-of-fbref-and-irules-serving-pages-from-facebooks-cache

. . . basically as simple as:-

when HTTP_REQUEST {
  if { [HTTP::uri] contains "/popular_something/list"} {
    HTTP::respond 200 content "<fb:ref handle='[HTTP::uri]'/>"
  } else {
    pool facebook.application_server_pool
  }
}

Microsoft bids $1.23bn for Norwegian search firm

Oh interesting stuff there – I’ve always liked the idea of FAST (not cheap as a search platform) but they’ve certainly thought a bit about how to scale – will be interesting to see if this mean’s a change to the supported platforms and roadmap moving forward

Wants to mine web with Fast buy

Microsoft is to acquire Norwegian business search engine company Fast Search and Transfer for 6.6bn kroner ($1.23bn).…

[From Microsoft bids $1.23bn for Norwegian search firm]