005-spring Boot 2.0.4-JDBC Upgrade

Source: Internet
Author: User

I. Overview

Springboot2 default database connection pool selected HIKARICP Why choose HIKARICP Reason one, code quantity reason two, word of mouth reason three, speed reason four, stability reason five, Reliability HIKARICP Why so fast optimization and refinement of bytecode better concurrent collection class implementations use Fastlist overrides ARRAYLISTHIKARICP

Second, Spring Boot 2 default database connection pool selected HIKARICP

The default database connection pool is changed from Tomcat to HIKARICP. If you use Spring.datasource.type to force a Hikari connection pool in a Tomcat application, you can remove this override.

Third, why Choose HIKARICP

HIKARICP is a database connection pool of a rising star, known as the best performance, can be perfect pk off the other connection pool, is a high-performance JDBC connection pool, based on BONECP do a lot of improvement and optimization. Its author also has another open source work-the high-performance JSON parser Hikarijson.

See more performance comparisons

HIKARICP can provide monitoring functions, such as metrics, you can see the author of this article "Ray Chaser series" HIKARICP Connection pool monitoring indicators combat.
In addition, monitoring aspects, skywalking, pinpoint, mycat these agents can also be done, after service mesh popularization more can be monitored, such as sharding-jdbc can also do monitoring, Datamesh, Sidecar can also be monitored.

Configuration

# Hikari'll use the above plus the following to setup connection Poolingspring.datasource.type=Com.zaxxer.hikari.HikariDataSourcespring.datasource.hikari.minimum-idle=5Spring.datasource.hikari.maximum-pool-size= theSpring.datasource.hikari.auto-commit=trueSpring.datasource.hikari.idle-timeout=30000Spring.datasource.hikari.pool-name=DatebookHikariCPspring.datasource.hikari.max-lifetime=1800000spring.datasource.hikari.connection-timeout=30000spring.datasource.hikari.connection-test-query=select1

Of

005-spring Boot 2.0.4-JDBC Upgrade

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.