티스토리 뷰

여러가지

etsy 분석

yaku 2014. 2. 5. 12:54

etsy.com 은 무엇을 하는 건가?

  • esty.com 은 글로벌 빈티지, 핸드메이드 판매하는 장터! 
    • 일반 유져들이 셀러되 되어서 물건을 판매할수 있는 공간 ( 무료로 ) 

우리는 왜 etsy.com 를 이야기 하는가 ?

  • 전세계 10억 인구의 방문자수에 따른 최적의 웹 퍼포먼스의 성능 유지, 사이트의 안정성을 유지하는 비결을 분석하기 위해서
  • 분석의 모니터링 벤치마킹
  • 매일 수십번 배포되는 etsy 배포 시스템 알기 위해서
  • ( etsy.com 환경 ) Apache, Php, MySql, PostgresSql, Memcache, Gearman, Solr
  • Error Login 
  • 결제율

  • page 퍼포먼스

 

이와 같은 차트를 상황판으로 걸어놓고 누구나 상황을 모니터링을 할 수 있는 시스템이 구축되어 있다.

 

Etsy 사용된 Tools 분석

 logging, Analyze Tool

  1. 로그에 성능 데이터를 캡쳐
    1. page gen, Boomerang, Gomez

  2. 집계 ( 모으기 )
    1. splunk, Logster, StatsD, I/O Profiler

  3. Record in Graphite

Tools 

  1. I/O Profiler

  2. Client-side-Testing
    1. Gomez ( API ), Boomerang, WebPagetest

  3. ShowSlow
    1. http://showslow.com

  4. YSlow & Page Speed

Etsy 의 몇가지 로그 수집 어떻게 얻는 지 분석

  • app logging ( Apache access and error logs )  
// 페이지 속도 로그의 수집 처리
$GLOBALS[timer] = microtime(true) * 1000000;
 
register_shutdown_function(pageStats);
 
function pageStats() {
    $timer_end = microtime(true) * 1000000
    $diff = $timer_end - $GLOBALS[timer]; 
    
    apache_note(php_microsec, $diff);  // 시간
    apache_note(php_bytes, memory_get_peak_usage()); // 메모리 사용률
}

 

Aplication 단에서 Errolog 수집

Logger::error ( "쿼리가 5초 초과함 : " . $query  , "sql_long_query" );
 
//access.log
web0054 [ 날짜 ] [error][sql_long_query] [ 아이디 ] 5초 걸린 쿼리 : $query
 
// 검석 몰아이디나, 시간으로 access log 조회
grep "시간" access.log | wc -l 1527
 
// 필터링
tail -f error.log | grep -v "sql_long_query"

 

위 에러 로그 분석을 통하여 얻어진 에러의 동향 파악


      

참고자료

http://www.mikebrittain.com/blog/category/php/

http://www.slideshare.net/mikebrittain/simple-log-analysis-and-trending

http://www.codinghorror.com/blog/2011/06/performance-is-a-feature.html

http://www.slideshare.net/mikebrittain/take-my-logs-please

댓글
D-DAY
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함