├── README.md └── dotnetcore.png /README.md: -------------------------------------------------------------------------------- 1 | # Handling high traffic in ASP.NET Core 2 | Handling high traffic in ASP.NET Core 3 | 4 | The following are tools and techniques that will help you handle high traffic in a .NET Core app: 5 | 6 | 7 | 1- Caching: 8 | Caching stores frequently accessed data in memory or on disk to reduce database load and improve response times. 9 | * Tools & Techniques: 10 | - Redis [https://www.c-sharpcorner.com/article/implementation-of-the-redis-cache-in-the-net-core-api/] 11 | - Memcached [https://dotnetcorecentral.com/blog/using-memcached-as-distributed-cache-in-net-core/] 12 | - ASP.NET Core Response Caching Middleware [https://learn.microsoft.com/en-us/aspnet/core/performance/caching/middleware?view=aspnetcore-7.0] 13 | - In-Memory Cache [https://learn.microsoft.com/en-us/aspnet/core/performance/caching/memory?view=aspnetcore-7.0] 14 | 15 | 2- Load Balancing: 16 | Load balancing distributes incoming network traffic across multiple servers to improve application performance and availability. 17 | * Tools & Techniques: 18 | - Nginx [https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-7.0&tabs=linux-ubuntu] 19 | - HAProxy [https://www.tugberkugurlu.com/archive/asp-net-core-authentication-in-a-load-balanced-environment-with-haproxy-and-redis] 20 | - Azure Load Balancer [https://winsmarts.com/aspnet-core-azure-ad-authentication-and-load-balancers-e458f5ef54c6] 21 | 22 | 3- Asynchronous Programming: 23 | Asynchronous programming runs multiple tasks concurrently, allowing the application to handle more requests and improve performance. 24 | * Tools & Techniques: 25 | - Task Parallel Library (TPL) [https://hub.packtpub.com/task-parallel-library-multi-threading-net-core/] 26 | - async/await [https://learn.microsoft.com/en-us/dotnet/csharp/asynchronous-programming/async-scenarios] 27 | - Reactive Extensions (Rx) [https://dotnetcorecentral.com/blog/reactive-extensions-in-net-core/] 28 | - Actor Model [https://samueleresca.net/developing-apis-using-actor-model-in-asp-net/] 29 | 30 | 4- Message Queues: 31 | Message queues decouple tasks and process them asynchronously, improving application performance and scalability during traffic spikes. 32 | * Tools & Techniques: 33 | - RabbitMQ [https://www.c-sharpcorner.com/article/rabbitmq-message-queue-using-net-core-6-web-api/] 34 | - Azure Service Bus [https://damienbod.com/2019/04/23/using-azure-service-bus-queues-with-asp-net-core-services/] 35 | - Google Cloud Pub/Sub [https://cloud.google.com/dotnet/docs/reference/Google.Cloud.PubSub.V1/latest] 36 | - Kafka [https://docs.confluent.io/kafka-clients/dotnet/current/overview.html] 37 | 38 | -5 Profiling and Performance Tuning: 39 | Profiling your application and optimizing performance can help you identify and fix performance bottlenecks. 40 | * Tools & Techniques: 41 | - BenchmarkDotNet [https://github.com/dotnet/BenchmarkDotNet] 42 | - JetBrains dotTrace [https://www.jetbrains.com/profiler/] 43 | - New Relic [https://newrelic.com/instant-observability/dotnet-core] 44 | 45 | -------------------------------------------------------------------------------- /dotnetcore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kavaan/Handling-high-traffic-in-ASP.NET-Core/f1ea21f8a96a1d1488c4ae036fe43bde7b5c7b02/dotnetcore.png --------------------------------------------------------------------------------