News for hackers. Stuff that matters.
Re:How Stack Overflow upgraded from Windows Server 2012 by dvdbloc on Tuesday July 23, 2019 @05:27AM (#20505468)
Anyone know why systems like this aren’t Linux based? Seems rather ironic when stack overflow seems to be a staple of the open source/sharing community.
Re:How Stack Overflow upgraded from Windows Server 2012 by stevoski on Tuesday July 23, 2019 @05:39AM (#20505508)
IIRC when Joel Spolsky and Jeff Atwood started Stack Overflow, they both had strong expertise in the Microsoft ecosystem. So they used the skills and knowledge they already had.

It was quite the coup at the time for Microsoft, especially the SQL Server team, to have such a high profile, high-traffic site.

Re:How Stack Overflow upgraded from Windows Server 2012 by madiathomas on Tuesday July 23, 2019 @06:14AM (#20505615)
Nothing ironic here. Stackoverflow wasn't designed for open source software. It is a Q and A system for all Developers. People who develop in proprietary technologies also need help when developing. They also share code. A lot. Not sure what gave you an impressiopn that SO is a Linux community because it is not.
Re:How Stack Overflow upgraded from Windows Server 2012 by p_l on Tuesday July 23, 2019 @06:15AM (#20505619)
They consider the Windows + .NET stack to have saved them more money than they pay in licensing et al.

At the time, major "web development" stacks that people would have thought of on Linux tended to be much more resource hungry (still are), meanwhile the people behind StackOverflow had very good .NET skills that they could apply immediately. This translated into being able to serve more people per server than if they used, let's say, PHP, Ruby, Python, etc.

And as people said, SQL Server. Which is a very, very capable database server with impressive performance.

Re:How Stack Overflow upgraded from Windows Server 2012 by trilila on Tuesday July 23, 2019 @06:36AM (#20505699)
I am not sure what your statement is based on regarding linux being more resource hungry than windows. Have stats to back this up? Same for goes for the SQL Server’s “impressive performance”.
Re:How Stack Overflow upgraded from Windows Server 2012 by GonzaloQuero on Tuesday July 23, 2019 @06:48AM (#20505745)
The stacks, not the system. At the time StackOverflow was built, the main Linux stacks were either PHP, Rails, Django, or similar, which, while good, are not as performant.
Re:How Stack Overflow upgraded from Windows Server 2012 by trilila on Tuesday July 23, 2019 @06:52AM (#20505760)
I am puzzled, what are these statements based on? "Linux stacks were either PHP, Rails, Django, or similar, which, while good, are not as performant." - first time I hear a .NET/Windows/SQL Server stack is more performant than these.
Re:How Stack Overflow upgraded from Windows Server 2012 by dboreham on Tuesday July 23, 2019 @07:26AM (#20505880)
First time hearing doesn't make it not true. For some historical perspective: MS engaged in a performance battle (which they won) vs Netscape Web Server running on Solaris (with IIS) since 1995 or so, including making changes to the NT kernel. So it wouldn't surprise me this attitude continued forward into the recent era. SQL Server has similarly been in a performance battle with Oracle for decades. MS has whole teams just dedicated to performance, to creating performance engineering tooling etc.
Re:How Stack Overflow upgraded from Windows Server 2012 by p_l on Sunday July 28, 2019 @12:21PM (#20548282)
Interestingly, Stack Overflow is using several of those tricks to speed up their internal services, as the kernel-side HTTP server is made available to everyone, it's not locked to MS applications. AFAIK they have few "microservices" which don't use IIS but handle HTTP through HTTP.sys

SQL Server has huge amounts of tuning and cooperation with NTFS driver team to ensure good performance, and frankly, it's at the high-end of the databases, and I really wouldn't mind using it except for price :(

Re:How Stack Overflow upgraded from Windows Server 2012 by nikanj on Tuesday July 23, 2019 @07:23AM (#20505871)
The performance of PHP was a joke when Stack Overflow started. It has gotten way better since, but back then it was reading, parsing and compiling every single script your page loaded, for every single page load. You could hack around this with an accelerator module like APC or Zend, but why bother learning how to code around PHPs limitations, when you're already fluent in C# that's plenty fast without any hacking.

Not sure how the story goes for Rails, but Python (Django) used to be a pig when SO was started over a decade ago, for similar reasons as PHP.

Re:How Stack Overflow upgraded from Windows Server 2012 by p_l on Sunday July 28, 2019 @12:18PM (#20548263)
PHP performance is still a pig, which is pasted over by various caching behaviours (for example in OS). I have to deal with making HA for a PHP site whose design precludes keeping read-only copies of PHP code, and have to load them form NFS... let's just say that even with php.ini tweaks it involves pretty much constant reads of code.
Re:How Stack Overflow upgraded from Windows Server 2012 by viraptor on Tuesday July 23, 2019 @08:16AM (#20506101)
> Python (Django) used to be a pig when SO was started over a decade ago, for similar reasons as PHP.

Django's execution model is not at all similar to how PHP code is being run. Pretty much every python web server uses wsgi (or mod_python before that) which relies on a persistent app server. Whatever are the reasons for django's assumed performance issues, PHP's runtime model had nothing to do with it.

Re:How Stack Overflow upgraded from Windows Server 2012 by madiathomas on Tuesday July 23, 2019 @07:35AM (#20505910)
Compiled code is faster than interpreted code. C#.NET is a compiled lamguage and doesn't need to be interpreted at runtime. Making is faster than interpreted languages like PHP, Rails, Python etc. These days, some interpreted languages are now cheating and interpret only at first run. Then skip interpret step on subsequent runs.

C#.NET performance is up there with C++. C#.NET is only slower than C++ during garbage collection. When garbage collection is done, it is back in business and running at the same speed.

Re:How Stack Overflow upgraded from Windows Server 2012 by viraptor on Tuesday July 23, 2019 @08:12AM (#20506080)
> C#.NET is a compiled lamguage and doesn't need to be interpreted at runtime.

That's not a great summary. .Net is complex. There's AOT compilation but not available for all purposes. There's JIT which applies most of the time to C# code compiled into msil. From there different things can happen depending on implementation, which may also include running the code via an IL interpreter.

Re:How Stack Overflow upgraded from Windows Server 2012 by ygra on Tuesday July 23, 2019 @10:17AM (#20506891)
Doesn't just Mono have an interpreter (which is now being added as part of tiered compilation)? Aside from .NET Micro. I was under the impression that .NET by and large was JIT-only. Yes, by now it's more complex, and there have been multiple different implementations, few of which would be relevant on a Windows Server environment for ASP.NET. But AFAIK a situation like in Java where the official implementation has an interpreter and a JIT (and debugging usually falls back to interpreting with horrible performance) has never been the case in .NET.
Re:How Stack Overflow upgraded from Windows Server 2012 by p_l on Sunday July 28, 2019 @12:14PM (#20548242)
last time I checked, AOT is heavily used, and if you load your assemblies into GAC you're getting AOT compilation for pretty much all code if you're not going to generate bytecode at runtime.
Re:How Stack Overflow upgraded from Windows Server 2012 by addicted on Tuesday July 23, 2019 @07:41AM (#20505941)
C#/.Net/Windows was (is?) at worst as performant than Java/Linux but probably was more performant. Twitter switched from Rails to Java in order to scale up and end their constant whaling, because Rails performance was that terrible.

Put those things together, and it’s fairly evident that C#/.Net greatly outperformed the Django/Rails stacks that were popular at the time.

Re:How Stack Overflow upgraded from Windows Server 2012 by rightbyte on Tuesday July 23, 2019 @07:38AM (#20505928)
You forgot JavaEE? Wouldn't that have been the main contender at the time?
Re:How Stack Overflow upgraded from Windows Server 2012 by oblio on Tuesday July 23, 2019 @09:47AM (#20506670)
1. Their team didn't have expertise with JavaEE.

2. JavaEE??? What has the StackOverflow team done to make you hate them so much? :o)

Re:How Stack Overflow upgraded from Windows Server 2012 by lubos on Tuesday July 23, 2019 @06:16AM (#20505620)
From Atwood/Spolsky podcasts it seems like Spolsky had zero impact on tech stack. Jeff Atwood was at the time C# programmer so he wrote StackOverflow in C#.

More context: https://blog.codinghorror.com/why-ruby/

Re:How Stack Overflow upgraded from Windows Server 2012 by jimmcslim on Tuesday July 23, 2019 @06:30AM (#20505673)
I wonder if they would make the same decision about Discourse and Ruby today, given that .NET Core is now a thing and open-source?
Re:How Stack Overflow upgraded from Windows Server 2012 by romanovcode on Tuesday July 23, 2019 @08:14AM (#20506090)
I bet not, it was clearly a hype-decision for Discourse.
Re:How Stack Overflow upgraded from Windows Server 2012 by JeremyBanks on Wednesday July 24, 2019 @10:17AM (#20515506)
It was because his cofounder, who was doing more of the initial coding, was most comfortable with Ruby.
Re:How Stack Overflow upgraded from Windows Server 2012 by alkonaut on Tuesday July 23, 2019 @06:05AM (#20505580)
You couldn’t run .NET on Linux (well) back then, and they wanted to implement it using .NET.

License costs wouldn’t be a good reason to pick another stack over the one you know.

Re:How Stack Overflow upgraded from Windows Server 2012 by Benjamin_Dobell on Tuesday July 23, 2019 @06:22AM (#20505643)
Mono supported ASP really well as far back as 10 years ago. Stack Overflow launched 11 years ago, and I didn't try it then, so perhaps they just missed out?

Although, tooling was very heavily Windows based at the time (no Rider); so it is understandable why StackOverflow took the direction they took.

Re:How Stack Overflow upgraded from Windows Server 2012 by tpolzer on Tuesday July 23, 2019 @06:39AM (#20505710)
Have you actually used old Mono? I remember sluggish performance, especially of its stop the world garbage collection.
Re:How Stack Overflow upgraded from Windows Server 2012 by rwbaskette on Tuesday July 23, 2019 @06:47AM (#20505742)
Also, the standard library for ASP.NET either had gaps or somewhat incompatible implementations of features. I’d give time to attempt a port of a mid-size web forms app every couple years but ran into a number of issues each time.

It was an amazing achievement, but never quite got me there.

Re:How Stack Overflow upgraded from Windows Server 2012 by romanovcode on Tuesday July 23, 2019 @08:15AM (#20506095)
Mono had crap performance on .NET MVC and also some things just did not work. Mono would be horrible, horrible choice for website like SO.

Source: Was runnin .NET on Mono 7 years ago or so.

Re:How Stack Overflow upgraded from Windows Server 2012 by Benjamin_Dobell on Tuesday July 23, 2019 @08:39AM (#20506228)
> Source: Was runnin .NET on Mono 7 years ago or so.

That's not a source. This is a source:

http://www.techempower.com/benchmarks/

Yes, it does show Mono's ASP performance is substantially worse than .NET, and probably more-so in 2008. I never said otherwise.

There are a lot of things to take into consideration when selecting a tech stack for a brand new, entirely unproven product. It's certainly on the list, however if performance ranks highly, then I'd be seriously questioning the diligence of whoever made said list. Expenditure (e.g. Windows Server licensing fees) would rank high on the list, however so would developer familiarity with a given stack as well as tooling familiarity.

As I said, I can see why StackOverflow made the decision they made, but I'm doubtful performance was, at that time, a major driving force.

Re:How Stack Overflow upgraded from Windows Server 2012 by merb on Tuesday July 23, 2019 @07:46AM (#20505967)
no. Maybe ASP MVC4+ worked well with Mono, but WebForms and MVC below 4 was/is just horrible.
Re:How Stack Overflow upgraded from Windows Server 2012 by danielovichdk on Tuesday July 23, 2019 @06:18AM (#20505629)
Why should it be? Honest question.
Re:How Stack Overflow upgraded from Windows Server 2012 by callesgg on Tuesday July 23, 2019 @06:30AM (#20505678)
Cause it is more work to manage windows servers than it is to manage Linux servers. Less work is better than more work so Linux is better for server implementations.

But I guess that is something people will argue over for a long long time.

Well... my opinion, based on my experience...

Re:How Stack Overflow upgraded from Windows Server 2012 by teh_klev on Tuesday July 23, 2019 @07:10AM (#20505822)
> Cause it is more work to manage windows servers than it is to manage Linux servers.

This isn't true. I managed and supported a fleet of Windows and Linux servers for a web hosting company for 14 years. Both OS's have their time sinks and gravity wells of failure.

Re:How Stack Overflow upgraded from Windows Server 2012 by callesgg on Tuesday July 23, 2019 @07:22AM (#20505868)
So both have time sinks... how does that permis effect my statement? I said one is worse. You say both suck time, which is obviously true, work takes time.

You can disagree with me ok, but if you want to convince me that I am wrong it would be nice with substantiated material.

Re:How Stack Overflow upgraded from Windows Server 2012 by wayneftw on Tuesday July 23, 2019 @09:20AM (#20506477)
You hadn't offered any substantive material in support of your own opinion either.

As a sysadmin with 30 years of experience running Linux and Windows servers though, I'll offer my own anecdote - I'd say that Windows is far easier to manage for many common scenarios. It's all point and click and you can basically figure out what to do without looking at any documentation anywhere.

It's so easy, you can teach a monkey how to configure a workgroup, domain, users, dns server, firewall, etc. on Windows.

Also, which Linux distro are you talking about? What with all the fragmentation, nothing is ever the same on every distro.

Re:How Stack Overflow upgraded from Windows Server 2012 by AnIdiotOnTheNet on Tuesday July 23, 2019 @09:39AM (#20506614)
That's putting it mildly. A lot of the time things aren't even the same on the same distro 2 years later, which is incredibly annoying when the only documentation you can find is for the wrong version.
Re:How Stack Overflow upgraded from Windows Server 2012 by callesgg on Tuesday July 23, 2019 @12:39PM (#20508057)
I did not substantiate my claim cause I did not argue against anything.

Figuring stuff out without documentation when there is documentation is a bad idea. If you know what to do the GUI can guide you a bit, but it does not do work for you. If you want to do something that you don't understand you should really read more about it, the context being irrelevant.

I doubt you could teach a monkey to do anything like that.

At my last work we used the same distro for everything, why make it hard for yourself. Personally I think most things are the same in the most commonly used distros. Everything is generally just a file. Use mount to mount disks /dev /etc /var folders all standard normal stuff.

Re:How Stack Overflow upgraded from Windows Server 2012 by viraptor on Tuesday July 23, 2019 @07:06AM (#20505809)
If you have people experienced in managing Windows, but not Linux, then it's less work to manage Windows servers.
Re:How Stack Overflow upgraded from Windows Server 2012 by callesgg on Tuesday July 23, 2019 @07:27AM (#20505883)
You can learn how to manage Linux and then get even less work.

Anyway...

I was certainly not saying that there are not scenarios where it is better to go with windows servers. Things don't happen in a vacuum.

Re:How Stack Overflow upgraded from Windows Server 2012 by viraptor on Tuesday July 23, 2019 @07:56AM (#20506012)
There's always a better solution for something that you can learn. But would it be better for everybody if the SO authors spent months learning Linux administration and non-.net web platform, or if they applied their existing knowledge to create SO immediately?
Re:How Stack Overflow upgraded from Windows Server 2012 by callesgg on Tuesday July 23, 2019 @12:42PM (#20508091)
No, I just said it wouldn't be better... there are many scenarios where the best way to do something in one perspective is not the best seen from another perspective.
Re:How Stack Overflow upgraded from Windows Server 2012 by noragami on Tuesday July 23, 2019 @06:39AM (#20505712)
Well, why shouldn't it? The way I see it, a FOSS technology stack should be the default, and using the proprietary and expensive one must be justified, as in saving significant amounts of money, or coming with some absolutely necessary technical advantages. The fact that SO is an exception (a high-profile site built on MS stack while not being affiliated with MS) kind of proves the point.
Re:How Stack Overflow upgraded from Windows Server 2012 by teh_klev on Tuesday July 23, 2019 @07:13AM (#20505831)
>a FOSS technology stack should be the default, and using the proprietary and expensive one must be justified

You're ignoring overall Total Cost of Ownership (TCO). Licenses are a drop in the ocean compared to the cost of long term ongoing management of your platform(s).

Re:How Stack Overflow upgraded from Windows Server 2012 by madiathomas on Tuesday July 23, 2019 @06:24AM (#20505650)
That was my first reaction when I saw this comment. Why should everything be in Linux? Also considering that SO does the job and does it very well.
Re:How Stack Overflow upgraded from Windows Server 2012 by joelhaasnoot on Tuesday July 23, 2019 @06:43AM (#20505728)
It would be interesting to see if they could move their hosting to Linux with something like Mono, even if just testing and seeing what the performance difference is for web nodes. I guess those are rarely the actual bottleneck, but still.
Re:How Stack Overflow upgraded from Windows Server 2012 by ocoster on Tuesday July 23, 2019 @08:55AM (#20506314)
They are in the process of migrating to .NET core, which runs on Linux.

Wether they choose to move to linux is a different matter.

Re:How Stack Overflow upgraded from Windows Server 2012 by romanovcode on Tuesday July 23, 2019 @05:28AM (#20505475)
They started with .NET MVC + SQL Server which was not running on Linux back then.
Re:How Stack Overflow upgraded from Windows Server 2012 by timrichard on Tuesday July 23, 2019 @05:31AM (#20505484)
IIRC from previous articles, HAProxy and Redis are key components too.
Re:How Stack Overflow upgraded from Windows Server 2012 by p_l on Sunday July 28, 2019 @01:22PM (#20548685)
running on linux servers, too. (as well as the ELK stack, which handles logging)
Re:How Stack Overflow upgraded from Windows Server 2012 by goatinaboat on Tuesday July 23, 2019 @05:43AM (#20505523)
Spolsky is former MS and familiar with their stack.

Additionally, SQL Server is a very good database, fast, reliable and feature-rich.

Additionally part 2: Microsoft owns Github, can’t get more open source than that!

Re:How Stack Overflow upgraded from Windows Server 2012 by dspillett on Tuesday July 23, 2019 @05:56AM (#20505556)
MS owning GitHub is a very recent thing in GitHub's development, so that isn't really a good comparison. I doubt getting bought by MS was anything like the plan in the early days!

> Spolsky is former MS and familiar with their stack

That is key: often experience (i.e. the cost of problems caused by lack of experience) can outweigh licensing considerations, particularly in the fast moving PoC/prototype stages and the subsequent quick growth phase.

> Additionally, SQL Server is a very good database

No argument there. While other DBs could certainly do the job too, SQL server is a good choice, even without that "experience bonus".