
Is Microsoft The Right Technology For A Scalable Web-Based System? - ashishgandhi
http://highscalability.com/blog/2013/10/7/ask-hs-is-microsoft-the-right-technology-for-a-scalable-web.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+HighScalability+%28High+Scalability%29
======
300bps
I've created several scalable web-based systems using ASP.NET MVC and the .NET
framework. There are a lot of rabid anti-Microsoft developers on HN but
generally I find the latest Microsoft tools stack up well to the competition.
If you're a Microsoft developer still developing in classic ASP or classic
ASP.NET and want to develop something scalable you need to move to ASP.NET
MVC.

If you're not paying for open source support, the biggest downside really is
the licensing costs. Getting a virtual server with Windows Server 2012 / IIS /
SQL Server is a lot more expensive than Linux / Apache / MySQL or other open-
source based environments. Microsoft attempts to address this with BizSpark
which gives you free software license for 3 years for startup companies.

~~~
spoiledtechie
When did they move it to 3 years? Whoa!

~~~
vyrotek
It's been that for quite some time now. They also dropped the "exit fee" a
couple of years ago. It also includes lots of free Azure resources too.

------
pnathan
First: No. See PG's essay about the Python Paradox.

Second: My understanding is that the licensing models of Microsoft become
hideously expensive as you scale up. Why waste money?

Third: Ethics about proprietary software; I think it's considerably more
ethical to use and advocate libre software.

edit: Fourth: Windows is harder to get @#$^ done in, IME. I've generally lived
in the F/OSS ecosystem as much as I could for the last 5+ years; whenever I
want to do something that I'd do in F/OSS in Windows, it seems like
"everything is hard". The complexity required to do anything programmatic is
significant compared to using Linux/OSX, even if you just measure in
keystrokes/clicks. This is, I'm sure, partially due to my inexperience, but
I'm reasonably sure that it's a combination of Big Enterprise Design Pattern
thinking along with Cater To Non-Hacker thinking.

~~~
anon1385
>Third: Ethics about proprietary software; I think it's considerably more
ethical to use and advocate libre software.

That seems a rather strange argument to make considering that the vast vast
majority of web services are not Free Software. Do people really feel like
they are making the world better by using Free Software to make all those Non-
Free web services?

~~~
pnathan
I don't have time to get into this in detail, but it runs as thus:

\- I'm not giving money or support to proprietary vendors. I am, however,
contributing by filing bugs and maybe hanging out on the mailing list for the
open source system.

OR

\- I am contributing money and maybe code to the open source vendor, in
addition to above.

OR

\- Even a comment about how your service is built on F/OSS system can
significantly improve its standing in the world, if your service is well
known.

Therefore, even though I have a proprietary licensed piece of software (due to
lack of visible business model for xyz), I can provide significant help to the
tools backing me up.

------
BigChiefSmokem
Twitter had to convert their stack from Ruby to Java for a reason. Microsoft
IMO does what Java does but even better, especially now that they are opening
themselves up to open source tech and JavaScript (they are investors in
jQuery, Knockout.js, and Anders the man behind C# has now created TypeScript
for them).

I'm not loyal to no one, especially Microsoft, and I feel they finally realize
this. Yes, there is a reason their stack costs some scratch, but because I see
them as a very strong business partner to have I don't mind taking a bite out
of their dogfood whenever it's the right choice for my project.

But hey haters gonna hate, right? But you know what haters don't do? Make big-
boy money.

~~~
samspenc
I believe Google does NOT use MS products, and I hear they make close to 66%
of total MS revenue these days. ;)

~~~
nivla
I don't think it is possible for a company as large as Google to completely
avoid using Windows products. As an example, here is the video of the tour of
Google's Data Center and around the 1:08 mark, you can clearly see them using
Windows XP [1]. However if you meant to say they don't use it in their core
services, I can imagine that.

