A Small AWS Mistake That Taught Me to Always Check the Region

A while back, when I was just starting to get more hands-on with AWS and infrastructure, I ran into a performance issue that took me longer than I’d like to admit to figure out. At the time, we were upgrading one of our Rails applications to a newer version. Instead of upgrading the existing EC2 instance, we decided to provision a new one and deploy the application there. It felt like the safer approach since we could leave the old server untouched until we were confident everything was working as expected. ...

April 12, 2026 · Mausam Pun

Solving the N+1 Query Problem in Rails

One of the first performance issues I learned to look for in Rails applications is the N+1 query problem. It’s surprisingly easy to introduce. The code usually looks clean, everything works as expected, and during development you probably won’t notice anything wrong. Then the application starts getting more data. Pages become slower, API responses take longer, and the database suddenly starts doing a lot more work than it needs to. ...

January 21, 2026 · Mausam Pun