Tag: spring-boot
All the articles with the tag "spring-boot".
-
Spring Boot #6 — Looking Into JVM Memory and GC, and a Connection Pool Bottleneck Experiment
I watched the heap with jps and jstat, and printed out GC logs. From the heap structure split into Young/Old, to the contrast with C's manual memory management, to reproducing a bottleneck where reducing the DB connection pool to 1 turned a 2-second task into a 6-second one.
-
Spring Boot #5 — Servlets, Embedded Tomcat, Thread Pools, and the WAS Layer
Every time I fired off a curl request, a new thread got added. Here's a breakdown of how Tomcat pre-hires workers and assigns requests to them, the balance between thread pools and DB connection pools, and the confusing dual identity of 'Apache'.
-
Spring Boot #4 — Transactions, Relationships, N+1, and Fetch Join
I connected entities with @ManyToOne and ran a full query, and instead of 1 query, 6 came out. I fixed the N+1 problem caused by LAZY loading with fetch join, and worked through the atomicity and dirty checking of @Transactional.
-
Spring Boot #3 — Connecting PostgreSQL with JPA · CRUD with Entities and Repositories
I replaced the in-memory List CRUD with an actual PostgreSQL setup. From build.gradle dependencies to application.properties, from record to @Entity, why JpaRepository is an empty interface but CRUD still works, and the dividend of layer separation where I didn't change a single line in the controller.