Microsoft to switch internal services to .NET 6 for cost efficiency

Microsoft claims to have decreased the cost of cloud infrastructure by 29% while simultaneously enhancing the speed and reducing latency by as much as 50% by migrating some internal services operating on the Azure cloud from.NET Framework to.NET 6. Announcing significant performance enhancements "all over the board," Microsoft released.NET 6 in November 2021. The JIT (just-in-time) compiler, garbage collection, moving threading code from unmanaged to managed code, optimizing async operations in a variety of scenarios, and enhancing the performance of data structures like arrays or file system access classes are the main reasons why.NET 6 has improved performance. Since the release, Microsoft and other businesses have discussed the results and experiences of upgrading from earlier versions of.NET to.NET 6. When the release of candidate versions became available in September 2021, the Azure Active Directory gateway service was upgraded to.NET 6. Even though they were serving the same number of requests per second, they claimed a 30% reduction in CPU consumption. They discovered a few small problems during the migration and worked with the.NET team to resolve them. One of the largest changes was the elimination of the previous reliance on IIS to directly use HTTP.sys from the Windows operating system to deliver HTTP requests. Beginning in 2019, Microsoft Commerce, a collection of about 700 microservices focused on revenue, underwent a protracted migration to.NET Core. The team gradually transitioned from Azure Windows VMs to Linux Kubernetes clusters, as well as from the.NET Framework to.NET Core 3.1,.NET 5, and.NET 6 in the end. While the ultimate Azure cost savings were roughly 30% in CPU use, they saw the benefits of a 78% delay reduction in some circumstances. The Microsoft Commerce team switched away from IIS in favor of the cross-platform Kestrel web server during the migration, as well as removing some implicit Windows requirements. In May 2022, IC3 (Intelligent Conversations and Communications Cloud), the infrastructure platform for Microsoft Teams, will also transition to.NET 6. Because they were able to achieve the same throughput with fewer virtual machines, they claimed to have reduced latency by 30 to 50 percent while also improving the stability and reliability of the services. While the migration is still ongoing, more than a third of the 200 services already use the most recent.NET version that is long-term supported. The team spent a significant amount of time and money analyzing the dependencies in their.NET code, and they used shims and executed the code concurrently to reduce the risk of migration. In January 2022, the Azure CosmosDB API gateway switched to.NET 6. They asserted that there had been a considerable decrease in CPU utilization, memory footprint, and latency, which had been cut in half from the prior value. The team emphasized enhancements to the Kestrel server's handling of HTTP requests, ValueTask optimizations for asynchronous activities, and Span structures' support for memory-intensive tasks in.NET 6. One of the most popular Azure services for web application developers, Azure Web Applications, will switch from IIS to Kestrel and YARP (an open-source reverse proxy) with.NET 6 in the first half of 2022. They asserted that they were responsible for about 80% of the throughput growth and a sizable drop in CPU use. They could use the same codebase for both Windows and Linux web application services, which cut down on maintenance costs, thanks to Kestrel and.NET 6's removal of Windows requirements. The performance enhancements in.NET 6 also help open-source.NET programs. With only a migration from.NET Core 3.1 to.NET 6, a service that reads and analyzes AIS messages broadcast by marine traffic claims a 20% performance gain.