druidÊý¾Ý¿âÅþÁ¬³ØÉèÖÃÏê½â
ÅþÁ¬³ØÉèÖÃÑ¡ÏîÏê½â£º½¹µãÉèÖ㺳õʼÅþÁ¬Êý: initialsize×îС¿ÕÏÐÅþÁ¬Êý: minidle×î´óÔ˶¯ÅþÁ¬Êý: maxactive×î´óÆÚ´ýʱ¼ä: maxwaitfilter ÉèÖãºstatfilter: ͳ¼ÆÐÅÏ¢ÍøÂçwallfilter: sql Óï¾ä¼à¿Ølog4jfilter: ÈÕÖ¾Êä³ö×Ô½ç˵ filter: ʵÏÖÌض¨¹¦Ð§¼à¿ØÉèÖãºÔ˶¯ÅþÁ¬Êý: numactive¿ÕÏÐÅþÁ¬Êý: numidleÆÚ´ýÅþÁ¬µÄÏß³ÌÊý: numwait½¨ÉèÅþÁ¬µÄÏß³ÌÊý: numthreads×î¼Ñʵ¼ù£ºÆ¾Ö¤
Druid Êý¾Ý¿âÅþÁ¬³ØÉèÖÃÏê½â
¼ò½é
Druid ÊÇ°¢Àï°Í°Í¿ªÔ´µÄ¸ßÐÔÄÜ Java Êý¾Ý¿âÅþÁ¬³Ø£¬ÒÔÆä¸ßÐÔÄÜ¡¢¸ß¿É¿¿ÐÔºÍÒ×ÓÃÐÔÖø³Æ¡£±¾ÎĽ«ÏêϸÏÈÈÝ Druid ÅþÁ¬³ØµÄÉèÖÃÑ¡Ï×ÊÖúÄúÓÅ»¯ÅþÁ¬³ØµÄÐÔÄܺÍÎȹÌÐÔ¡£
½¹µãÉèÖÃÑ¡Ïî
- initialSize£ºÅþÁ¬³ØÆô¶¯Ê±½¨ÉèµÄ³õʼÅþÁ¬Êý£¬Ä¬ÈÏֵΪ 0¡£
- minIdle£ºÅþÁ¬³ØÖÐ×îÉٵĿÕÏÐÅþÁ¬Êý£¬Ä¬ÈÏֵΪ 0¡£
- maxActive£ºÅþÁ¬³ØÖÐÔÊÐíµÄ×î´óÔ˶¯ÅþÁ¬Êý£¬Ä¬ÈÏֵΪ 8¡£
- maxWait£º»ñÈ¡ÅþÁ¬Ê±£¬×î¶àÆÚ´ýʱ¼ä£¨ºÁÃ룩£¬Ä¬ÈÏֵΪ -1£¨ÎÞÏÞÆÚ´ý£©¡£
Filter ÉèÖÃÑ¡Ïî
Druid ÅþÁ¬³ØÖ§³ÖÖÖÖÖ Filter£¬ÓÃÓÚÔöÇ¿ÅþÁ¬³ØµÄ¹¦Ð§¡£ÒÔÏÂÊÇһЩ³£ÓÃµÄ Filter£º
- StatFilter£ºÍøÂçÅþÁ¬³ØµÄͳ¼ÆÐÅÏ¢£¬ÈçÅþÁ¬Êý¡¢Ô˶¯ÅþÁ¬ÊýºÍ¿ÕÏÐÅþÁ¬Êý¡£
- WallFilter£º¼à¿Ø SQL Óï¾ä²¢¼Í¼ִÐÐʱ¼ä£¬ÓÐÖúÓÚÆÊÎöÊý¾Ý¿âÐÔÄÜ¡£
- Log4jFilter£º½«ÅþÁ¬³ØÈÕÖ¾Êä³öµ½ Log4j ÈÕ־ϵͳ¡£
×Ô½ç˵ Filter
Äú¿ÉÒÔ½¨Éè×Ô¼ºµÄ Filter À´ÊµÏÖÌض¨µÄ¹¦Ð§£¬Ö»ÐèʵÏÖ Filter ½Ó¿Ú¼´¿É¡£ÀýÈ磬¿ÉÒÔ½¨Éè×Ô½ç˵ Filter À´ÏÞÖÆÌض¨Óû§»òÓ¦ÓóÌÐòµÄÅþÁ¬Êý¡£
¼à¿ØÉèÖÃÑ¡Ïî
Druid ÅþÁ¬³ØÌṩÁËһϵÁмà¿ØÖ¸±ê£¬Äú¿ÉÒÔͨ¹ý JMX »ò RESTful API »á¼ûÕâЩָ±ê¡£ÒÔÏÂÊÇÒªº¦µÄ¼à¿ØÑ¡Ï
- numActive£ºÔ˶¯ÅþÁ¬Êý¡£
- numIdle£º¿ÕÏÐÅþÁ¬Êý¡£
- numWait£ºÕýÔÚÆÚ´ýÅþÁ¬µÄÏß³ÌÊý¡£
- numThreads£º½¨ÉèÅþÁ¬µÄÏß³ÌÊý¡£
×î¼Ñʵ¼ù
ÉèÖà Druid ÅþÁ¬³Øʱ£¬½¨Òé×ñÕÕÒÔÏÂ×î¼Ñʵ¼ù£º
- ƾ֤ÏÖʵÐèÇóÉèÖÃÅþÁ¬³Ø¾Þϸ£¬×èÖ¹½¨Éè¹ý¶àµÄ¿ÕÏÐÅþÁ¬»òÏÞÖÆÔ˶¯ÅþÁ¬¡£
- ʹÓà Filter ¼à¿ØÅþÁ¬³Ø²¢ÆÊÎöÊý¾Ý¿âÐÔÄÜ¡£
- °´ÆÚ¼ì²éÅþÁ¬³ØµÄ״̬²¢Æ¾Ö¤ÐèÒª¾ÙÐе÷½â¡£
- ˼Á¿Ê¹ÓøºÔØƽºâÆ÷½«ÅþÁ¬ÇëÇóÂþÑܵ½¶à¸öÊý¾Ý¿âЧÀÍÆ÷ÉÏ¡£
ÒÔÉϾÍÊÇdruidÊý¾Ý¿âÅþÁ¬³ØÉèÖÃÏê½âµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