Building a scalable web application with ASP.NET Core and Azure - part 6
- 23.07.2024
- Felix Eberhard
- Simon Planberger
- Daniel Sklenitzka
- codeaware
![Image by vectorjuice on Freepik Building a scalable web application with ASP.NET Core and Azure - part 6](/blog/images/2024-07-09-scalability_hu3dd71846a74baa72e27fd6d7e7efe4db_2047279_1000x0_resize_q75_box.jpg)
In this series of blog posts, we are going to build a scalable web application that can handle millions of users with Azure and .NET. Part 6 is the final post and summarizes our learnings.
We started our journey with a description of the scenario and defined a goal of 11k requests per second in part 1. We then set out to implement a first solution with techniques commonly used in line-of-business applications in part 2. In order to find out how scalable this first solution was, we talked about load testing in part 3. The key takeaways were:
- It’s imperative to test how scalable our app is and how it behaves under load. Load Testing tools can be used to simulate a large number of users.
- Azure Load Testing is especially useful, because you can contrast the results with server-side metrics which make it easier to identify bottlenecks.
Using the insights from the load test, we considered different options on how to improve the initial solution. The most promising one turned out to be caching, which helped us to double the number of requests per second in part 4 with just a few lines of code. Caching is a vital technique for developing performant and scalable solutions.
In part 5 we discussed some more patterns that can improve the scalability, namely sharding and optimistic concurrency control. We implemented them using Cosmos DB, as it is built for modern, scalable web applications and has support for these patterns built in. The principles could be applied to other data storage methods as well though. Cosmos DB is a powerful piece of technology and helped us to meet (even surpass) our scalability goal, but it does have a rather steep learning curve. It requires skill and experience to fully leverage its power (we didn’t even talk about features like global distribution using multiple databases).
It’s been quite a journey! We hope you enjoyed it as much as we did and you learned some things along the way. All the code we discussed (and more) is available on GitHub.
If you need help developing a scalable software solution, we’d be glad to hear from you!