Datasource Articles
2 articles about Datasource. Explore Spring Boot implementation, design, and operations across related topics.
-
HikariCP Pool Sizing for Multiple DataSources in Spring Boot
This article explains how to design HikariCP pool sizes when working with multiple DataSources in a primary/replica or multi-DB setup, covering how to work backward from the DB-side max_connections budget and allocate it across each maximumPoolSize, with concrete calculation steps and application.yml configuration examples.
-
How to Work with Multiple DataSources in Spring Boot - Read/Write Separation and AbstractRoutingDataSource
A guide to implementing multiple DataSources in Spring Boot, covering two patterns: a static multi-DataSource configuration and dynamic read/write separation using AbstractRoutingDataSource. It walks through how to route to the primary/replica triggered by @Transactional(readOnly=true), organized with copy-and-run code.