ããã«ã¡ã¯ãHabrïŒ Badooã®ç§ãã¡ã¯ãITã³ãã¥ããã£ã®ç掻ã«ç©æ¥µçã«åå ããããšããŠããŸããå€ãã®ãªãŒãã³ãœãŒã¹ã®æè¡ãšããŒã«ã䜿çšããéçºãå ±æããŠããŸãã
ãããã®ããŒã«ã®1ã€ã¯Pinbaã§ããããã¯ãåéäžã®ãªãŒããŒããããªãã§å®è¡äžã®ã¢ããªã±ãŒã·ã§ã³ãããªã¢ã«ã¿ã€ã çµ±èšãåä¿¡ããããã®ãµãŒãã¹ã§ãã 詳现ã«ã€ããŠã¯ããã®èšäºãã芧ãã ãã ã
ç§ãã¡ã¯ãPinbaããããžã§ã¯ãã§äœ¿çšããPinbaã«é¢é£ãããµã¯ã»ã¹ã¹ããŒãªãŒãåžžã«åãã§èããŠãããã¹ãŠã®äººãæ¯æŽããããåªããŠããŸãã ãã®ç¿»èš³ã¯ãDailymotionã®éçºè ã«ããåæ§ã®ã¹ããŒãªãŒã®1ã€ã§ãã
ã¯ããã«
Dailymotionã¯ãStatsDãGraphiteãcollectdãDatadogãªã©ã®ããŸããŸãªããŒã«ã䜿çšããŠãã¢ããªã±ãŒã·ã§ã³ãç£èŠãåæãããã³æé©åããŸãã ããããããŸãç¥ãããŠããªããã®ããããŸã-ãã³ãïŒPHPã¯ããããã«ããã¯ã§ã¯ãããŸããïŒã®ç¥ã§ãã
çŸåšãæ§åŒã®ã¢ããªã·ãã¯PHPã¢ããªã±ãŒã·ã§ã³ãšå€ãã®ã¬ã¬ã·ãŒã³ãŒãã®ç§»è¡ã«åãçµãã§ããŸãã 代ããã«ãããã€ãã®ææ°ã®ãã€ã¯ããµãŒãã¹ãå±éããäºå®ã§ãã ãã³ãã䜿çšããŠåéãããã®ïŒ
çŸåšã®PHPã¢ããªã±ãŒã·ã§ã³ã«é¢ããããŒã¿ã ããã«ãããã¡ã³ããã³ã¹ãšå±éãããå¹ççã«å®è¡ãïŒããã©ãŒãã³ã¹ã«æªåœ±é¿ãäžãããªãªãŒã¹ãç¹å®ïŒãèããããåé¡ãèŠã€ããŠåæããããšãã§ããŸãã ããã«ãååŸããããŒã¿ã¯ãããã©ãŒãã³ã¹ãæ倧éã«åäžãããããã«ãæåã«ãã©ãããã©ãŒã ã®ã©ã®ã³ã³ããŒãã³ããæ¹åããå¿ èŠãããããå€æããã®ã«åœ¹ç«ã¡ãŸãã
- æ°ãããã€ã¯ããµãŒãã¹ã«é¢ããããŒã¿ã ããã«ãéçºèšèªïŒçŸåšã¯PythonãŸãã¯GoïŒã«å¿ããŠãããŸããŸãªã¯ã©ã€ã¢ã³ãã䜿çšããŸãïŒãã ããããã«äœ¿çšã§ããã¯ã©ã€ã¢ã³ãããããŸã-çŽPerãïŒã
ãã³ããšã¯äœã§ããïŒ
Pinbaã®äœæè tony2001㯠ã次ã®ããã«èª¬æããŠããŸãã
ãããã¯MySQLãã€ã³ã¿ãŒãã§ãŒã¹ãšããŠäœ¿çšããçµ±èšãµãŒããŒã§ãã Pinbaã¯ãUDPãä»ããŠå€ãã®PHPããã»ã¹ã«ãã£ãŠéä¿¡ãããããŒã¿ãåéããŠåŠçãããã®åŸãç°¡åã§ç解ããããã¬ããŒãã®åœ¢åŒã§çµ±èšã衚瀺ããŸãã ããã«ãç¹å¥ãªã€ã³ã¿ãŒãã§ãŒã¹ã䜿çšããŠãèªã¿åãå°çšã¢ãŒãã§çããŒã¿ã«ã¢ã¯ã»ã¹ãããã詳现ãªã¬ããŒããçæã§ããŸãã
ã©ã®ããã«æ©èœããŸããïŒ
PHPã®Pinbaæ¡åŒµæ©èœã¯ãWebãã¡ãŒã ã®ãã¹ãŠã®ãµãŒããŒã«ã€ã³ã¹ããŒã«ãããŸãã åPHPã¹ããªãŒã ã®æè¡ããŒã¿ãåéããå¿çãã¯ã©ã€ã¢ã³ãã«éä¿¡ãããåŸãåä¿¡ããã¡ããªãã¯ãUDPçµç±ã§äžå€®ã®PinbaãµãŒããŒã«éä¿¡ããŸãïŒGoogle ProtobufããŒã¿äº€æ圢åŒã䜿çšãããŸãïŒã äžå€®ãµãŒããŒã§ã¯ãPinbaãšã³ãžã³ããããã®ã¡ãã»ãŒãžã®å 容ãéçŽããMySQLãšã³ãžã³ã§èªã¿åãå°çšã®ãµããããŠãæ¢ç¥ã®MySQLã¯ã©ã€ã¢ã³ãã䜿çšããŠè¡šç€ºããã³éžæã§ããããŒãã«åœ¢åŒã®ããŒã¿ãæäŸããŸãã 䟿å©ã§å¹æçã
äžè¬çãªèª€è§£ã«ãããããããPinbaã¯ãããã¬ãŒã§ãã°ã©ãã£ã«ã«ããŒã«ã§ããããŸããã æ¬çªç°å¢ã®ã¢ããªã±ãŒã·ã§ã³ã§äœãèµ·ãã£ãŠãããã®åçãäœæããã®ã¯åãªãããŒã¿ãã¥ãŒã¢ãŒã§ãïŒãªã¢ã«ã¿ã€ã ã§ã¯ãæåŸã®1ã2åã§ã¹ã©ã€ã¹ãäœæãããŸãïŒã åçã¡ããªãã¯ã䜿çšããŠãããã©ãŒãã³ã¹ãç ç²ã«ããããšãªãæç³»åã°ã©ããäœæããããã«å¿ããŠãçºçããå¯èœæ§ã®ããåé¡ãæééãã«ç¹å®ã§ããŸãã
ãã¡ããããã³ãã¯äžèœè¬ã§ã¯ãªãããã¹ãŠã®åé¡ã解決ããããã§ã¯ãããŸããã ããããééãã®1ã€ã¯ããã®ãµãŒãã¹ã䜿çšããŠæ£ç¢ºãªããŒã¿ãåéããããšã§ãïŒããšãã°ãçŽåã«çºçããã€ãã³ãã®ã«ãŠã³ã¿ãŒãšããŠïŒã PinbaãµãŒãã¹ã¯ãã®çš®ã®ã¿ã¹ã¯ã察象ãšããŠããŸããïŒæ¢ã«ãåç¥ã®ããã«ãããã©ãŒãã³ã¹ãåäžãããããã«ãprotobufã¡ãã»ãŒãžã¯UDPçµç±ã§éä¿¡ããããããéäžã§äžéšã®ãã±ããã倱ãããå¯èœæ§ããããŸãïŒã ãã®ããŒã«ã䜿çšããŠåŸåã远跡ããŸãããã¢ã¯ã·ã§ã³ãæ£ç¢ºã«å®éåããã«ã¯é©ããŠããŸããã
ç§ãã¡ã®å»ºç¯
ãµãŒãã¹ã䜿çšããŠã©ã®ãããªã¡ããªãã¯ã远跡ã§ããŸããïŒ
ãã¹ãŠã®PHPããã»ã¹ã§ããã©ã«ãã§è¿œè·¡ãããæè¡çææšã®ç¯å²ã¯éåžžã«åºãã§ãã
doc_size-å¿çãµã€ãºã
mem_peak_usage-å²ãåœãŠãããã¡ã¢ãªïŒæ倧ãµã€ãºïŒ;
request_time-ããã»ã¹ã®äœæã«ãããæéïŒãã€ã¯ãã»ã³ãåŠçïŒã
ru_utime / ru_stime-ãµãŒããŒãªãœãŒã¹ïŒãŠãŒã¶ãŒããã³ã·ã¹ãã ïŒã®äœ¿çšã«é¢ããçµ±èšã
status-HTTPå¿çã³ãŒãã
- memory_footprint-ããã»ã¹ãå æããŠããã¡ã¢ãªã®éã
ãšã³ãžã³ã¯ãåããã»ã¹ã®ã¡ããªãã¯ããªã¯ãšã¹ãããŒãã«ã«ä¿åããæåŸã®pinba_stats_historyç§ïŒãã®å Žåã¯60ç§ïŒã§PHPå¿çããšã«1è¡ã匷調衚瀺ããŸãã
mysql> SELECT script_name, doc_size, mem_peak_usage, status, memory_footprint, hostname FROM request LIMIT 10;
script_name | doc_size | mem_peak_usage | ç¶æ | memory_footprint | ãã¹ãå |
---|---|---|---|---|---|
[PROD] video_item | 5.422 | 10240 | 200 | 54728 | web-065 |
[PROD] widget_dispatch_v3 | 38.056 | 14848 | 200 | 31624 | web-031 |
[PROD] video_list | 154.369 | 20736 | 200 | 87176 | web-004 |
[PROD] rest_api | 0.235 | 22784 | 200 | 51568 | web-128 |
[PROD] rest_api | 9.306 | 34048 | 200 | 55624 | web-024 |
[PROD] rest_api | 5.448 | 35072 | 200 | 54676 | web-041 |
[PROD] controller_dispatch | 2.003 | 11776 | 200 | 36388 | web-033 |
[PROD] widget_v3_chunks | 22.525 | 12544 | 200 | 33544 | web-165 |
[PROD] cdn_director | 0 | 9984 | 302 | 42892 | web-034 |
[PROD] rest_api | 0.019 | 20736 | 200 | 32500 | web-085 |
èŠæ±ããŒãã«ã«ã¯åPHPããã»ã¹ã®ã¡ããªãã¯ãå«ãŸããŠããããã©ãã£ãã¯ãå€ãå Žåã¯çããŒã¿ãžã®ã¢ã¯ã»ã¹ãéåžžã«å°é£ã«ãªãå¯èœæ§ããããŸãã
mysql> SELECT COUNT(1) from request;
COUNTïŒ1ïŒ |
---|
1197502 |
ã€ãŸãã1 60ç§ã§Webãã¡ãŒã å šäœã§1 197 502 PHPå¿çãçæãããŸããã
幞ããªããšã«ããšã³ãžã³ã¯ã€ã³ã¹ã¿ã³ãéèšã䞊è¡ããŠå®è¡ãããµããªãŒã¡ããªãã¯ãreport_ *ããŒãã«ã«é 眮ããŸãã script_nameãã£ãŒã«ãã®å€ã§ã°ã«ãŒãåãããã¡ããªãã¯ã¯report_by_script_nameããŒãã«ã«ãããããç¹å®ã®script_nameå€ã®ã¡ããªãã¯ãåæã§ããŸãã ããšãã°ãæãé »ç¹ã«åŒã³åºããã10åã®ã«ãŒãã«é¢ããçµ±èšãååŸã§ããŸãã
mysql> SELECT script_name, req_count, req_per_sec, memory_footprint_total, req_time_median FROM report_by_script_name ORDER BY req_count DESC LIMIT 10;
script_name | req_count | req_per_sec | memory_footprint_total | req_time_median |
---|---|---|---|---|
[PROD] rest_api | 276508 | 4608.47 | 12916600000 | 0.0514983 |
[PROD] embed_player | 162808 | 2713.47 | 8074990000 | 0.109837 |
[PROD] cdn_director | 122526 | 2042.1 | 5103160000 | 0.0280768 |
[PROD] widget_dispatch_v3 | 105822 | 1763.7 | 4349350000 | 0.049904 |
[PROD] history_logger | 98481 | 1641.35 | 4060860000 | 0.0127946 |
[PROD] video_item | 66250 | 1104.17 | 3563420000 | 0.254091 |
[PROD] autocomplete_list | 56313 | 938.55 | 2322790000 | 0.0104993 |
[PROD] webapp_ads_mopub | 52187 | 869.783 | 2183980000 | 0.0326299 |
[PROD] gravity_report | 45992 | 766.533 | 1895290000 | 0.0167253 |
[PROD] player_data | 33584 | 559.733 | 1724540000 | 0.113651 |
ã¯ãšãªãå®è¡ããã ãã§ãå²ãåœãŠãããã¡ã¢ãªã®å¹³åéãèšç®ããããšãã§ããŸã
memory_footprint_total/req_count AS avg_mem_footprint
ããã©ã«ãã§ã¯ããšã³ãžã³ã¯ä»ã®ããã€ãã®äŸ¿å©ãªããŒãã«ã®ã¡ããªãã¯ãçµ±åããŸãã
report_by_server_name;
report_by_hostname;
report_by_server_and_script;
report_by_hostname_and_server;
- report_by_hostname_server_and_scriptã
詳现ã«ã€ããŠã¯ãè€æ°ã®ãã£ã¡ã³ã·ã§ã³ã®ããŒã¿ãçµã¿åãããããŒãã«ã䜿çšããŠãã ããã ãããã¯ãããšãã°ããã¹ããšãµãŒããŒã§æãäžè¬çã«äœ¿çšãããã¹ã¯ãªããã§ãã
mysql> SELECT hostname, server_name, script_name, req_count, req_per_sec, req_time_median FROM report_by_hostname_server_and_script ORDER BY req_count DESC LIMIT 2;
ãã¹ãå | server_name | script_name | req_count | req_per_sec | req_time_median |
---|---|---|---|---|---|
web-121 | api.dailymotion.com | [PROD] api_oauth_token | 4144 | 69.0667 | 0.0104435 |
web-038 | api.dailymotion.com | [PROD] rest_api | 3455 | 57.5833 | 0.0441618 |
ç¬èªã®ã¡ããªãã¯ã®åé
ã芧ã®ãšãããPinbaã¯è¿œå èšå®ãªãã§å€ãã®æçšãªæ å ±ãæäŸããŸãããããã ãã§ã¯ãããŸããïŒ ã¬ããŒãããŒãã«ã«å ããŠãã¿ã°ã¬ããŒã *ããŒãã«ã䜿çšã§ããŸãã ã¡ããªãã¯ã¯ãã³ãŒãã§å®çŸ©ããã¿ã°å€ã«åŸã£ãŠãããã®ããŒãã«ã«çµ±åãããŸãã
ããšãã°ãå€ãDailymotionã³ãŒãããŒã¹ã«ã¯ã2çš®é¡ã®ã¿ã°ããããŸãã
I / OïŒå€éšããã®ã¢ã¯ã»ã¹ãããã»ã¹ã®ãããã¯ïŒãžã®ã¢ã¯ã»ã¹
MySQLãElasticãRedisãmemcachedããŸãã¯å€éšAPIãªã©ã®ãµãŒããŒã
äŸïŒFacebookãŸãã¯TwitterïŒ;
- algoïŒç§ãã¡ãèŠããã¢ã«ãŽãªãºã ã
ããšãã°ãmemcacheã®å Žåã次ã®ããã«ã¿ã°ã䜿çšããŸãã
顧客ã³ãŒã
$pinbaTimer = $this->pinbaService->startTimer([ 'group' => 'memcached', 'memcached' => $this->pinba_pool, 'method' => 'get', 'namespace' => 'dm_cache' ]); $value = $this->memcache->get($this->prefix . $key); $this->pinbaService->stopTimer($pinbaTimer);
ãã³ããµãŒãã¹
public function startTimer(array $tags) { if (!$this->isPinbaInstalled) { return null; } $timerId = 't' . ++$this->incr; $this->timers[$timerId] = pinba_timer_start($tags); return $timerId; } public function stopTimer($timerId) { if ($this->isPinbaInstalled && isset($this->timers[$timerId])) { pinba_timer_stop($this->timers[$timerId]); unset($this->timers[$timerId]); } }
次ã«ãPinbaããŒã¿ããŒã¹ã«ãŠãŒã¶ãŒããŒãã«ãäœæããã³ã¡ã³ãã䜿çšããŠãšã³ãžã³ã«æ ŒçŽããå 容ã説æããŸãã
ããšãã°ãmemcachedã®äœ¿çšã説æããã¡ããªãã¯ãä¿åããããŒãã«ã¯æ¬¡ã®ããã«ãªããŸãã
CREATE TABLE `tag_report_memcached_method_namespace` ( `script_name` varchar(128) DEFAULT NULL, `memcached` varchar(64) DEFAULT NULL, `method` varchar(64) DEFAULT NULL, `namespace` varchar(64) DEFAULT NULL, `req_count` int(11) DEFAULT NULL, `req_per_sec` float DEFAULT NULL, `hit_count` int(11) DEFAULT NULL, `hit_per_sec` float DEFAULT NULL, `timer_value` float DEFAULT NULL, `timer_median` float DEFAULT NULL, `index_value` varchar(256) DEFAULT NULL ) ENGINE=PINBA DEFAULT CHARSET=latin1 COMMENT='tagN_report:memcached,method,namespace';
ãããŠ-ã¢ããªã±ãŒã·ã§ã³ã®I / Oãã©ã¡ãŒã¿ã«é¢ããã¡ããªãã¯ãä¿åããããã®ããŒãã«ïŒ
CREATE TABLE `tag_report_group_method` ( `script_name` varchar(128) DEFAULT NULL, `group` varchar(64) DEFAULT NULL, `method` varchar(64) DEFAULT NULL, `req_count` int(11) DEFAULT NULL, `req_per_sec` float DEFAULT NULL, `hit_count` int(11) DEFAULT NULL, `hit_per_sec` float DEFAULT NULL, `timer_value` float DEFAULT NULL, `timer_median` float DEFAULT NULL, `index_value` varchar(256) DEFAULT NULL ) ENGINE=PINBA DEFAULT CHARSET=latin1 COMMENT='tag2_report:group,method';
ãèªèº«ãžã®æ³šæïŒæ¬¡åãååãšããŠäºçŽæžã¿ã®SQLèªïŒã°ã«ãŒãã...ïŒã䜿çšããªãã§ãã ããã
ãããã®ããŒãã«ã«ãããããšãã°ãç¹å®ã®ã«ãŒãã®ãã¹ãŠã®I / Oæäœã«é¢ãã詳现ãªçµ±èšãååŸã§ããŸãã
mysql> SELECT `group`, SUM(req_count) AS req, AVG(timer_median) AS timer_median, SUM(timer_value)/SUM(hit_count) AS tph, SUM(timer_value)/SUM(req_count) AS tpr, SUM(timer_value) AS timer_total FROM tag_report_group_method WHERE script_name='[PROD]video_item' AND `group` != "int_api" GROUP BY `group` ORDER BY timer_total DESC;
ã°ã«ãŒã | å¿ é | timer_median | tph | tpr | timer_total |
---|---|---|---|---|---|
mysql | 118124 | 0.009819403290748596 | 0.003329653064723691 | 0.05909533790217434 | 6980.5776943564415 |
memcached | 188049 | 0.00976656749844551 | 0.0003179184672595343 | 0.01067464985796328 | 2007.3572311401367 |
åŒŸæ§ | 32049 | 0.011334048118442297 | 0.016838098360988627 | 0.026841974640797184 | 860.2584452629089 |
ã¬ãã£ã¹ | 48999 | 0.009611431136727333 | 0.011986066101148827 | 0.012204265879965226 | 597.9968238524161 |
Dmx | 61436 | 0.009767306968569756 | 0.0016191925102048436 | 0.0073448760845254615 | 451.23980712890625 |
ã«ãŒã« | 24882 | 0.06987743234882753 | 0.008533559191620778 | 0.008533559191620778 | 212.3320198059082 |
ã¯ã¬ã³ã° | 50 | 0.12915635108947754 | 0.1352721940790749 | 1.0902938842773438 | 54.51469421386719 |
Facebook API | 22 | 0.5436198115348816 | 0.5515929568897594 | 0.5515929568897594 | 12.135045051574707 |
ã©ã€ãAPI | 1 | 0.01953125 | 0.0049230000004172325 | 0.0049230000004172325 | 0.0049230000004172325 |
MySQL SELECTã®è©³çŽ°ïŒ
mysql> SELECT mysql, method, timer_value, timer_value/req_count AS avg_timer_value, hit_count/req_count AS avg_op_count, timer_value/hit_count AS avg_op_value, hit_count, req_count FROM tag_report_mysql_method WHERE method='select' AND script_name='[PROD]video_item' AND req_count > 200 ORDER BY avg_op_count DESC LIMIT 4;
mysql | æ¹æ³ | timer_value | avg_timer_value | avg_op_count | avg_op_value | hit_count | req_count |
---|---|---|---|---|---|---|---|
ãã㪠| éžæãã | 3971.99 | 0.10144789052722653 | 16.6880 | 0.006079103953896177 | 653384 | 39153 |
video_view_summary | éžæãã | 264.027 | 0.007824405328308366 | 12.6024 | 0.000620868312581275 | 425254 | 33744 |
static_asset_video_sprite | éžæãã | 15.4905 | 0.022613802443455604 | 7.6496 | 0.0029561936400318875 | 5240 | 685 |
video_has_repost | éžæãã | 1468.93 | 0.027541118671605483 | 6.7955 | 0.0040528553527407 | 362444 | 53336 |
éžæã¯ãšãªã®äœ¿çšã远跡ããŸãã ãããã®æ°ãéåžžã«å€§ãããªããšããã£ãã·ã¥ãéå¹çã«ãªãå¯èœæ§ããããŸãã
è¿œå æ©èœ
ãŸããPinbaã®å¥ã®èå³æ·±ãæ©èœ-ã¿ã°ã䜿çšããŠãç°ãªãã¿ã€ãã®ãªã¯ãšã¹ããåºå¥ã§ããŸãã èŠæ±ã«ã¯ãå®çŸ©ããã¿ã°ãã¿ã°ä»ããããŸãã ããšãã°ã次ã®ã¯ãšãªã«ã¿ã°ã䜿çšããŸãã
圢åŒïŒå¿ç圢åŒïŒhtmlãrssãatomã...ïŒ;
site_contentïŒãµã€ãã®ã³ã³ãã³ãã®èšèªïŒenãdeãfrãjpãruã...ïŒ;
ãããïŒå®éã®ã¯ã©ã€ã¢ã³ããŸãã¯ãããïŒ ïŒã¯ã/ãããïŒ;
authïŒãŠãŒã¶ãŒèªèšŒïŒãã°ã€ã³ïŒïŒ ïŒã¯ã/ãããïŒ;
- ãããã€ããŒïŒPHPã®ããŒãžã§ã³éã®éããå€æããŸãïŒæšæºã®PHPãŸãã¯HHVMãªã©ã
次ã«ãããŒãã«ãäœæãããšã³ãžã³ã®ã³ã¡ã³ãã§äœãã©ãã«ä¿åãããã瀺ããŸãã ããšãã°ãreport_by_script_nameã«åºã¥ããŠããŒãã«ãäœæã§ããŸãããã®ããŒãã«ã§ã¯ããªã¯ãšã¹ãã¿ã°ãããã®å€ãnoã§ããªã¯ãšã¹ãã¿ã°èªèšŒã®å€ãnoã®PHPããã»ã¹ã®ããŒã¿ã®ã¿ããšã³ãžã³ã«ãã£ãŠä¿åãããŸãã èšãæããã°ããããã¯ãã°ã€ã³ããŠããªãå®éã®ãŠãŒã¶ãŒã§ã-ããã¯äžè¬çãªç¶æ³ã§ãã
CREATE TABLE `auth_no_bot_no_report_by_script_name` ( `req_count` int(11) DEFAULT NULL, `req_per_sec` float DEFAULT NULL, ... `req_time_median` float DEFAULT NULL, `index_value` varchar(256) DEFAULT NULL ) ENGINE=PINBA DEFAULT CHARSET=latin1 COMMENT='report1::tag.auth=no,tag.bot=no';
ãããã
ãã³ãã¯ãåä¿¡ããã¡ããªãã¯ãããã1ã2åã§ä¿åããŸãã ãããã£ãŠãã°ã©ããäœæããã«ã¯ãããŒã¿ãå€éšãªãœãŒã¹ã«çµ±åããå¿ èŠããããŸãã ããã§ã¯ãMySQLãã©ã°ã€ã³ãšãã¢ã«ãªã£ãcollectdã䜿çšããŸãã ãã®å Žåãã¯ãšãªã¯PinbaããŒã¿ããŒã¹ã«å¯ŸããŠè¡ãããçµæã¯Whisperã«ä¿åãããŸãã 次ã«ãWhisperãGraphiteãšTesseraãŸãã¯Grafanaã§ã¯ãšãªããŸãã
ãããã«
å€ãPHPã¢ããªã±ãŒã·ã§ã³ã§Pinbaã䜿çšãããšã次ã®ããšãå¯èœã«ãªããŸããã
ã¢ããªã±ãŒã·ã§ã³ã®åé¡ã®èããããåå ãæ€åºããŸãã
ãšã©ãŒãæ€åºããŸãïŒäžéšã®ã«ãŒãã§äžåœã«å€æ°ã®ãµãŒããŒèŠæ±ïŒã
- ãã£ãŒããäœæããã¢ã©ãŒããèšå®ããŠããªãªãŒã¹åŸã®ããã©ãŒãã³ã¹äœäžã®ã€ã³ã·ãã³ããæ€åºããŸãã
Pythonãããžã§ã¯ãã§ãPinbaã䜿çšããŠããŸãã Pynbaã®ç¹æ®ããŒãžã§ã³ã¯ãæ§åïŒçŸåšã¯ååïŒã®johnnooneã«ãã£ãŠäœæãããŸããã
Pinbaã®äœ¿çšäžã«æ°ã¥ããå¯äžã®ããšïŒæ¡åŒµæ©èœã¯ãå€ããªã¯ãšã¹ãã«é¢ããæ å ±ãåžžã«ãå¿ãããããã§ã¯ãããŸããã æã ãã¬ããŒãããŒãã«ã«ã¯å¹»ã®çµæãå«ãŸããŸã-1å以äžåã«çºçããã¢ã¯ãã£ããã£ã«é¢ããããŒã¿ã Pinbaã䜿çšããŠäœããçºçããŠããªãããšã確èªããå¿ èŠãããå ŽåïŒéåžžãæ°ããã³ãŒããå®çšŒåç°å¢ã«å±éããåŸïŒãããã¯åé¡ã«ãªãå¯èœæ§ããããŸãã ããã¯ããšã©ãŒã®åå ãã³ãŒãã«ãªãæ°å°ãªãã±ãŒã¹ã®1ã€ã§ãã
ãããä¿®æ£ããæãç°¡åãªæ¹æ³ã¯ãPinbaãšã³ãžã³ãåèµ·åããããšã§ãã ãã®çµæãã°ã©ãã«å°ããªã®ã£ããã衚瀺ãããŸããããã¡ã³ãã ããŒã¿ã¯ééããªãæ¶ããŸãã ïŒæ³šïŒTRUNCATE TABLEã¯MySQLãšã³ãžã³ã§ã¯ãªããããé©åã§ã¯ãããŸãããïŒ
PinbaãŠãŒã¶ãŒåãã®æçšãªãªãœãŒã¹
- GitHubïŒ https : //github.com/tony2001/pinba_engine
- ããã¥ã¡ã³ãïŒ https : //github.com/tony2001/pinba_engine/wiki
- Pinbaã䜿çšããPHPã³ãŒãããã©ãŒãã³ã¹ã®ç£èŠïŒ
https://habrahabr.ru/company/badoo/blog/149695/