alibaba/druid

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

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 24 minutes ago
Added to GitGenius on January 3rd, 2025
Created on November 3rd, 2011
Open Issues & Pull Requests: 2,332 (+0)
GitHub issues: Enabled
Number of forks: 8,561
Total Stargazers: 28,172 (+0)
Total Subscribers: 1,678 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 117.9 days
Mean response time: 494.7 days
90th percentile: 1779.8 days
Tracked items: 497

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 100% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. 67% of tracked open issues have had no activity in three months, so the open count overstates what is actively being worked. Only 5% of issues opened in the past year have been closed. Three people close 80% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 1,737
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 2,227 days
Stale 30+ days: 1,732
Stale 90+ days: 1,713

Recent activity

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

Top labels

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

Most active issues this week

No issue events were indexed in the last 7 days.

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.

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.