Live data from Hacker News

StackOverflow Update: 560M Pageviews a Month, 25 Servers

highscalability.com

91–100 of 278 posts

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

#92

"with just 25 servers" This really needs to stop. Go to stackexchange.com and you'll find that more than half of the HTTP requests are to cdn.sstatic.net. Looking up the IP addresses for cdn.sstatic.net returned five entries for me, all owned by CloudFlare. None of the CloudFlare servers that they are using seem to be in that 25 count. Sure, these are all for static assets, that isn't the point. There are way more th…

It's how many servers you would need to provision to do the same, with the same code base. It's basically the number of directly active servers our code runs on.

Sure, we use a CDN, but not for CPU or I/O load, but to make you find your answers faster.

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

#93
post #85
post #18

Anyone else not quite expecting StackExchange to be using a Microsoft stack?

One must wonder, how much better this setup would of scaled had it been a more appropriate webserver stack such as Linux/BSD + Apache/Nginx or similar. Perhaps less boxes would be needed, or with the same number of boxes, more concurrent users. > Microsoft infrastructure works and is cheap enough not as cheap as just paying your team to maintain the boxes. I wonder how many times in the past few years SE has needed t…

> One must wonder, how much better this setup would of scaled had it been a more appropriate webserver stack such as Linux/BSD + Apache/Nginx or similar.

Why is the Microsoft stack not appropriate? I am not aware of any spectacular performance difference between Apache and IIS, or Windows Server 2012 and Linux, and clearly the SO team is not religiously Microsoft, so it's hard to see why they wouldn't have switched if it was a clear win. MSSQL is actually, in my experience coming from MySQL, amazing - I'm back on MySQL and Postgres now and I often wish I wasn't. I'd say it's the most underrated of MS's products, probably because of the expense of the Enterprise/Datacenter editions.

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

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

  But who in their right mind would do the second one?
Oh abritishguy, I can assure you that the world is awash in such magical code snippets.

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

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

i tend to agree. take dijkstra's algorith implemented with a fibonacci heap or something very simple like

for i = 1 to 100 if x = this do that and something with i else something else with i

easy to read, less efficient than: if x = this for i = 1 to 100 do that and something with i else for i = 1 to 100 do something else with i

from my experience, compilers usually dont hoist very well

edit: sorry, spaces didnt come out well

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

#96
post #77

Earlier quoted context omitted.

I'm not disputing that efficient code can be easier to understand in some instances, just that the assertion that efficient code is easier to understand. Logically, disputing that just requires a single instance of efficient code that is hard to understand. I think that's a trivial enough example to be self evident. In reality, I'm just wondering what they were trying to convey with that statement. I doubt they would…

Fair point. It's possible when they said "efficient", they did not mean "hardware efficient, runs fast, doesn't use a lot of resources" but "developer efficient, faster to write and easier to understand". But that entire phrase as is doesn't make sense, I agree with that. It's also possible to be a simple mistake. Maybe they went overboard with marketing phrases and claimed something that isn't quite true.

We never said that. The closest I can think of is that simple code (short stack, no DI, layering, etc.) is simpler AND faster at the same time, and in my talk I give specific examples.

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

#98

"with just 25 servers" This really needs to stop. Go to stackexchange.com and you'll find that more than half of the HTTP requests are to cdn.sstatic.net. Looking up the IP addresses for cdn.sstatic.net returned five entries for me, all owned by CloudFlare. None of the CloudFlare servers that they are using seem to be in that 25 count. Sure, these are all for static assets, that isn't the point. There are way more th…

Stack Exchange dont own their CDN. If you really start couting external servers, you would be adding DNS, possible client side proxy servers, client side network infrastructure, etc... these are things that OTHER people do, not SO.

I would say though, CDN doesn't fall in the same category as DNS. Serving static assets off other networks does take a huge load off the SE infrastructure and should probably be mentioned in the article.

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

#99

So this is what, a 2000 request/sec peak? Over 11 servers, that's like 200 requests/sec peak per frontend? The problem with scale-up is if you actually have to get a few times larger, it becomes super expensive. But fortunately hardware is increasing so much that you can probably just get away with it now. There's probably a crossover point we're rapidly approaching where even global-scale sites can just do all their…

Yes, the idea is to scale up as much as economically makes sense and only then scale out, but due to Moore's law we're still scaling up.

Not everyone has google-like problems that are betters solved by a battery of cheap boxes.

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

#100

Earlier quoted context omitted.

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.

But who in their right mind would do the second one? Oh abritishguy, I can assure you that the world is awash in such magical code snippets.

> competent programmer
Post reply on HN