Snippet Java
6 snippet
-
2026-07-19 · Menengah · Performance
Spring @Async config dengan ThreadPoolTaskExecutor
Setup @Async di Spring Boot — bounded thread pool, queue capacity, exception handler. Bukan asal-asalan pakai default.
-
2026-07-09 · Lanjut · Performance
Spring + Resilience4j circuit breaker
Circuit breaker Resilience4j melindungi service dari cascading failure — kalau downstream lambat, fail fast bukan thread pool habis.
-
2026-07-08 · Menengah · Performance
HikariCP pool tuning untuk Postgres
Tune HikariCP pool size, timeout, dan leak detection untuk Postgres production. Formula sizing yang sering kelewat.
-
2026-07-07 · Lanjut · Auth
Spring OAuth2 Resource Server JWT setup
Setup Spring Boot sebagai OAuth2 Resource Server — verifikasi JWT dari Keycloak / Auth0 / IDP internal, role-based access control.
-
2026-07-06 · Menengah · Database
JPA keyset pagination untuk large table
Keyset pagination dengan JPA / Hibernate — konstan latency di tabel 100 juta row. Stop pakai OFFSET di production.
-
2026-07-05 · Lanjut · Performance
Spring Boot virtual thread configuration
Aktifkan virtual thread di Spring Boot 3.2+ — handle 10rb concurrent request tanpa thread pool exhaustion. JDK 21 Project Loom.