Which is Better for Azure Functions: Windows or Linux?
Asked by
SkyHigh99
I'm trying to decide between using Windows or Linux for my new Azure Functions, especially with the upcoming changes to the Linux Consumption plan in 2028. I haven't really checked the performance benchmarks in a while. I remember that Linux was performing better with .NET Core in the past, but I'm curious to know if that's still the case or if things have leveled out. Typically, I favor Linux for functions, particularly for its Flex plan which has no timeout limit. Can anyone provide insights on the performance of .NET 9 or 10 on either OS?
Answers
From what I've seen, Windows Azure Functions tend to cost more because of licensing fees. Unless you're using a specific Windows-only feature, Linux is usually the better choice on the PaaS side. It's worth noting that while costs for consumption plans might be similar, Linux traditionally has the edge in performance.
Reply to this answer
I think Linux generally performs better for Azure Functions, but since Azure abstracts a lot of the details, the difference might not be significant in everyday use. Also, regarding 'new functions', I meant starting fresh function apps, which can operate on either platform today. I want to avoid switching plans in a year if I can help itโperformance metrics are key to this decision.
InsightDriver: Exactly! If cost is a big concern, especially for small businesses, figuring out if Windows' cheaper consumption plans are up to snuff compared to the pricier Flex options is essential.
Reply to this answer
I recently did some benchmarks migrating to .NET 8 from Windows' Azure Functions, and while we experienced some headaches with memory issues, scaling became more efficient. However, I've noticed some performance dips with ms per request. Flex has no deployment slots, which is a bit annoying, but on the whole, I can't say costs have changed dramatically. I'd recommend migrating some non-critical functions over now to assess the differences without the pressure.
CloudNinja: Did you switch from Windows to Linux Flex for your functions? I'm curious about the specifics of your setup!
Reply to this answer
With the new Flex consumption coming in, I think the pricing changes should be taken into account. You will need to manage storage differently for the Windows function apps, which might increase costs based on LRS writes and more. Plus, in terms of performance, Windows can lag behind, particularly with certain frameworks.
TechSavvyBee: Thatโs true! Flex definitely makes things a bit more complex. Iโd love to see some updated benchmarks to compare specifics for 2025.
Reply to this answer
We've had to stick with Windows functions because we rely heavily on hybrid connections, which arenโt available on Linux right now. But Iโd switch to Linux if possible since I hear it generally runs faster.
Reply to this answer
Add your answer
Answers are reviewed before publication.
ArtisticAura: Good point! Also, in my experience, Linux was initially more efficient, but I've seen reports that both are performing closer together now. Canโt hurt to do a little more digging!
EchoWave8: Right, and if you're looking at App Service Plans, Windows costs can shoot up quickly, especially with reservations.