#Spring Boot
26 posts
-
7 Practical java.util.concurrent Patterns: From Thread Pools to Concurrency Control
ExecutorService, CompletableFuture, CountDownLatch, ConcurrentHashMap, BlockingQueue, Semaphore, ReentrantLock — 7 commonly used java.util.concurrent classes with real-world patterns and working code.
-
FCFS Load Test Retrospective: Things Easy to Miss in Practice
Problems we hit while k6-testing 4 FCFS strategies — Rate Limiter conflicts, queue over-counting bugs. Plus 4 ways to isolate FCFS APIs from regular APIs in production: separate DataSource, Redis offloading, service separation, and Bulkhead pattern.
-
Implementing FCFS with Tokens: From Entry Tickets to Bot Prevention
Implements a first-come-first-served system that issues entry tokens upfront — only token holders can purchase. Covers JWT-based token design, TTL expiration strategy, and multi-layered bot prevention with Rate Limiting + CAPTCHA.
-
Implementing FCFS with Redis: From DECR to Lua Scripts
Implements a first-come-first-served stock deduction system using Redis DECR atomic operations and Lua scripts. Builds it with Spring Boot + Redisson, directly compares TPS against DB locks under identical conditions (100 stock, 100 concurrent users), and covers Redis-DB consistency and failure recovery strategies.
-
Implementing FCFS with DB Locks: From FOR UPDATE to Concurrency Testing
Implements a first-come-first-served stock deduction system using SELECT FOR UPDATE. Builds it with Spring Boot + JPA, validates data consistency with 100 concurrent requests, and identifies where DB locks hit their limits.
-
Deadlocks and Lock Strategies by Isolation Level: From Pessimistic Locks to FOR UPDATE's Limits
Real deadlock cases at each isolation level — Read Committed, Repeatable Read, and Serializable. Covers pessimistic vs optimistic locking, FOR UPDATE mechanics, and why you'll eventually need Redis.
-
A Practical Guide to HTTP Custom Headers in Production
A comprehensive guide to commonly used HTTP custom headers like X-Request-ID and X-Forwarded-For. Covers the history of the X- prefix convention, CORS implications, and Spring Boot implementation.
-
Understanding CORS: From Browser Security Policy to Spring Boot Configuration
Understand how CORS (Cross-Origin Resource Sharing) works and learn how to resolve common CORS errors in practice
-
SAML 2.0 Authentication Complete Guide: From Concepts to Microsoft Entra ID Integration
A practical guide to SAML 2.0 protocol core concepts and implementing Microsoft Entra ID (Azure AD) SAML integration with Spring Boot
-
Setting Up a Local K8s Cluster with kind
A hands-on guide to building a multi-node Kubernetes cluster locally using kind and deploying a Spring Boot application
-
Spring Boot SSO Integration Guide: OAuth2/OIDC and SAML in Practice
A practical guide to SSO integration with IdPs like Keycloak, Okta, and Azure AD using Spring Security
-
Spring Boot Practical Guide Part 7: Logging Strategy and Practice
From SLF4J, Logback, Log4j2 comparison to structured logging, MDC, and centralized log management
-
Spring Boot Practical Guide Part 6: Monitoring and Observability
Real-time system monitoring with Prometheus, Grafana, and custom metrics
-
Spring Boot Practical Guide Part 5: Database Optimization
Handling large-scale data with index design, cursor-based pagination, and Read Replicas
-
Spring Boot Practical Guide Part 4: Resilience Patterns
Building fault-tolerant systems with Circuit Breaker, Rate Limiter, and Bulkhead
-
Spring Boot Practical Guide Part 3: Event-Driven Architecture
Building a reliable event system with Kafka and the Outbox pattern
-
Spring Boot Practical Guide Part 2: Caching Strategy and Redis
A complete caching guide from Cache-Aside pattern to cache problem resolution, ready to apply in production
-
Spring Boot Practical Guide Part 1: Concurrency Control and Inventory Management
A practical guide to solving concurrency issues with atomic UPDATEs and idempotency keys
-
Spring Boot Pre-Interview Guide: Comprehensive Assignment
Spring Boot-based online marketplace REST API comprehensive assignment — from product, order, and member domain design to testing and deployment
-
Spring Boot Pre-Interview Guide Part 7: Advanced Patterns
Advanced patterns and architecture — events, async processing, file handling, and multi-module
-
Spring Boot Pre-Interview Guide Part 6: DevOps & Deployment
Deployment environment setup and CI/CD — Docker, GitHub Actions, and Actuator
-
Spring Boot Pre-Interview Guide Part 5: Security & Authentication
Authentication/authorization and security configuration — Spring Security, JWT, and role management
-
Spring Boot Pre-Interview Guide Part 4: Performance & Optimization
Performance optimization and query tuning — N+1 problem, pagination, and caching strategies
-
Spring Boot Pre-Interview Guide Part 3: Documentation & AOP — Swagger · MDC · Aspect
SpringDoc setup and annotation discipline, MDC-based request tracing and sensitive-data masking, AOP for cross-cutting concerns — all the documentation, logging, and AOP decisions that separate a passing submission from a scoring one.
-
Spring Boot Pre-Interview Guide Part 2: Database & Testing — Environment Split · Test Pyramid · Testcontainers
Environment-specific DB selection and ddl-auto policies, Memory Repository pitfalls, Test Pyramid annotation choices, choosing between test doubles (Dummy, Stub, Spy, Mock, Fake), and using Testcontainers to catch bugs that H2 dialect differences hide — the second most-flagged area in Spring Boot pre-interview submissions, covered in one post.
-
Spring Boot Pre-Interview Guide Part 1: Core Application Layer — Controller, Service, Repository, Domain
The four-layer design points evaluators repeatedly flag in Spring Boot pre-interview assignments — Controller/Service/Repository/Domain responsibility split, Request → Command conversion, what @Transactional(readOnly=true) actually does, and the three-tier priority of GlobalExceptionHandler. Series Part 1.