alibaba/druid

Description: 阿里云计算平台DataWorks(https://help.aliyun.com/document_detail/137663.html) 团队出品,为监控而生的数据库连接池

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 55 minutes ago
Added to GitGenius on January 3rd, 2025
Created on November 3rd, 2011
Open Issues & Pull Requests: 2,321 (+0)
Number of forks: 8,574
Total Stargazers: 28,180 (+0)
Total Subscribers: 1,674 (+0)

Issue Activity (beta)

Open issues: 1,731
New in 7 days: 2
Closed in 7 days: 0
Avg open age: 2,234 days
Stale 30+ days: 1,724
Stale 90+ days: 1,720

Recent activity

Opened in 7 days: 1
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 1

Top labels

  • Bug (351)
  • Question (126)
  • Need Infos (85)
  • Enhancement (46)
  • Fixed (12)
  • New Feature (11)
  • SQLParser (11)
  • Alibaba (6)

Repository Insights (GitGenius)

Median issue/PR response: 59.2 days
Mean response time: 494.0 days
90th percentile: 1779.8 days
Tracked items: 536

Most active contributors

Detailed Description

Druid is an open-source high-performance database connection pool and SQL parser developed by Alibaba's DataWorks team. It integrates JDBC connection pooling, SQL parsing and analysis, security protection, and monitoring statistics into a unified platform, positioning itself as one of the most comprehensive database middleware solutions in the Java ecosystem.

The repository's core functionality spans multiple domains. The JDBC connection pool implementation, called DruidDataSource, provides high-performance and monitorable connections with advanced features including physical connection preheating, prepared statement caching, and keep-alive mechanisms. The SQL parser supports 30 different SQL dialects with complete lexer, parser, and abstract syntax tree generation capabilities, enabling SQL formatting, rewriting, and analysis. Security is handled through a WallFilter that uses AST-based SQL firewall protection to intercept SQL injection attacks and dangerous operations. Real-time monitoring and statistics are collected through a StatFilter that tracks SQL execution metrics and connection pool status, with results accessible through a web monitoring interface. The architecture uses a pluggable Filter-Chain design that allows extensions for logging, encryption, and statistical analysis. Spring Boot integration is provided through dedicated starters for versions 2.x, 3.x, and 4.x. High availability features are supported via HighAvailableDataSource, which handles multi-datasource load balancing, health checks, and failover mechanisms.

The SQL dialect support is extensive, covering mainstream relational databases like MySQL, PostgreSQL, Oracle, SQL Server, DB2, H2, and Informix. It also supports Chinese domestic databases including DM, Oscar, and GaussDB, analytical and MPP databases such as ClickHouse, Doris, StarRocks, Teradata, and Redshift, cloud-native and data warehouse systems like BigQuery, Snowflake, Synapse, Hologres, and ODPS, as well as compute engines including Hive, Spark, Presto, Impala, Athena, Blink, and Databricks.

According to GitGenius activity tracking, the repository shows significant engagement with a median issue and pull request response latency of 1607.8 hours across 531 tracked items, though mean latency extends to 11965.6 hours indicating some longer-tail responses. The most active issue categories are bugs with 16 tracked items, questions with 10 items, and enhancements with 3 items. Primary contributors include lizongbo with 301 recorded events, wenshao with 67 events, and liuyandeng with 21 events. The repository's contributor network overlaps with major projects including Microsoft's VSCode and TypeScript implementations as well as the Rust language project, suggesting influence across diverse technology ecosystems.

The project is written in Java and maintains comprehensive documentation covering architecture overview, connection pool configuration and tuning, SQL parser usage, dialect support matrices, Filter mechanisms, SQL firewall configuration, monitoring setup, high availability datasource configuration, and Spring Boot integration. The codebase requires Java 8 or higher and Apache Maven 3.6 or later for building from source. Druid is distributed under the Apache License 2.0.

druid
by
alibabaalibaba/druid

Repository Details

Fetching additional details & charts...