ã¿ã¤ãã«ãé·ãã§ãããã¤ã¾ããããããã®ãGoã§æ¸ãã¦ãã¾ãã
(hydraã£ã¦ããã®ã¯é¦ã®ãã£ã±ãããã¢ã¬ã§ãããã³ã°ããã©ã¨ã)
ç¹å¾´
- fluent-agent-lite çãªãã¡ã¤ã«ã tail -F ã®ããã«è¿½å°¾ããæ©è½
- 1ããã»ã¹ã§è¤æ°ãã¡ã¤ã«ã追跡ã§ãã¾ã
- in_tail ã®ãã㪠pos_file, parse æ©è½ã¯ä»ã®ã¨ããããã¾ãã
- in_forward ç㪠TCP 㧠msgpack å½¢å¼ã®ãã°ãåãåãæ©è½
- ä¸è¨ããå
¥åããããã°ã fluentd ã«éä¿¡ãã out_forward çãªæ©è½
- è¤æ°ã®éä¿¡å ãç»é²ããprimary ã® fluentd ããã¦ã³ããã次㮠fluentd ã«éä¿¡ã試ã¿ã¾ã
- éä¿¡å ããã¦ã³ãã¦ãå ´åã¯ãã¡ã¤ã«ã®è¿½å°¾ãé²ããªãã®ã§ãå é¨ãããã¡ãæºã¾ããã¨ã¯ããã¾ãã
- (in_forward ã®ãããã¡ã¯æº¢ãããã¨ãããã¾ã)
- åä½ç¶æ³ã JSON ã§è¿ã stats monitor httpd
- ç£è¦ã«ä¾¿å©
- Goã§æ¸ããã¦ããã®ã§ãã¤ããª1ãã¡ã¤ã«(+è¨å®ãã¡ã¤ã«)ã§åä½ãã¾ã
- daemonize æ©æ§ã¯ãªãã®ã§ãä½ããã® supervisor (daemontools, supervisord, runitãªã©) çµç±ã§åä½ãããå¿ è¦ã¯ããã¾ã
- Windowsã§ãåãã¾ãã
éçºèæ¯
ããã¾ã§èªåã®ç°å¢ã§ã¯ãWeb(App)ãµã¼ãããéç´ fluentd ã¸ã®ãã°è»¢éã«ã¤ãã¦
- ãã¡ã¤ã«è¿½å°¾ã«ã¯ fluent-agent-lite
- ã¢ããªã±ã¼ã·ã§ã³ãããã°ãåãä»ããã®ã¯ fluentd (in_forward)
ãå©ç¨ãã¦ãã¾ããã
fluent-agent-lite ã§ã¯ 1ããã»ã¹ã§ 1ãã¡ã¤ã«ãæ±ããããå¤æ°ã®ãã¡ã¤ã«ã追尾ããå ´åã«ã¯ãã¡ã¤ã«æ°å fluent-agent-lite + tail ã®ããã»ã¹ãå¿
è¦ã«ãªãã¾ãã
ããèªä½ã¯ã¡ã¢ãªæ¶è²»ãå¤å°å¤§ãããªããããã§ãã»ã©åé¡ã§ã¯ãªãã®ã§ãã
- agent-lite ã¯èµ·åæã«ãã¡ã¤ã«ãåå¨ããªãã¨ããã»ã¹ãçµäºãã¦ãã¾ã
- ããã»ã¹ã®èµ·åé ã«ããã追尾ããããã°ãã¾ã ãªããã¨ãããã¨ãããå¾ã
- agent-lite ããã»ã¹æ°ã§ç£è¦ãè¡ãã¨ã追跡ãããã¡ã¤ã«æ°ãå¢ãããã¨ã«ç£è¦è¨å®ã追å¾ããå¿ è¦ããã
ã¨ããç¹ãå¤å°ä¸ä¾¿ã ã£ãã®ã¨ãèªåã®ã¦ã¼ã¹ã±ã¼ã¹çã«ã¯ in_forward ã1ããã»ã¹ã§è³ããã便å©ããªãã¨ããã®ã¨ããã¨åç´ã«ä½ã£ã¦ã¿ããã£ãããã§ãã
ã追è¨ã
fluent-agent-lite ã«ãã¡ã¤ã«ããªãã¦ãèµ·åãã¦ããããªãã·ã§ã³ãã?(åã«è¶³ãã) > URL
Go ã§ã® fluentd 代æ¿å®è£
ã«ã¤ãã¦ã¯ Ik ãæ¢ã«ããã¾ãããæ¬å®¶ fluentd ã®ããã« plugin ã¢ã¼ããã¯ãã£ã«ãªã£ã¦ãã¦éåãªã®ã¨ããã¨ããã¥ã¡ã³ãããªãã£ãã®ã§æãåºããã«ãã¨ããæãã§ãã
ãã ããin_forward æ©è½ã®å®è£
ã«ããã£ã¦ãIkããã³ã¼ããé ããé¨åãå¤ãããã¾ãããããã¨ããããã¾ãã
ããã©ã¼ãã³ã¹
fluentd (in_tail+out_forward), fluent-agent-lite, fluent-agent-hydra ã®3è ã§ãfluentd-benchmark / one_forward ã®ãã³ããã¼ã¯ãåãã¾ããã
ãã³ããã¼ã¯çµæã¯ãã¡ãã§ã https://github.com/fujiwara/fluent-agent-hydra#benchmark
ãã£ã¨ã¾ã¨ããã¨ãé常使ç¨ããé å (ç§éæ°ç¾ãæ°ä¸lines/secã¾ã§) ã«ããã¦
- CPU使ç¨ç㯠lite < hydra < fluentd
- ã¡ã¢ãªä½¿ç¨é㯠hydra < lite << fluentd
ã¨ããçµæã§ãã
ãã¼ã¯æ§è½ã§ã¯ lite ã 580,000/secãhydraã§ãããã¡ãµã¤ãºã¨GOMAXPROCSã調æ´ããã° 700,000/sec ã¾ã§ããã¾ããããç§é50ä¸è¡ãã¡ã¤ã«ã«ãã°ãæ¸ã人ã¯ããªãã¨æãã¾ãã®ã§ããã¾ãæå³ã®ããçµæã§ã¯ãªãã§ããã
ç¾ç¶
æ°æ¥éãææç°å¢ã§ç¹ã«ã¡ã¢ãªãªã¼ã¯ããã¼ãã¼ãæã®åããã¼ãããªã快調ã«åãã¦ããã®ã§ãä¸å¿ä½¿ããã¬ãã«ã§ã¯ãªããã¨æãã¾ãããαçç¶æ ã§ãã
ä»å¾ãæ¬çªã«å°å
¥ãé²ãã¦å®å®ããããã¨æãã¾ãã
バイナリリリースもありますã®ã§ãã試ãããã ããã°å¹¸ãã§ãã