¡¶¹¹½¨¸ßÐÔÄÜwebÕ¾µã¡··´Ïò´úÀí»º´æ
·´Ïò´úÀí»º´æÊÇÄ¿Ç°»¥ÁªÍø¹«Ë¾Ê¹ÓÃ×î³£¼ûµÄÒ»ÖÖ·½Ê½£¬ÏñÐÂÀËÕâÑùµÄÐÂÎÅÍøÕ¾£¬´ó¶àÊýµÄÒ³Ã涼ÊǶÁµÄÒ³Ã棬¶øÇÒÒªÇóËٶȣ¬ËùÒÔ»áÓ÷´Ïò´úÀíµÄ·½Ê½À´¹¹½¨cdn£¬ÒÑ´ïµ½×î¿ìµÄ·ÃÎÊËٶȡ£
·´Ïò´úÀí»º´æÒÀ¾ÉÊÇ»ùÓÚHTTPµÄÒ»ÖÖ»º´æ·½Ê½£¬·´Ïò´úÀí·þÎñÆ÷ºÍweb·þÎñÆ÷ÒÔ¼°ä¯ÀÀÆ÷ͨ¹ýHTTPÍ·À´ÐÉÌ£¬ÄÄЩ¶«Î÷¿ÉÒÔ»º´æ£¬ÄÄЩӦ¸Ã»º´æ¹ýÆÚ¡£
ÒòΪ·´Ïò´úÀí»º´æÊÇ»ùÓÚHTTPµÄ£¬ËùÒÔÆ乤×÷ÔÚÆ߲㣬³£ÓõÄÈí¼þÊǹÅÀϵÄsquidºÍÐÂÐ˵Ävarnish¡¢nginx¡£
×ܽá1:¼¯Öз´Ïò´úÀí»º´æ·þÎñÆ÷µÄ±È½Ï
1.squid£¬ºÜ¹ÅÀϵķ´Ïò´úÀíÈí¼þ£¬ÓµÓд«Í³´úÀí¡¢Éí·ÝÑéÖ¤¡¢Á÷Á¿¹ÜÀíµÈ¸ß¼¶¹¦ÄÜ£¬µ«ÊÇÅäÖÃÌ«¸´ÔÓ¡£ËüËãÊÇÄ¿Ç°»¥ÁªÍøÓ¦ÓõÃ×î¶àµÄ·´Ïò»º´æ´úÀí·þÎñÆ÷£¬¹¤×÷ÓÚ¸÷´ó¹ÅÀϵÄcdnÉÏ¡£
2.varnishÊÇÐÂÐ˵ÄÒ»¸öÈí¼þ£¬Éè¼Æ¼òµ¥£¬¸ü·ûºÏÄ¿Ç°»¥ÁªÍøµÄÓ¦Ó㬺ܶ๫˾¶¼²ÉÓÃÁËvarnishÕâ¸öÈí¼þ£¬±ÈÈç΢²©µÄopenapi http://open.t.sina.com.cn
3.nginx nginxµÄ·´Ïò´úÀí»º´æÊÇͨ¹ýÒ»¸öÄ£¿éʵproxy_cacheÀ´ÊµÏֵģ¬Ä¿Ç°Õâ¸öÄ£¿é»¹ÔÚÍêÉÆÖУ¬µ«ÊǺܶ๫˾ÒѾ¿ªÊ¼Ê¹ÓÃÁË¡£
×ܽá2£ºvarnishµÄһЩ¼òµ¥×ܽá
С×ܽáһЩÊéÉϵĶ«Î÷£¬ÒÔºó¸ü¼ÓÈ«ÃæµØʵʩһ±é
1.varnishµÄ»»³ÉΪһ¸öÎļþ£¬Êý¾Ý½á¹¹ºÍmysqlµÄinnodbÀàËÆ
2.varnishµÄÅäÖÃÎļþºÜÈÝÒ×Àí½â£¬ÊÇÒ»ÖÖÀà±à³ÌÓïÑÔʵÏֵĿØÖÆÂß¼£¬Ö÷ÒªÊǶÔHTTPµÄÍ·µÄÅжÏ
3.nginxÅäÖõÄÖ÷ÒªµÄÁ½ÖÖ·½Ê½£¬Ò»ÖÖÊÇä¯ÀÀÆ÷ÇëÇóµÄʱºòÅжÏÄÄЩ¸Ã´Ó»º´æÎļþÊä³ö£¬ÄÄЩӦ¸ÃÇóÇóºó¶Ë£»µÚ¶þÖÖÊÇ´Ó·þÎñÆ÷¶Ë³öÀ´µÄÊý¾Ý£¬varnishÅжÏÄÄЩ¿ÉÒÔ»º´æ
´Óä¯ÀÀÆ÷µÃµ½ÇëÇóºóµÄÅжϣº
sub vcl_recv{ if(req.request != "GET" && req.request != "HEAD" && req.request != "PUT" && req.request != "POST" && req.request != "TRACE" && req.request != "OPTIONS" && req.request != "DELETE"){ return (pipe); } if(req.request != "GET" && req.request != "HEAD"){ return (pass); } if(req.http.Authorization || req.http.Cookie){ return(pass) } return(lookup); }pass ±íʾ²»¼ì²é»º´æÖ±½Ó·¢¸øºó¶Ë
lookup ±íʾÏÈ´Ó»º´æÖÐÕÒÐÅÏ¢
http://hi.baidu.com/leolance/blog/item/a4bb9d823e95603066096e6c.html
´Óºó¶Ë·þÎñÆ÷»ñµÃÊý¾ÝºóµÄÅжϣº
sub vcl_fetch{ if(!obj.cacheable){ return pass; } if(!obj.http.Set-Cookie){ return pass; } set obj.prefetch = -30s; return (deliver); }
pass ±íʾֱ½Ó·µ»Ø¸øä¯ÀÀÆ÷
deliver ±íʾ½«ÄÚÈÝдÈ뻺´æÇø
×ܽá3:»º´æÃüÖÐÂÊ
ÓÉÓÚ»º´æÒ»°ã¶¼ÒÔLRUµÄģʽ½øÐÐÌÔÌ£¬ÓпÉÄÜ»º´æ¿Õ¼ä̫С£¬ÄÚÈÝÓֺܶ࣬µ¼ÖÂÁ˺ܶàÐèÒªµÄÎļþ±»Ìß³öÈ¥ÁË¡£
»º´æÃüÖÐÂÊÊÇÒ»¸öÐèÒªÔ¤ËãºÍ¼à¿Ø·ÖÎöµÄ£¬ÐèÒªÊý¾ÝÉϽøÐи÷ÖÖ·ÖÎöºó²»¶Ïµ÷Õû¡£
ÍƼöÐÅÏ¢
- linuxÃüÁîѧϰ±Ê¼Ç£¨11£©£ºnlÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨5£©£ºrmÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨4£©£ºmkdirÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨1£©£ºlsÃüÁî
- ½«CentosµÄyumÔ´¸ü»»Îª¹úÄڵİ¢ÀïÔÆÔ´
- ʹÓÃNginxÌí¼Óheader·ÀÖ¹ÍøÒ³±»frame
- linuxϼÓËÙscp´«Êä´óÎļþµÄËÙ¶È
- linuxϵͳÉ϶ÔnginxÈÕÖ¾·Ö¸î´¦Àí
- lnmp/nginxϵͳÕæÕýÓÐЧµÄͼƬ·ÀµÁÁ´ÍêÕûÉèÖÃÏê½â
- Í»ÆÆÊ®Íò²¢·¢µÄNginxµÄÅäÖü°ÓÅ»¯
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- ²éÕÒ²¢É¾³ý.svnĿ¼Îļþ
- redis ÆßÖÖÊý¾ÝÀàÐ͵ÄʹÓó¡¾°
- linux ÏÂÎļþ¸´ÖƵ½windowsÏÂÂÒÂëµÄ½â¾ö°ì·¨
- nginx³öÏÖ502 upstream sent too big he....
- linuxÏÂsudoÅäÖÃÏê½â
- linuxÃüÁîѧϰ±Ê¼Ç£¨15£©£ºtailÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨14£©£ºheadÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨13£©£ºlessÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨12£©£ºmoreÃüÁî
- ¼ÓÃÜËã·¨±È½Ï3DES AES RSA ECC MD5 SHA1µÈ
ÆÀÂÛ