How to Optimize a System for 1 Million Concurrent Users

To keep your system running smoothly when millions of users access it at the same time, a Software Architect needs to consider many factors. Below is a comprehensive checklist of bottlenecks and optimization solutions to ensure your system is always ready for high traffic. 1. Bottleneck from monolith architecture All logic and resources are bundled together → difficult to scale Solutions: Switch to microservices Make services stateless to allow horizontal scaling Add an API Gateway (rate-limiting, circuit breaker) Use a service mesh (Istio, Linkerd) if observability is needed 2. DB bottleneck due to too many direct queries 1 million users can generate tens of millions of DB queries Solutions: ...

April 16, 2025

2 Ways to Create and Push a Repository on GitHub via Command Line

1. create a new repository on the command line echo "# test" >> README.md git init git add README.md git commit -m "first commit" git branch -M main git remote add origin https://github.com/kanelv/test.git git push -u origin main 2. push an existing repository from the command line git remote add origin https://github.com/kanelv/test.git git branch -M main git push -u origin main

March 9, 2025

How to set username and email for a specific project

You can set a different Git username and email for a specific project by configuring them locally within the project’s repository. Here’s how: 1️⃣ Navigate to Your Project Folder cd /path/to/your/hugo-blog 2️⃣ Set Local Git Username & Email Run the following commands inside your project folder: git config user.name "Your Name" git config user.email "your-email@example.com" 3️⃣ Verify the Configuration To check if it’s set correctly: git config --local user.name git config --local user.email This will apply only to this repository, leaving your global Git settings untouched. ...

February 22, 2025

How to optimize a Spring Boot Application to Handle 1M Requests/Second

Scaling a Spring Boot application to handle 1 million requests per second might sound like an impossible feat, but with the right strategies, it’s absolutely achievable. Here’s how I did it: 1. Understand Your Bottlenecks Before optimizing, I conducted a thorough performance analysis using tools like JProfiler and New Relic. This helped identify key issues: High response times for certain APIs. Database queries taking too long. Thread contention in critical parts of the application. ...

February 20, 2025