[1]
[http://www.youtube.com/watch?v=wNyFhZTSnPg](http://www.youtube.com/watch?v=wNyFhZTSnPg)

------
bchjam
From personal experience, the higher-level features and frameworks that MS
puts out for .NET are what tend to get in the way of successfully scaling .NET
systems. I can't comment on ASP.NET MVC but I don't trust EF at all, and even
the higher level XML interfaces can be problematic. Basically it comes down to
profiling and optimizing, just like in any other system. Just don't design
your systems to be tightly coupled to any particular API.

If I were building a new system in .NET I'd base it off of open source tools
that weren't available when the systems I currently work on were built. The
most appealing of these seem to be built by stackexchange folks at the moment
(ie servicestack, dapper). These tools were designed to be Mono-friendly and
deploy to Linux so less licensing/vendor lockin worries.

In general I don't trust MS but I do like .NET and often turn to F# for
personal projects.

~~~
SideburnsOfDoom
> From personal experience .... I can't comment on ASP.NET MVC

Then you don't have personal experience in the area of Scalable web-based
systems based on .Net. I speak from personal experience.

You don't need to go near EF, there are plenty of other ways to access data,
the lightest of which is Plain Old SqlConnection. Don't knock it when you have
a few simple, well-defined queries.

Though you should also look at other open-source lightweight frameworks such
as Nancy or ServiceStack.

Also, it helps to use more loosely coupled components on merit not source
language. It doesn't matter that ZeroMQ, RabbitMQ, memcacheD or StatsD aren't
coded in .Net, it just matters that you can connect to them.

~~~
bchjam
>> From personal experience .... I can't comment on ASP.NET MVC

>Then you don't have personal experience in the area of Scalable web-based
systems based on .Net. I speak from personal experience.

Why? I've played with it and it felt kind of heavy and over-engineered, though
the high-level APIs are usually what gets pushed the most. I've never needed
to spend a significant amount of time scaling anything built on ASP.NET MVC,
hence the comment. If there's some exceptional properties that recent versions
have developed I'd love to hear about them but in general I avoid it because
of the perceived heaviness.

PS I'm not suggesting that doing traditional ASP or ASP.NET dev is where it's
at for scalability, my experience comes from working on frameworks that
largely bypassed all of that.

(edited for clarity)

~~~
SideburnsOfDoom
> I've played with it (ASP MVC) and it felt kind of heavy and over-engineered,

Compared to what? Webforms? definitely not, MVC is generally faster at serving
pages, and pushes the coder towards less coupled, more testable code.

Though with MVC the key concepts are right there in your face - you need to
deal with routes, controllers and views before you get anything showing up in
the browser, but the alignment with the way the web actually works is much
better than with webforms.

The complexity shows up later with webforms, Once you work with webforms a lot
the impedance mismatch and the leaky abstraction extinguish the notion that
Webforms is lightweight or right-engineered. viewstate. Did you ever try to
memorise the page event lifecycle [http://msdn.microsoft.com/en-
us/library/ms178472%28VS.100%29...](http://msdn.microsoft.com/en-
us/library/ms178472%28VS.100%29.aspx) , yeesh! And that complexity is nothing
more than an artefact of the framework, all with runtime overhead.

Not so with MVC, once you get comfortable with the concepts, it keeps on
giving. It plays well with http, a stateless protcol. And that's where scaling
comes in, by playing well with http.

Compared to a lightweight REST API framework like ServiceStack or Nancy, MVC
is somewhat heavier. But if you're using those well for REST data
microservices then I'm not going to criticise your choices, keep right on at
it.

~~~
bchjam
Thanks, that makes much more sense.

I agree that webforms is bad. I worked on the framework side of things before
ASP.NET MVC was an option and needing to roll our own was where most of my
experience scaling .NET systems has come from. In spite of that, .NET was a
good choice for other reasons and was fun to build and scale.

------
skrebbel
An interesting middle ground might be writing it in C# (of all modern
languages this possibly has the best features / tool-support ratio), but run
it on Linux (Mono) and against e.g. PostgreSQL.

Assuming you want to dev on Windows (because of said tool support), you'll
still pay licenses for Windows on the dev boxes and for Visual Studio, but not
when hosting (or scaling, for that matter).

~~~
aespinoza
And that actually works great. We use .Net with postgresql, and lately we have
been testing with mono and the results are amazing. Mono + Postgresql is a
great combination.

~~~
sz4kerto
Except that the MS CLR is way faster than the Mono CLR (especially under
'weird' loads like what a financial institution might face...)

~~~
skrebbel
Mono gets quite fast if you flip some command-line switches. The defaults are
a middle-ground between fast startup time and fast execution. If you're a
webapp, you probably don't care about startup time (this is off the top of my
head, i forgot where i saw the stats)

~~~
lneves
Can you give us some detail on what are those command-line switches?

------
malaporte
Another thing to keep in mind is the political aspect of choosing a tech
stack, especially for a startup... As you'll surely notice right here in the
comments, MS tools are not what you could call fashionable in many tech
circles, and that could hamper a startup ability to raise money, or affect
it's market value unless it's a smash hit like Stack Overflow.

It's up for debate whether the bad reputation is deserved by Microsoft in 2013
or not, but fairness is not what's important here...

For my part I once used C# in the past for a couple of projects and I have
very fond memories of it. It's a well balanced language with very solid
tooling, and the Mono stack seems nice as well. In a way, I'd be happy to use
it again on a new project... but at the same time I must admit that being rid
of the stigma of using MS tech is a pleasant feeling. And it's indeed
expensive, although it has never been my job to worry about that.

