Spring Boot

Performance Optimization

Performance optimization: profiling, caching, lazy loading, pagination, connection pooling, DB indexing

30 คำถามสัมภาษณ์·
Senior
1

What is HikariCP in the context of Spring Boot?

คำตอบ

HikariCP is the default connection pool manager in Spring Boot since version 2.0. It offers exceptional performance through an optimized implementation (low overhead, efficient concurrency management) and is widely considered the fastest connection pool on the market. Spring Boot uses it automatically when spring-boot-starter-data-jpa or spring-boot-starter-jdbc is present in dependencies.

2

Which HikariCP parameter defines the maximum number of connections in the pool?

คำตอบ

The maximumPoolSize parameter defines the maximum number of connections (active and idle) that HikariCP will maintain in the pool. The recommended value by HikariCP is generally based on the formula: connections = ((core_count * 2) + effective_spindle_count), often between 10 and 20 for typical applications. A value too high can saturate the database, while a value too low can cause connection waits.

3

What is the difference between maximumPoolSize and minimumIdle in HikariCP?

คำตอบ

maximumPoolSize defines the total maximum number of connections (active and idle) in the pool, while minimumIdle defines the minimum number of idle connections that HikariCP maintains permanently. HikariCP recommends not setting minimumIdle and letting maximumPoolSize manage the pool (default behavior: minimumIdle = maximumPoolSize), as the pool automatically adjusts based on load to optimize performance.

4

What is the formula recommended by HikariCP to calculate maximumPoolSize?

5

Which HikariCP parameter controls the maximum wait time to obtain a connection from the pool?

+27 คำถามสัมภาษณ์

หัวข้อสัมภาษณ์ Spring Boot อื่นๆ

Spring Core - IoC & DI

Junior
22 คำถาม

Spring Boot Auto-Configuration

Junior
20 คำถาม

Spring Boot Starters

Junior
18 คำถาม

Application Properties & YAML

Junior
16 คำถาม

Logging with SLF4J & Logback

Junior
20 คำถาม

Spring Boot DevTools

Junior
15 คำถาม

Spring MVC Basics

Mid-Level
20 คำถาม

Spring REST Controllers

Mid-Level
20 คำถาม

Request & Response Handling

Mid-Level
20 คำถาม

Exception Handling

Mid-Level
25 คำถาม

Bean Validation

Mid-Level
25 คำถาม

Spring Data JPA Basics

Mid-Level
25 คำถาม

JPA Entities & Relationships

Mid-Level
30 คำถาม

JPA Queries

Mid-Level
30 คำถาม

Spring Data Repositories

Mid-Level
25 คำถาม

Spring Security Basics

Mid-Level
25 คำถาม

Spring Boot Actuator

Mid-Level
20 คำถาม

Unit Testing with JUnit & Mockito

Mid-Level
30 คำถาม

Spring Boot Testing

Mid-Level
30 คำถาม

Profiles & Environment

Mid-Level
20 คำถาม

RestTemplate & WebClient

Mid-Level
24 คำถาม

Async & Scheduling

Mid-Level
25 คำถาม

Caching with Spring

Mid-Level
25 คำถาม

Spring WebFlux (Reactive)

Mid-Level
25 คำถาม

Spring Transactions

Senior
30 คำถาม

Advanced Authentication & Authorization

Senior
30 คำถาม

JWT & Stateless Security

Senior
20 คำถาม

OAuth2 & Authorization Server

Senior
20 คำถาม

Spring Boot & Docker

Senior
19 คำถาม

Microservices with Spring

Senior
25 คำถาม

Spring Cloud Config

Senior
19 คำถาม

GraalVM Native Images

Senior
20 คำถาม

เชี่ยวชาญ Spring Boot สำหรับการสัมภาษณ์ครั้งถัดไป

เข้าถึงคำถามทั้งหมด flashcards แบบทดสอบเทคนิค แบบฝึกหัด code review และตัวจำลองสัมภาษณ์

เริ่มใช้ฟรี