Live data from Hacker News

StackOverflow Update: 560M Pageviews a Month, 25 Servers

highscalability.com

221–230 of 278 posts

Re: StackOverflow Update: 560M Pageviews a Month, 25 Servers

#221
post #89

Earlier quoted context omitted.

I find the opposition to static classes odd. Unless you need the data encapsulation of an object, why force people to create an object to call functions? I find too much C# code loves creating objects for no real purpose other than that's how it works. For SO, if we guess they max out around 2000 req/sec, then if a bunch of objects are being allocated for each request, there could be added GC pressure. From my own ex…

I think the real issue (although it doesn't seem to be an issue for SO) is testability. AFAIK, static classes cannot be mocked, and you are pretty much boxing yourself into only doing integration tests for everything. Not necessarily a bad way to go, just lots more setup per test.

It completely depends if you do this:

    public static decimal DiscountValue(Order order)
Or this:

    public static decimal DiscountValue(decimal orderValue, decimal orderDiscount)
Or even this, which would farm the work out to SQL:

    public static decimal DiscountValue(int orderId)
The first would require a mock, the 2nd wouldn't and the third isn't unit testable.

It's a bit of a contrived example, as you're more likely to do the third method if you're trying to get some sort of summary data about an order out which would mean you don't really need/want to load the whole order object.

Re: StackOverflow Update: 560M Pageviews a Month, 25 Servers

#222
post #210

It is fascinating to see how well its server it holding out. With Plenty of headroom to spare!. With Higher Capacity DDR4, and Haswell or even Broadwell Xeon, and PCIe SSD getting cheaper and faster. It is not hard to imagine they could handle 3 - 4 times the load when they upgrade their server two years down the line. But i would love to see Joel's take on it though. Since he is a Ruby guy now, and I dont think you…

It would definitely be several orders of magnitude slower. That's the price you pay when you are using a language like ruby: it's very productive and fast to iterate in, but way less performant. At the end of the day, what you use depends on your needs.

Arh... I actually meant Jeff, not Joel.

Hardware is cheap, Programmers are expensive! But i am sure there is a line where this crosses over though.

Re: StackOverflow Update: 560M Pageviews a Month, 25 Servers

#223
post #183

Earlier quoted context omitted.

You should come down our way and do a tech talk about it. If only for the wailing, gnashing of teeth and rending of garments.

Your people would literally murder me. Are you back from west coast / toronto?

I am, yeah. We do tech talks every Tuesday. I can promise free food that's not as good as yours.

Re: StackOverflow Update: 560M Pageviews a Month, 25 Servers

#224

Earlier quoted context omitted.

You should come down our way and do a tech talk about it. If only for the wailing, gnashing of teeth and rending of garments.

Indeed, they seem to have achieved what many have said is literally not possible. Also, some might remember when they had Uncle Bob on the podcast, the topic being unit testing, and iirc Bob preaching the gospel (~ you must write plentiful unit tests, or else) and Jeff and Joel (especially) more or less saying they don't quite get why. (Am I remembering this story correctly? I swear that's how I remember it.)

It's been my experience that outside-in TDD seems like impossibly strict nonsense until you do it with someone who is good at it.

Then after a while it seems like an obvious way to work.

Re: StackOverflow Update: 560M Pageviews a Month, 25 Servers

#225

StackOverflow shows just how powerful using a fast language can be. Compare the TechEmpower benchmarks for, say, Java vs Rails on a very simple JSON serialization benchmark (we can assume .Net would achieve comparable performance to the JVM): http://www.techempower.com/benchmarks/ The Java servers get around 900K requests/s on beefy hardware while Rails squeezes out 6K. That's a 150x difference! Any real application…

> It's a one off cost to learn an efficient language, but it pays returns forever.

It also imposes costs forever.

Software is never finished.

Re: StackOverflow Update: 560M Pageviews a Month, 25 Servers

#226

StackOverflow shows just how powerful using a fast language can be. Compare the TechEmpower benchmarks for, say, Java vs Rails on a very simple JSON serialization benchmark (we can assume .Net would achieve comparable performance to the JVM): http://www.techempower.com/benchmarks/ The Java servers get around 900K requests/s on beefy hardware while Rails squeezes out 6K. That's a 150x difference! Any real application…

> It's a one off cost to learn an efficient language, but it pays returns forever. It also imposes costs forever. Software is never finished.

Your point is that more efficient languages are slower to develop in? This hasn't been the case for a while, in my experience.

Re: StackOverflow Update: 560M Pageviews a Month, 25 Servers

#227
post #162

Earlier quoted context omitted.

AWS has among the highest bandwidth costs you're going to run into, if we're talking co-location, dedicated, or self-hosting. Their bandwidth costs are the sole reason I won't go anywhere near AWS yet, I consider their prices outrageously high. 10tb = roughly $1,000 per month They're between 5 and 50 times more expensive on bandwidth than the options in dedicated / colo / self hosting.

You can negotiate with AWS.

I don't believe that startups in their garage days have anywhere near the necessary leverage to negotiate anything with Amazon...

Re: StackOverflow Update: 560M Pageviews a Month, 25 Servers

#228
post #87

Earlier quoted context omitted.

It's difficult to take pragmatic advice from someone who took the least pragmatic (and most expensive) route for a startup web company.

Programmer time is a factor that comes into play when you build something and re-training your people to use a stack they are not familiar with + the associated mistakes can get expensive in a hurry. If you happen to be familiar with the MS stack and are able to factor the license fees into your business plan there is no strong reason against and many for using that particular stack. MS programmers tend to be a bit m…

> MS stack is more performant than the Linux one on the same hardware

Could you please provide some evidence to support that?

Re: StackOverflow Update: 560M Pageviews a Month, 25 Servers

#229
post #209

StackOverflow shows just how powerful using a fast language can be. Compare the TechEmpower benchmarks for, say, Java vs Rails on a very simple JSON serialization benchmark (we can assume .Net would achieve comparable performance to the JVM): http://www.techempower.com/benchmarks/ The Java servers get around 900K requests/s on beefy hardware while Rails squeezes out 6K. That's a 150x difference! Any real application…

Conversely, you might be able to iterate faster with a 'web' language and create a product people really use in a shorter time frame and worry about scaling later!

Strange, to me Java and ASP.NET (as used by SE) are web languages.

Re: StackOverflow Update: 560M Pageviews a Month, 25 Servers

#230
post #42

Earlier quoted context omitted.

users=db.get("SELECT name FROM users WHERE group='admin'") is more efficient and understandable then: users=[]; tmp=db.get("SELECT name,group FROM users") for (i=0;i

But who in their right mind would do the second one? Obviously you can make code both less efficient and less readable. But starting with code that a competent programmer has written, I find it seldom makes it more readable when you make it more efficient.

People using ORM can end up writing the second one without it being obvious.
Post reply on HN