In a way, for me, MS tools are like that old out-of-fashion shirt that you I
still like to wear from time to time even though you know people will think it
looks weird.

To my wife, if she reads this: Sorry, I'm not getting rid of the shirt.

~~~
_random_
Although that "out-of-fashion" shirt is made from engineered meta-material and
the trendy ones just have nice patterns. Seriously, did you even try
C#5+VS2012+ReSharper? Add TPL, Rx and XAML to the mix for desktop or ASP.NET
MVC WebAPI + SignalR for web.

~~~
malaporte
I wasn't speaking about the tech, especially the recent one which I find to be
pretty nice (well, some of it at least). My point was about perception of MS
tools in the larger tech community. At some point you get tired of fighting
this fight, and in the context of a startup this can hurt you, or so I think.

Sure, I'd wish the tech community was less prone to those useless battles,
Well, unless it's about bashing Java-the-language, of course :p

------
cwt137
It is not a question of what technology is best. You can scale anything (im
exaggerating a bit). It is more of a question about do you have people on your
team who know how to scale things? If so, then use the technology that they
are most familiar with.

If you have not hired anyone yet, then consider this; It is probably easier to
find developers with skills in Java, Scala, PHP, Python, or Ruby that know how
to scale websites than developers with .NET skills. It is probably easier to
find DBA's with MySQL and its derivatives, or PostgreSQL that know how to
scale websites than DBA's with MSSQL skills. I could go on, but you get the
point.

I'm not saying at all that .NET or the Microsoft ecosystem is bad, just that
you use what your team knows. And if you don't have a team yet, they will
probably know more about a non-Microsoft solution.

------
cfeduke
I've been on the "good problem" side of scalability on the MS platform. It can
scale if you can scale your wallet. Monthly bills of ~$54K hosted at Rackspace
became monthly bills of ~$18K after a rewrite using Java, JRuby, HBase over C#
and SQL Server.

We tried Mono. It was a headache to convert (2010, 2011).

------
DenisM
To address the "it's super expensive" argument, let's consider the actual
costs involved, for example the on-demand AWS EC2 LARGE instance prices:

    
    
      Linux - $0.24 per hour
      Windows - $0.36  per hour
      Windows + SQL Web edition - $0.50 per hour
    

Overwhelming majority of startups spend most of their money on things like
payroll and travel. The server costs is relatively small, and increasing it by
50-100% is not a big deal, if what you get in return is productivity gain.

So unless you are building the next YouTube I would not consider the cost a
factor - use what makes you and your team most productive.

------
yatendra
Go with what the team is familiar with. If team is familar with MS stack, you
can keep web layer in ASP.Net MVC/IIS/Windows. This will keep dev team very
productive using Visual Studio/Windows combination and use open source
products on linux in other layers like HA proxy for load balancer, varnish for
reverse proxy, postgres/mongodb on linux for database/nosql. Stack overflow
has had good success using similar approach.

------
rch
I've worked on a number of MS based systems, some at the prototype phase,
others at significant scale. It is absolutely possible to be productive and
cost efficient long-term while using MS products, just don't expect it happen
by accident. Of course, the exact same thing could be said for almost any
other engineering choice you could make at the earliest stages of building a
complex system.

------
sklivvz1971
We've built StackOverflow with it. Is world's #55-ish network by traffic. So,
yeah, it's certainly possible.

On the other hand what do you mean by scale? There is no way you can go
internet scale with a "vanilla" framework.

My advice? Use what you like, get the right people, don't be slave of a canned
architecture or technology. You'll figure it out as you go.

------
ig1
There are plenty of large systems built on on MS technology apart from the MS
ecosystem (Bing, Live, MSN, Skype) there's GoDadday, Just-Eat, Monster,
PlentyOfFish, etc.

However realistically most startup founders are going to build a startup using
the programming language they know or one that is particularly suited to the
platform (i.e Objective-C for iOS), and few startup founders come from .Net
backgrounds and even fewer choose to stick with that language.

~~~
adamnemecek
Stackoverflow as well.

~~~
notatoad
that one probably doesn't need mentioning, as question posed in the article
was "does anybody other than stackexchange use MS"

------
ianstallings
It's always been the cost of licenses. Startups trying to bootstrap themselves
sometimes have barely enough $ to cover payroll, let alone expensive licenses
for Windows, Visual Studio, SQL Server, etc.

I'm not a hater, C# is one of my favorite languages. I started using it
literally the moment it was released at the PDC in 2000. Did that for years,
but moved on when I migrated to mobile platforms. They didn't have the
footprint in that space that they do now, which is still pretty dismal.

