Hacker News new | comments | show | ask | jobs | submit login
Is Microsoft The Right Technology For A Scalable Web-Based System? (highscalability.com)
37 points by ashishgandhi on Oct 7, 2013 | hide | past | web | favorite | 81 comments

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.

When did they move it to 3 years? Whoa!

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.

It's been that way for at least 4 years now.

I used it around 2002(?) when it was called the "Empower" program and it was 3 years long.

> "There are a lot of rabid anti-Microsoft developers on HN"

Intellectual laziness test: Have you spent some time considering that maybe there is a good reason for that? Or are you just simplistically dismissing it out of hand as uninformed hatred?

Have considered, but no one has come up with a legitimate reason. Name some "legitimate" reasons?

I think most of the anti-microsoft disposition is legacy and deservingly so, but IMO no longer applicable. At least not against the technology anyway, since the mvc framework is pretty good. Licensing costs are a different matter all together.

I find in most cases it is people comparing Ruby on Rails or other modern development tools to Classic ASP or even Visual Basic 6 which is decades old.

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.

>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?

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.


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


- 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.

Yes, if they contribute patches to make everyone's services more secure and error-free.

Actually, about the Python Paradox. If you're hiring for a C# stack but want a hacker attitude, explicitly mention the non-MS stuff you're using. So if you're using e.g. ServiceStack and Postgres on Mono instead of ASP.NET MVC on IIS and Windows, then make knowledge of that a big plus in your vacancy.

Sure, it's less obvious off of the job title than when you're hiring for $TRENDY_LANGUAGE, but it'll filter all the certified microsoft folks away, in favour of the crowd that looks further than what a single company prepared for them.

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.

Beyond the toolbox, though, I would need to investigate the platform costs of scaling MS technology.

For Microsoft, there would be a licensing cost not only for each instance of the OS but also the supporting systems ( SQL Server, VM Manager etc ).

I don't have much insight into those costs but at $WORK it is one of the drivers for moving as much portable code to Linux VMs as possible, even at the technical and organisational cost of a split development environment. The Big Apps remain .Net on MS, since that's how they were written, but everyone else is pushed to OSS.

Java is very different ecosystem to the .Net world. First, the VMs have have been more performant on the Java side (this might have changed very recently, but this was definitely the case 2-3 years ago). Second, there's a big OSS world around Java, and a not as big one around .Net. Third, Java-OSX/Linux, .Net-Windows.

I think the .Net framework and language one of MS's best products in decades. Heljsberg is brilliant. :)

"First, the VMs have have been more performant on the Java side (this might have changed very recently, but this was definitely the case 2-3 years ago)" ... why write it, if this argument isn't valid anymore ? I thought it was a known fact these days, the CLR out-performs the JVM ...

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

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

It should be noted that the biggest dog-fooder of the Microsoft web stack - Microsoft online services and Bing - has never been able to make big-boy money.

This might be the worst comment I've ever read on HN.

Cleverly self-referential.


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

I couldn't come up with something that douchey if I spent all day trying.

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.

> 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.

>> 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)

> 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... , 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.

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.

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).

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.

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

I'm still testing big loads with mono. Once I figure out all the performance bottlenecks, I'll write a blog post about it.

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)

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

You of course checked the latest version of Mono?

No, I haven't. I mentioned somewhere else that I know of the versions from 2-3 ago. I did _very_ extensive benchmarking, and they were quite far away in edge conditions (example: very high GC load).

Are you getting good performance? Mono is at the bottom of most of the framework comparison benchmarks: http://www.techempower.com/benchmarks/

Do you use Entity Framework with LINQ? How does that work out for you?

I actually use Spring.Net + NHibernate... I do use LINQ accross the board, but for NHibernate I am using the Criteria based queries.

I am having some problems with Spring.net transactions for NHibernate, but everything else is working great.

Thanks, we are considering using mono to move away from windows platform. Won't be using .net tech in the long term. Would be nice to run our existing programs (linq to entity) with just little modifications though.

Do consider using Mono. So far it has been a pleasurable experience porting my apps. And C# is way cleaner than Java IMHO.

I thought I was the only one using C# and Postgres. Secret's out!

>" you'll still pay licenses for Windows on the dev boxes and for Visual Studio"

Would you? Wouldn't Visual Studio Express be enough for a lot of cases?

No. It lacks extension support and it also lacks MSTest support. This means no integrated unit testing. This means coding like it's 1996.

Of course, you can run an NUnit runner separately, or as a custom build step, but, well, that sucks.

I use the paid version of Visual Studio and I still avoid MSTest like the plague. I used it for a couple of projects because I thought the integration would be great, but it's awful. It's really slow, even if you use it as a shell for NUnit/xUnit.

I use NUnit/xUnit, and sometimes mspec, and testing from the command line or the N/xUnit GUI is not an issue for me.

FYI, there are even attempts at getting continuous testing working via console, as soon as you save a file in VS the tests are kicked off in the console. I tried it and it "worked", but so far I haven't integrated it into my workflow yet.

I can't speak for Mighty Moose (haven't used it), but NCrunch is pretty awesome. After using it for a few weeks, you feel like you've chopped an arm off when you start using a Visual Studio install without it and have to run tests manually or drop to the command line to run mocha tests.

Completely agree there. Consider using TestDriven.NET, it provides great integration with NUnit. I think it's really the integration that MSTest should've had. The only downside is that it doesn't seem to work with async tests, at least in the versions that I've used.

If you want to sacrifice some productivity then yeah, VS.Express would work.

(i.e. can't run unit-tests inside your IDE for example)

Hosting and scaling on Windows Azure is a pretty cost effective option to avoid "licensing".


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.

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.

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

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.

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).

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.

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.

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.

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.

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.

I guess that makes me and our company unique. Started over 3 years ago on the .Net platform and have no reasons to consider switching. The BizSpark program and Azure services are great for startups.

Stackoverflow as well.

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

ExactTarget is also built on MS technology.

I heard Hotmail (now Outlook.com?) runs on Linux servers?

> I heard Hotmail (now Outlook.com?) runs on Linux servers?

No, Hotmail runs on Windows.

Before it was ported to Windows in 2000-2001, it ran on FreeBSD. Not Linux.

That would be the front end; as I recall, the back end was Solaris running Oracle. (I tried to confirm my memory but the obvious keywords do not give good results with Google.)

Hotmail started out as a unix-based system. Microsoft bought it, and over a period of years moved it all to Windows. I would be stunned if there's any unix, linux, bsd, or oracle left at this point.

Yeah, we're pretty sure the back end has been converted as well.

It was amusing to watch their first effort to convert the front end fail, then when they got it right, for a while people were watching as more and more of the front end machines were switched over.

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.

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.

> 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.

Yes - I publish directly from Visual Studio using Web Deploy (http://www.iis.net/downloads/microsoft/web-deploy).

You can do normal deployment tasks all via the file system. I'm not sure why you needed physical access to do deployments, but that's not the usual case.

Depending on exactly how you environment is set up, but for my SaaS app deployment is one click.

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.

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.

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

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.

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.


Applications are open for YC Summer 2018

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact