Showing posts with label caching. Show all posts
Showing posts with label caching. Show all posts

22 Jul 2012

Tsar

If you've been working with Linux system for enough time, you will know sar. Since sar supports collecting many system statistic and its syntax is a bit complicated, Yahoo people created a tool in Perl called Ysar, it's similar to sar with simpler syntax, Yahoo has not published that tool yet. People at Taobao created another tool in C, named it with tsar and open source it at: https://gitorious.org/trafficserver/tsar/commits/master


Working with Apache Traffic server to build internal CDN for our company, I also join #trafficserver on FreeNode, that's when I heard about Tsar and started using it.  The opensource version of Tsar has 2 features, once is to get its syntax simpler and easier to use than sar, another is collecting various statistic of Apache Traffic server, integrate with nagios. For some reasons, this public version does not work in some cases: 

  • It only support traffic server installed as standard Red Hat package, so if you installed traffic server on another Linux distro,  BSD or Sun Solaris, it will not work. 
  • Module traffic does not work.
  • it  only supports standard network ethernet (eth*), bonding and p2p device won't work. 
I modified tsar to fix above problems. the modified version will work in any kind of Apache traffic server on any system. It support bonding and p2p and standard ethernet device....
My pull requests was not accepted by Taobao developer, so I put it on github  (Installation and Usage in README file). If you're using traffic server with nagios monitor system, this tool will fit your need. 


9 Jul 2011

Web Caching

(Part 1)
Một caching server là server đứng giữa clients và web servers, trả lời request từ client thay cho web server nếu như:
1. Client request html object đã được lưu trữ trong bộ nhớ cache.
2. Cache object là version cùng với version được sinh ra từ web servers nếu request vào được đến web server (fresh).

Web cache có 3 loại: browser cache, proxy cache (forward proxy, transparent proxy), và gateway cache (reverse proxy). Ở đây chúng ta chỉ nhắc đến loại thứ 3: Reverse proxy cache, ngắn gọn là reverse proxy.
Một mô hình reverse proxy đơn giản như sau:
                           Clients -------- Reverse proxy --------- Web Servers

Disqus