If you are determined to use .Net, look into the bizspark program. MS will do
it's best to get you on their platform and give you a ton of tools and
licenses for a relatively small price. They cater to ISVs and love to help
them. That community also has a bunch of great programmers to reach out to if
you need help. e.g. Scott Hanselman, Jeff Atwood, Scott Mitchell, Scott
Guthrie .. I could go on and on. Those are just off the top of my head.

------
ams6110
I haven't done it recently, but the pain in ASP.NET always seemed to be the
deployments. Has that improved? Development productivity is one thing, but
what I remember is being unable to push a release to a remote server without
having to fly an engineer out to the console.

~~~
SideburnsOfDoom
> I remember is being unable to push a release to a remote server without
> having to fly an engineer out to the console.

That is pathological. We do scripted deployments over ssh where the script
uploads files, logs in, unzips files, configures iis, etc. We do this on a
daily basis.

------
jasonwatkinspdx
Your hiring pool trumps any other concern.

Regardless of any difference in technical merit, start-ups using the MS
platform are rare, while start-ups using any of the FOSS options are common.
It will be hard to find people who are both experienced in the MS toolchain
and desire to work in a high risk venture, let alone people with prior start-
up experience.

If you do go the MS route, your best bet will be to find bright folks that are
good at what they do but bored or undervalued at a more stable business.
They're likely to be young and inexperienced, since age brings commitments
that bias people towards professional stability.

------
jinushaun
Everyone focuses on money, but it's the developers that matter most. It's just
simply tougher to find good modern .NET developers that aren't stuck in
classic ASP and drink the Sharepoint kool-aid. The MS stack can compete with
RoR and node.js, but good luck finding the same level of quality of
developers.

------
sigsergv
MS licensing is extremely unclear and complicated, they also love playing with
words like “promise” instead of “license” and so on.

------
eibrahim
honestly I think they all scale just as well and they will all have their own
issues. I would say, use whatever you and your team is familiar with and don't
forget about MS Bizspark, you get free software for a year, so you won't have
to worry about licensing until you are making money.

------
Throwadev
You can build a scalable in C#, and if you want to avoid lock-in, put your
data in an open source database (I would choose pgSQL). Windows servers aren't
that much more expensive if you host in the cloud, and BizSpark makes it free
for the first three years. What you want to avoid is being locked into SQL
Server, and other proprietary things that get expensive.

To make it scalable you can use different types of storage where it makes
sense, use CDN's, etc, all the best pratices for making it scalable.

The best argument against building in .NET would be: How easy will it be to
find _good_ developers who code in .NET?

I sometimes feel stuck in .NET. I like C#, and I use OSS alternatives and
generally accomplish whatever I need to. I see projects similar to what I
build by myself bungled by consulting firms that employ teams of "enterprise"
developers to build .NET solutions for a company that my employer partners
with. I interact with and/or follow as many of the dev's in the OSS .NET
community as I can online, but I have never met another one in person. Because
of that I feel like I'm alone. I don't consider myself a great developer, but
I'm the best overall developer compared to all the .NET dev's I've worked with
in the past decade. .NET isn't bad, but the talent pool there seems to be
really poor. I don't know if the same is true in the non-.NET world. It could
simply be that great developers are all working for the big & cool companies
and startups. Maybe impostor syndrome keeps me from feeling like I'm good
enough to jump ship over to those companies.

I think the stigma of .NET has some merit in some areas but is very
exaggerated, and while it is prevalent in the dev community, it bleeds over
into the business side as well. It actually even gets worse there because
business users are even more prone to misinformation. Someone looking to
acquire your company will say "Oh, but it's built in .NET. I heard that .NET
is: slow/ is really bad / only makes websites with ugly fonts / costs 100x as
much / etc." Some of the things they think are pretty ridiculous. Attribute
that to the game of telephone that passes the exaggerated hatred for .NET from
the technical community as information to the business side, becoming even
more distorted on the biz side.

Some of the things biz guys think are rational too. For example they might be
concerned about integrating your .NET stack with their ruby/java/python stack.
That would be an unattractive proposal to many. Companies looking to acquire
might also nix a potential deal because their CTO will be uninformed about
.NET. They will automatically think the code was bad, that you're using
viewstate and web controls and Sharepoint, and all the other horrible things
that people hate about the .NET world. They might be worried about the
licensing cost of SQL server. I see no reason to use SQL Server unless you are
locked into it by an existing system.

If i were building a company right now: \- I would go ahead and build in C#.
\- I feel like I could find good enough C# dev's if i needed to (rather pay
senior dev salaries for 3 good-great C# dev's than 5-6 guys who are 1/3 as
good but cost 80% as much). \- I would avoid SQL Server, and just design
things to be able to use non-MS techs for the critical pieces like the
databases/key-value stores, etc. \- I would follow the best practices for
perf/scaling \- I'd use a framework like ServiceStack or NancyFX.

------
1010011010
No.

