These guides come out of my day-to-day work on high-traffic .NET systems, where an API has to stay up at the peak of an exam, the database must not slow down under load, and a message must be neither lost nor applied twice. Each guide follows one concrete problem from diagnosis to fix, and the code samples are written against current versions of the tools.
The guides
- SQL Server performance tuning for high-traffic APIs Finding expensive queries with Query Store, reading execution plans, covering indexes, parameter sniffing, locks and RCSI, EF Core pitfalls, and batch writes with SqlBulkCopy.
- API load testing with Locust Writing a realistic scenario, running headless and distributed, reading RPS and percentiles, and finding the bottleneck on the server side.
- Caching in ASP.NET Core IMemoryCache, Redis, two-level HybridCache and output caching: what each one is for, how to choose keys and TTLs, and what not to cache.
- RabbitMQ in .NET Publisher confirms, manual acks and prefetch, idempotent consumers, delayed retries, a parking queue and the outbox pattern.
Where these guides come from
At Gozine2 I worked on a system that had 45,000 to 70,000 concurrent users at exam peaks. Before each peak we put the busiest APIs under load with Locust to find the bottlenecks, tuned SQL Server queries and caching paths, and kept Redis highly available with Sentinel. The full story of that project is in the case study on the exam system at peak traffic.
The longer accounts, with the background of each project, are in the Backend Notes series. Start with part 1, on Redis Sentinel at exam peaks; the other parts are listed in the notes section.
Where to start
If your system slows down at peak and you do not know why, start with load testing: without measurement, every optimization is a guess. If the measurements show that the response time is spent in the database, go to the SQL Server guide. Add a cache or a message queue once you know which problem it solves.
If you need help with a specific system, the Work with me page explains what I can do.
Mahdi Molavi