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.