Thursday, June 21, 2012

tcpdump tutorial

Today, I needed to use tcpdump after a very long time.  Hence, I did the most natural thing: GOOGLE tcpdump tutorial.  I was pleasantly surprised to find that the 3rd link in the search results was a tcpdump tutorial I had written myself  6 years ago while I was a Teaching Assistant for the undergrad networking class at UC Berkeley : http://inst.eecs.berkeley.edu/~ee122/fa06/projects/tcpdump-6up.pdf

Looks like this tiny tutorial I wrote has had more impact than my PhD thesis :-) 

Dog-pile Effect : Squid versus Apache Traffic Server

When using a forward web proxy cache, it is possible to encounter the dog-pile effect. When a new page suddenly becomes very popular or when a popular page expires from the cache, the proxy will receive a large number of requests for the page at the same time.  There are two ways to handle this:
  1. Since the page is not already in the cache, the proxy forwards each request to the origin server, OR
  2. The proxy forwards the first request to the origin server, and queues the others till the response to the first request fills the cache.
Option 1 leads to the dog-pile effect.  The origin server is rapidly bombarded with a large number of requests.  This is usually problematic.  The server slows down and the requests keep piling up.

Option 2 is called connection collapsing or collapsed forwarding.  Squid supports this feature - http://www.squid-cache.org/Doc/config/collapsed_forwarding/.  However, Apache Traffic Server currently does not support it (Thanks to the super-responsive folks on the traffic-server IRC channel for confirming this).  It used to be supported , but was removed since the implementation was buggy : http://mail-archives.apache.org/mod_mbox/trafficserver-commits/201102.mbox/%3C20110209171030.3247A23889BF@eris.apache.org%3E

Sunday, March 18, 2012

Someone please disrupt the furniture industry!


Many things are cheaper online than in brick and mortar stores. Not so for furniture. Based on my (limited) experience buying furniture for my new home over the last 2 months, online furniture stores are way more expensive than your local furniture showroom. http://www.homelement.com/Living-Room/Living-Room-Sets/Lambeth-Sofa-Set-Homelegance-p-25911.html lists a sofa + loveseat combo for $1838. I got the identical sofa, loveseat and coffee table (listed for $309) for just $1325 after tax with free delivery and setup from a local store! That is a savings of over $800! 

 I visited three stores before I bought the sofa set. If I had bought it from the first store I visited, my savings would have been just $400. This is the strategy I followed. 

The first store is where you pick what you like. You peruse through the catalogs of various manufacturers and find what you like. Then you ask for a price quote. The salesman will consult his secret price list to determine what the furniture costs him, and then typically quotes you double that amount. Negotiate a little bit to get the price down.  

Then, armed with that price, you go to the next store. Almost every store carries the same set of catalogs, and even get their items from the same warehouses. This time, you waste no time - directly ask the salesman what his best price for item X on page Y of manufacturer Z's catalog is. Use the price from the first store as the starting point and negotiate the price down. Since the prices are often marked up 100% or more, there is a LOT of room to negotiate. Then you go to the next store and do the same. If you had nothing better to do, you can keep doing this. However, after the first 3-4 stores, the price stops going down further, and there is no point wasting another valuable weekend day on furniture shopping. At that point, you close the deal. But wait - offer to pay cash if you can and you will most likely get a further discount. 

This strategy saves you many 100s of dollars, but takes a lot of time. Visiting three furniture stores can take a whole Saturday. It would have been great if buying furniture was like shopping for a car online. You just pick the items you want from a multi-manufacturer online catalog and then different local dealers bid for your business. That's it - no driving from store to store. That would have been ideal. But that's not the way it is today. 

I hope some startup is working to disrupt the furniture industry and make this seamless online furniture shopping experience possible. I only know of one startup in the furniture space - dealdecor.com, which is trying to become the Groupon of furniture. Dealdecor offers one particular piece of furniture every few weeks for half price. That is great, if the item of the month is what you are looking for.  It most like won't be, and you have no option but to visit the local retailers. 

The US furniture market is a few 100 billion dollars a year(http://www.marketsize.com/blog/index.php/category/furniture/).   There are many challenges to disrupting this industry - resistance from the entrenched local dealers (now, that's a surprise!), finding a good way for shoppers to try out furniture before buying, shipping bulky items, etc.   Hopefully, someone will find a way to address these challenges and seize this huge opportunity.    As for me, I am done with buying furniture for a while.