4 ms·
Do you run .Net Core on Windows or Linux? I have a project in the early design phase that I was thinking of going with .Net Core on Linux. I've thought about g
by pickle-wizard 7y ago
Do you run .Net Core on Windows or Linux?
I have a project in the early design phase that I was thinking of going with .Net Core on Linux. I've thought about going with Java, but with all the recent Java licensing changes don't think I want to go that route anymore.
- majkinetor 7y agoI currently run on Windows servers, some of which are Core. Tried nano but its terrible as there is no package manager and no support for msi files. If you install anything in docker it takes GB's so we used VM's for bakcend/frontend running Windows Server 2016 behind IIS/kestrel/nginx and every other supporting tech on Linux (not core). One of the reasons to use Windows was Sql Server but mostly PowerShell which we do all automation in. Backend service is used to register invoices for entire country and it has 1M+ users, we have 60-100 logins per minute and 500+ concurent actions. Backend is served by single server (!) and never gets more then 10% CPU load and 20% memory with that load. I am amazed honestly. Zero dev fucktitude (once we ditched Angular, but that is another story). Almost zero downtime (30-50s to build and deploy with db migrations). Now, we use Linux alpine docker containers, use postgre instead Sql Server and pwsh with Invoke-Build to run CI/CD stuff. Sworm for orchestrations and compose for local. Have 2 incoming country-level services this year for production. Currently on dev/stage it works really fast but load is trivial. We did a lot of performance test on Windows and achieved 1.5-2K req/s with hello world and our setup on IIS/kestrel. Did no test for linux variant so far. > I've thought about going with Java, Java compared to latest C# is like ... Clojure to VBA. No brainner really, plus Oracle (sure, there are alternatives). Also, entire Java enterprise stack is overengineered beyond repair. I need 77 classes for basic stuff. Take .NET core you wont regret it.
- tracker1 7y agoI assume your docker taking GBs above is for Windows Containers? Also, most of that overhead is first use, updates and parallel similar containers are much smaller. Also, as you mention, alpine containers are what I'd consider "just enough" when wanting to diagnose an app in a container. I've found that .Net Core on Linux and in Windows are close enough that scaling should be the bigger concern. Unless you're tethered to windows, the broader tooling is much more mature with Linux containers/pods.
- chupasaurus 7y ago.Net has some caveats with GC: Server GC preallocates heap per CPU core so if you have 8+ server it could be a waste of RAM if app uses less than 1GiB. We are tinkering with microservices on .Net Core 2 in k8s and came up with using WS mode with clearing unused allocated memory on health check calls which is dirty but working trick. On the Java side though there is a hack in JRE which checks if JVM runs inside a Docker container in order to not get out of memory limit by cgroup.
- GordonS 7y agoI believe the are changes coming in .NET Core 3.0 to fix the OOTB server-GC situation. Of course for now you always have the option of enabling desktop GC instead
- ctvo 7y ago> Worked in 50+ environments so far but this is top stuff. With so much experience you must know how this sounds to someone not in the .net space. You and your company are clearly well versed in .net and it's worked out for you -- take a person and a company equally experienced in Java and they'd achieve similar results (I have, companies I've worked at have). The systems you're describing are not extraordinarily large scale systems. You've failed to outline the gains here vs. another tech stack.
- voidmain0001 7y agoFascinating! By chance, do you have any write ups on your stack elsewhere?
- majkinetor 7y agoNot yet (blog is planned, but you know... time), but I have bunch of presentations on it (basically DevOps on Windows on premise) that I consult to companies on request, with one of those services as a real life example (I prefer diving into real working stuff over hello worlds). For example, this is the one about Chocolatey that I gave at Microsoft event few years back (other are similar, but all on Serbian ATM since I mostly do consulting locally and involve everything from Gitlab over InfluxDb over PowerShell to obscure languages such as Autohotkey): https://majkinetor.github.io/sinergija2016 https://majkinetor.github.io/sinergija2016
- voidmain0001 7y agoThankfully there's Google Translate. That's a great start, thanks!
- scarface74 7y agoI run .Net Core on Linux -- sort of. It's mostly Linux based AWS Lambda. I haven't had any compatibility issues.
- apta 7y agoA lot of FUD is being spread about Java's licensing. OpenJDK is 100% open source and has a permissive license. And there are several providers for it. That being said, both .NET and the JVM are great platforms. You'll have to evaluate both platforms and see which one benefits your project more.