Skip to main content

Posts

Showing posts with the label Database Optimization

#9/10 | Spring Boot + Docker Compose: 7 Bugs That Broke My First Boot

Part 9 of 10 of Building Instagram's Authentication Backend . If you're just joining, the repo is here and you can catch the earlier parts on the YouTube playlist . Eight parts of code, zero runs By the end of part 8, every layer of this backend existed: DTOs, exceptions, entities, repositories, five services, a security filter chain and a controller. And I had never started the application. Not once. Everything so far was code I'd reasoned through and believed would work. This part is where that belief gets tested. We containerize the app, put Postgres, Redis and a fake mail server next to it, and bring all four up with one command. It did not work the first time, so this post is the real debugging session, with each bug, its symptom and its fix. If you're containerizing your own Spring Boot app, there's a good chance you'll hit at least one of these. In this post: A multi-stage Dockerfile for Spring Boot, line by line A docker-compose.yml ...

Top Backend Anti-Patterns That Kill Scalability

Scalability issues usually do not appear on day one. Most backend systems work perfectly fine with low traffic. The problems start  when users increase and data grows . In many cases, the system fails not because of traffic, but because of  bad backend design decisions made early . These decisions are called  anti-patterns . In this article, we will cover the  most common backend anti-patterns  that silently break scalability, explained in simple language with clear reasoning. Before starting interview preparation, it’s important to follow a structured  Java backend developer roadmap  so you don’t miss core fundamentals. Java Backend Developer Roadmap 2026 1. Turning Microservices Into a Distributed Monolith What Goes Wrong Teams break a monolithic application into multiple services and call it “microservices”. However: All services share the same database Services cannot be deployed independently One service failure affects others This is not real mic...