r/programming • • Feb 17 '16

Stack Overflow: The Architecture - 2016 Edition

http://nickcraver.com/blog/2016/02/17/stack-overflow-the-architecture-2016-edition/
1.7k Upvotes

461 comments sorted by

54

u/[deleted] Feb 17 '16

The first cluster is a set of Dell R720xd servers, each with 384GB of RAM, 4TB of PCIe SSD space, and 2x 12 cores.

Starry eyes.

58

u/nickcraver Feb 17 '16

They are pretty to look at...
In case anyone missed it and just loves some good 'ol server porn, here are the latest glamour shots: http://imgur.com/a/X1HoY

36

u/AlGoreBestGore Feb 17 '16

256 images

68

u/Pulse207 Feb 17 '16

It's not clear why they've chosen such an oddly specific number.

14

u/nickcraver Feb 17 '16

I'm a puzzle.

13

u/ismtrn Feb 18 '16

128 was too few, 512 was too many...

10

u/mrwazsx Feb 17 '16

requires 256gb of ram to load the page

4

u/[deleted] Feb 17 '16

Haha looks like punishment...locked up in a room with a buncha computer hardware and software problems. Awesome. Stack Overflow is one of the best things to come out of the Internet.

2

u/port53 Feb 18 '16

This is my life right now - it's not that bad actually. Beats sitting at a desk all day.

1

u/ivosaurus Feb 18 '16

I was getting some major respect for the orderlyness of this until

2

u/nickcraver Feb 18 '16

That was my idea. No regrets.

Seriously though, production staying online ("production" in this case being a KVM we wanted) is paramount. Whatever you have to do to make that happen: that's the job. If I'm doing my job as an SRE well, you never know I'm there. Then again, we blog about it so that doesn't really work well. I'm so confused.

1

u/xdavidjx Feb 18 '16

NY colo? The pictures look like Jersey City (Grove Street to be exact).

1

u/nickcraver Feb 18 '16

We just say New York because that's where it used to be and we didn't want to rename all of the NY- servers. And shame. Lots of shame.

But don't tell anyone - keep this between us, k?

2

u/CoderHawk Feb 18 '16

That's big, but would be considered low end memory and CPU wise at my workplace. That's probably because we don't have a proper caching system, though.

67

u/SikhGamer Feb 17 '16

I said it last time, I'll say it again.

This is straight up dirty filthy porn. I fucking love it.

Thanks for putting together this post mate.

28

u/nickcraver Feb 17 '16

<3

5

u/port53 Feb 18 '16

I do very similar stuff (you could mistake our cages for each other), I wish my company were cool enough to let me blog about it.

12

u/gambit700 Feb 18 '16

Great post, but I can't wait to read this one

The problems Jon Skeet creates

10

u/nickcraver Feb 18 '16

His user is such a jerk, but he's a pretty good human.

520

u/orr94 Feb 17 '16

During peak, we have about 500,000 concurrent websocket connections open. That’s a lot of browsers. Fun fact: some of those browsers have been open for over 18 months. We’re not sure why. Someone should go check if those developers are still alive.

6

u/jCuber Feb 17 '16

Could it be possible that those open sockets are being used to check if the site is up?

55

u/nickcraver Feb 17 '16

I sure hope not. We can totally crash the site with the sockets still working fine. Suckerrrrrrrrrs

273

u/AlcherBlack Feb 17 '16

looks over 12 open chrome windows with 60+ tabs each

runs uptime

Nah, they're fine. Sort of. Kinda. Probably not dead, at least.

17

u/[deleted] Feb 17 '16

It could also be servers with desktop interfaces running where a browser has been opened in them and just forgotten.

31

u/rubygeek Feb 17 '16

And thousands of sys-admins cried out in pain at the thought of desktop interfaces on their servers....

1

u/torwori Feb 17 '16

Yup, that could be the case.

18

u/TRiG_Ireland Feb 17 '16

For hundreds of tabs, I prefer Firefox. It loads tabs only when you actually tab to them. So if you hit Shift+F2 to open the cli, then type restart, it'll load only one tab in each window.

10

u/-motts- Feb 17 '16

TIL about Shift+F2. Nice!

3

u/TinynDP Feb 17 '16

There are chrome extensions that make it behave like that

1

u/manys Feb 18 '16

Too bad any one of the ones you activate can freeze every open instance.

1

u/emn13 Feb 20 '16

It's unlikely the guy is actually running 12 chrome windows with 60+ tabs each - or he's using an absurd machine or visiting small plain text sites and has 0 extensions. On my extension-lite chrome, each tab needs around 30MB of private memory; so 720+ tabs is more than 21GB. And that's optimistically; some JS+image heavy tabs take 100s of MB.

And that's just counting tab-local private memory. There is some overhead elsewhere.

720 tabs? Something is unusual there, or he's exaggerating, or he's not using chrome (all other browsers share at least some processes, and thus scale a lot better).

5

u/piscaled Feb 17 '16

Out of curiosity, what OS are you running?

22

u/AlcherBlack Feb 17 '16

A flavour of Linux.

75

u/Neebat Feb 17 '16 edited Feb 17 '16

The ultimate OS snob. :-) "Oh, I build my own. A name would only degrade it."

Edit: I miss my long uptimes. Ever since they made me replace my workstation with a laptop, the damn thing crashes at least monthly. I used to be the go-to guy when anyone needed to test something on a machine that hadn't been rebooted.

38

u/[deleted] Feb 17 '16

I decided to check my uptime.

 18:49:30 up 648 days,  7:16,  1 user,  load average: 0.12, 0.16, 0.11

I think I should reboot. In a year. Or two.

26

u/unfo Feb 17 '16

what you have there is an insecure system.

→ More replies (7)
→ More replies (4)

16

u/dtlv5813 Feb 17 '16

Oh, I build my own. A name would only degrade it."

So instead of anonymous functions we now have anonymous OSes.

→ More replies (5)

1

u/newPhoenixz Feb 18 '16

Not me, I'd never!

→ More replies (82)

70

u/FireCrack Feb 17 '16

Logs onto rarely-accessed Windows server in closet somewhere.

Begins working on fixing problem.

Opens up StackOverflow on the server's browser for help.

Fixes problem.

Logs off server, doesn't close browser.

2

u/lolomfgkthxbai Feb 18 '16

Logs onto rarely-accessed Windows server owned botnet server with security updates that are 18 months out of date in closet somewhere.

Fixed that for you.

23

u/Salyangoz Feb 17 '16 edited Feb 18 '16

Im pretty sure one of the 18 mo ones might be the raspberrypi I hooked to an elevators speakers.

edit: Lost my glasses and read as a post about spotify servers. I didnt hook up stackoverflow to elevator speakers.

5

u/flexiverse Feb 17 '16

It's probably a server or something that's on 24/7 and the admin was looking up a question to fix something and he just left it open.

12

u/jonab12 Feb 17 '16

ELI5: How can two web servers (IIS) handle 500,000 concurrent WebSockets?

I thought WebSockets have more of a network expense than traditional connections. I can't imagine each WebSocket updating the client in real time with 499,999 other clients with two servers..

51

u/marcgravell Feb 17 '16 edited Feb 17 '16

Where did you read "two web servers", and where did you read IIS? In terms of where it exists:

running on the web tier

That means that for prod, it runs on 9 servers (ny-web01 thru ny-web09), the same as the main app. Actually, it might be all 11, but I'm too lazy to check.

And secondly:

The socket servers themselves are http.sys based

i.e. not IIS. They are actually windows service exes. Actually, though, I think Nick may have mis-spake there; I'll double check and get him to edit. They are (from memory) actually raw sockets, not http.sys. One of the reasons for these outside of IIS is because we deploy to IIS regularly (and app-domains recycle), and we don't want to sever all the web-socket connections when we build.

Nick has a blog planned to cover this in more detail, and there are a lot of other things we had to do to make it work (port exhaustion was a biggie), but: it works fine.

Edit: have spoken to Nick; he's going to change it to:

The socket servers themselves are using raw sockets, running on the web tier.

→ More replies (4)

9

u/Khao8 Feb 17 '16

Each websocket is a resource that the server holds onto and they use a couple kb each. On those web servers with 64gb of RAM they have plenty of resources to simply hold onto those connections forever. Also, the websockets are only for updates when users get replies, comments, etc... so for those 500,000 open connections, there isn't a lot of data being sent back and forth, and it's always very small payloads. Odds are, most of those open websockets see no data being sent (or almost nothing). A lot of users on StackOverflow contribute little, so they wouldn't get a lot of updates from the websocket.

8

u/marcgravell Feb 17 '16

Indeed. We need to send a little something occasionally just to check the endpoint is still alive (you can't rely on socket closure being detected reliably), but they're actually pretty quiet most of the time. It depends on the user, and which page they are on, though.

→ More replies (4)

4

u/[deleted] Feb 17 '16

Also, the good thing about push is that small delays are usually tolerable. Even if the servers are occasionally overloaded, say when a notification needs to be broadcast to all of the clients, nobody is going to notice a 1-2 minute delay for a notification they weren't even expecting in the first place.

5

u/marcgravell Feb 17 '16

"overloaded" in this case would be a few seconds, not a few minutes; but in essence, yes: it doesn't matter if it takes 0.1s vs 5s if they weren't expecting it. Also, we view web-sockets as non-critical functionality. We love having it, but if we need to bring it down for a bit: you'll see the updates on your next page load instead.

10

u/For_Iconoclasm Feb 17 '16

Do you share the TLS session cache between your load balancers? If not, doesn't the browser need to re-negotiate if it hits the other load balancer with its next request? Solutions that I've found for that problem seem a little complicated, so I'm wondering how you handle it.

14

u/nickcraver Feb 17 '16

You should pretty much stick to the same load balancer all the time unless we failover to do some work - so it's not often a concern. HAProxy 1.6 does have some syncing ability, but it's not really on our radar as a concern because with a single data center: our TLS termination needs to be more local to you for fast paces anyway. That's why we're using CloudFlare currently and looking at future options.

3

u/theshadow7 Feb 17 '16

Thanks for your responses in this thread Nick. Along the same lines, how many concurrent TCP client connections do you see on your LBs? How were you able to survive with just 2 loadbalancers, wouldn't you eventually just run out of ephemeral ports to talk to your upstream servers, unless idle connection reuse on HAProxy to the upstream servers is good enough solve that problem for you? What kind of hardware are these loadbalancers running on?

5

u/nickcraver Feb 18 '16

Websockets are the majority of our concurrent connections since webpage requests are pretty brief (we send a 5-15 second keepalive, depending on what you're hitting). During peak traffic, it's about a half million websockets, but that's on both sides of the load balancer - so roughly a million connections.

The 4 load balancers are: 2 for CloudFlare (or whatever DDoS mitigation) and 2 direct. One of each pair is "active" (via keepalived, though the each set actually has 2 sections of the /24 active for multi-IP-per-bind setups). We can run out of ephemeral ports, but we current mitigate this in two ways: 1) Inside HAProxy from TLS processes (bind 2 3 4 procs) to the :80 (bind 1 proc) frontend, we're using abstract named sockets. 2) We bind the socket servers running on the web tier to multiple sockets (5 currently), and we add them as separate "servers" in the HAProxy backend (here's a screenshot).

Here's a recent hardware list, but I'll be doing a follow-up post with more hardware details soon.

21

u/908 Feb 17 '16

have been wondering how the programming language gets chosen - why is this thing running on asp net

does it depend on the nature of the sites funcionality ( sharing dog photos versus online casino etc )

is it usually because its a language that the founders know

34

u/Gotebe Feb 17 '16

Yes, one does best what one knows best.

Language differences are overrated.

Even complete platform differences are overrated.

1

u/908 Feb 18 '16

but what about the era of mobile apps - may be there is a difference if you need to integrate your website with a mobile app,

then the website+mobile app combo is may be better to write in a language that covers all - like java website + android java, ruby+rubymotion ?

1

u/Gotebe Feb 18 '16

Mobile is different than SO though.

Mobile is fragmented, so Java won't get you far with iOS or Windows, while things like rubymotion or phonegap work, but are usually sub-par to native toolchains.

→ More replies (1)
→ More replies (1)

20

u/robvas Feb 17 '16

Joel (one of the founders) was a big Microsoft guy, he explains why they used Windows here: https://www.youtube.com/watch?v=NWHfY_lvKIQ&feature=youtu.be

5

u/gbrayut Feb 17 '16

A bit dated but still a great talk! Windows/performance part starts around 25 minute mark: https://youtu.be/NWHfY_lvKIQ?t=24m50s

29

u/aalear Feb 17 '16

is it usually because its a language that the founders know

Can't speak for everyone, but that's basically the case for Stack Overflow.

7

u/gospelwut Feb 18 '16

They've commented on this before. It's better to REALLY know something than to constantly switch technologies all the time and not know it back and forth. To be clear, as stated in the article, they rewrote ILGenerator so we're talking some "low level" (relatively speaking) shit.

SQL Server can also haul ass to be honest. I think with hardware prices, in-memory table SQL is going to prove to be quite the force. Most people will realize they did want relational datasets after all.

12

u/hu6Bi5To Feb 17 '16

is it usually because its a language that the founders know

This one.

→ More replies (5)

18

u/artbristol Feb 17 '16

The post should be required reading for everyone starting a new project.

What I take from it is that vertical scaling (more powerful boxes) can get you a staggering amount of scale, and that almost every web application tier can run on a single box of sufficient power. You generally only need multiple boxes for availability.

8

u/coworker Feb 18 '16

A lot of that scale is possible because a ton of their content is effectively static at this point and has a CDN in front of it.

24

u/nickcraver Feb 18 '16

I'm curious - what do you think is static? Can you clarify? Aside from CSS, JavaScript, and images (the normal bits), we actively render all but 4% of page views - constructed from the database up. By that I mean we get the posts, users, comments, votes, related questions, etc. from the database...every time.

If people are under the assumption that question pages are rendered once and left: that's not true. Due to us rendering relative dates, showing a user's reputation, etc. that's just not practical. If it was I'd have a proxy cache in europe today :)

2

u/NotInVan Feb 18 '16

I wonder... Ever thought about doing a cache of intermediate representations? Or would that be too complex / not worth it?

4

u/nickcraver Feb 18 '16

This comes up when making far away locations fast. It's just too complicated (in our opinion) to make work. We're far more likely to put a SQL server read-only replica a few seconds behind in that location and render on a local web tier there. We have a plan but are just really busy at the moment - stay tuned :)

1

u/coworker Feb 18 '16

Taking the most popular post of all time, there is literally no data on that page that could not be hours or even days stale. The core content (question and comments) will probably never change again, or if it does, very infrequently. It is effectively static. The vast majority of your content is like this. Even data that gets updated "frequently", like user points, still never really needs to be real-time. Shit after 3 years, even relative dates probably only need to be re-computed once a day.

In terms of caching, it could make a lot of sense to have javascript pull this core "static" content from an api fronted by your CDN. You would then get easy speedups from geo-locality as well as multi-threaded rendering via modern browser pipelining. Obviously, there's a lot of caveats and requirements I am ignorant of so really I was just trying to justify some of the thought process of my original comment. You have said you use an internal redis cache but it doesn't sound like any of the intermediate content is cached which seems odd since I can't imagine any users actually caring about it being stale.

4

u/nickcraver Feb 18 '16

Oh they care :) We get bug reports on any numbers out of date. For example, if you see your reputation in the top bar and it doesn't match your user card in the question. Is that fixable/fakeable with post-processing? Yeah sure, but that's a never-ending game. The list of things to fix is just daunting beyond the point of questioning reason-ability once you go through it all.

It's simply a matter of simplicity - the current setup: "just render it", it simple and fast enough. Do we want faster page loads all over the world though? Absolutely. That's (hopefully) my next big project - putting a 2U platform for serving read-only content out of a data center on multiple continents. Stay tuned, I hope we're able to pull that off.

→ More replies (1)
→ More replies (1)

6

u/[deleted] Feb 18 '16

The key important thing here is that their business allows them to have absolute control over the entire product and it's stack, and they have a lot of very bright engineers who have an obsessive focus on performance.

If you're working on a project for another business where you need to talk to a bunch of software by other teams or third parties that aren't as focussed on performance - then a bunch of the things they do just aren't possible.

54

u/deal-with-it- Feb 17 '16

I am a Windows guy but I still cant believe they can run StackOverflow and others off a single IIS instance.

3

u/gospelwut Feb 18 '16 edited Feb 18 '16

That single IIS machine is better than 1/3rd as good as one of our ESXi boxes, so...

1

u/nickcraver Feb 18 '16

Is that true? Really, can you clarify? I'm really hoping you're comparing against a SQL server and not the web here. To be clear: our IIS boxes are dual proc and 64GB of RAM, not really crazy for a 1U server (they go to 1.5TB these days, 3TB soon).

If it's right, that surprises me. RAM is so cheap, putting less than 64GB in a ESX server seems almost criminal, I'd happily help you argue with the boss on that one.

1

u/gospelwut Feb 18 '16

Oh. I misread the specs (I must have been reading too fast).

That's still 1/3 as good as one of our hypervisors. I was simply trying to further the point that VMs for prod make less and less sense (if you have proper monitoring and orchestration...). For us this is mostly due to licensing as we're charged heavily per proc, and you can only get so much RAM per proc/per mobo. (Each proc is tied now to Microsoft Datacenter licensing, backup licensing, VMWare licensing, etc)

I am jealous of the PCIe SSDs on though. We just upgraded to 10GbE SSD "hybrid" LUNs for MSSQL and thought it was Christmas.

TBF we do a lot of shit in our code bad though, so I can't simply blame the hardware. I'd really like to see you do some articles based around some topics I've seen you tweet (e.g. performance, bosun, draw times/orders & user perception of slowness, etc.)

43

u/marcgravell Feb 17 '16

Fortunately it doesn't happen very often or deliberately; but... I confess I've caused more than one of these moments and it does work-ish (I tend to work on a lot of library, framework, and infrastructure code - which I'm going to use as my excuse for having a higher server-murder rate)

→ More replies (3)

3

u/qlaucode Feb 17 '16

Nice post. Can't wait to read more. Are there any plans to change from MVC 5 to MVC 6 (or Core or whatever new name they come up with)? Is it still too new to even consider, or are you happy with where you're at with the framework?

2

u/nickcraver Feb 17 '16

There are many dependencies that aren't in place yet for .Net Core, but a few of us are working through our libraries and porting them over. Next up for me is StackExchange.Exceptional (pending RC2) then MiniProfiler.

1

u/titoonster Feb 18 '16

Will you switch to hosting on Linux once the porting is complete? I know you have a heavyish investment in DSC? Or upgrade to core just to save on slimming httprequest context?

2

u/nickcraver Feb 18 '16

I wouldn't say we're tied to our DSC investment. Linux is far more automated with puppet than we are with DSC, so jut not a factor. The harder, or at least less simple thing is simply sharing port 80, which IIS does for us. The host header handling on the web server has many advantages, as well as the process management, etc.

We'll be looking at Core of course, there are just many dependencies (libraries) we have to upgrade first, which /u/marcgravell/ and I are plowing through. It'll be a while before that can be a reality for Stack Overflow. Now, smaller projects we run other than the main site...probably a different story :)

3

u/beginner_ Feb 18 '16

My conclusion is as I always say in NoSQL vs Relational DB threads: Performance and horizontal scaling is not a reason to go NoSQL. I usually used Wikipedia as an example but this is just as good. If these huge websites can run on SQL Server, your new pet project for sure can do it too. And as we can see vertical scaling gets you very far using modern server tech (lots of RAM pcie-ssds, 2x12 cores).

0

u/coworker Feb 18 '16

Their entire dataset is < 10TB. That's not exactly big data. They never split out reads/writes but I would assume it is very heavily read-skewed. Even traditional RDBMSes are fairly easy to horizontally scale reads.

1

u/nickcraver Feb 18 '16

I can pull stats if you like - our read/write ratio is 40/60 at the SQL server level. If there's something more specific, let me know - happy to provide any numbers we have.

→ More replies (2)

2

u/CloudEngineer Feb 18 '16

Is there a "Systems Engineering" subreddit?

Heck I think even the folks at /r/aws might appreciate it. This is freaking awesome.

1

u/nickcraver Feb 18 '16

The only thing close I'm aware of is a /r/sysadmin, but that's not really what you're after, I think. If you find such a subreddit, let me know!

1

u/[deleted] Feb 18 '16

Maybe we should make one called /r/webscale :p

2

u/sveiss Feb 18 '16

Thank you for sharing this -- your posts on the SO architecture are always worth reading. It's fun to see the differences (Windows, .NET, SQL Server vs Linux, Rails, MySQL) and similarities (HAProxy, Elasticsearch, Redis) with the stack I work on.

I'm also rather jealous of your neat racks and control of your network hardware. Yes, SoftLayer had a network blip again today...

2

u/nickcraver Feb 18 '16

Thanks! I take this one personally :) I do most of the cabling when we do a move unless Shane Madden is around to tag team it, he's awesome at it as well. When we do a major upgrade or datacenter move, everything gets a pass a tidied up.

45

u/NotInVan Feb 17 '16

due to the optimizations and new hardware mentioned above, we’re down to needing only 1 web server. We have unintentionally tested this, successfully, a few times.

Oops? Good it worked, though!

11

u/[deleted] Feb 17 '16

I wonder how many man hours they spent on this setup and how much it would cost in AWS. Pretty sure they would save money especially since they can have their servers scale instead of having so much power on standby.

137

u/nickcraver Feb 17 '16

Granted AWS has gotten much cheaper, but the last time we ran the numbers (about 2 years ago), it was 4x more expensive (per year, over 4 years - our hardware lifetime) and still a great deal slower. Don't worry - I look forward to doing a post on this and the healthy debate that will follow.

Something to keep in mind is that "the cloud" fits a great many scenarios well, but not ours. We want extremely high performance and tight control to ensure that performance. AWS has things like a notoriously unreliable network. We have SREs (sysadmins) that have run major properties on both platforms now, so we're finally able to do an extremely informative post on the pros and cons of both. Our on-premise setup is not without cons as well of course. There are wins and losses on both sides.

I'll recruit alienth to help write that with me - it'll be a fun day of mud slinging on the internet I'm sure.

13

u/kleinsch Feb 17 '16

Networking on AWS is super slow and RAM is super expensive. You can get 64G of memory for your own servers for <$1000. If you want a machine with 64G memory from AWS, it's $500/month. If you know your needs and have the skills to run on our own machines, you can save a lot of money for applications like this.

5

u/dccorona Feb 18 '16

$500 a month if you need to burst it in and out, yea. But that's not at all a fair comparison compared to a server you own, because you can't ever not be paying for that server. So in that case the appropriate point of comparison is a reserved instance, which is $250/mo if you get a 1-year term on it or $170/mo on a 3-year term...still more expensive than owning the thing, of course, but that's your only server cost...if it dies, you pay nothing to replace it. You don't pay for electricity or cooling, you don't pay for a building to put it in. And all of that comes in conjunction with the ability to spin up another instance at a moments notice, albeit at a much higher price, if you really need to.

2

u/cicide Feb 18 '16

AWS has become pervasive, and in most cases now, when talking with people who are deploying applications, it's the only thing they look at.

We also run our own data centers and have looked at what it would take to be able to use AWS in any way (migrate completely, migrate only elastic systems, etc.). What we found was fairly enlightening.

First if you dig into the pricing, what you find is that if you plan to use a system for more than 30-40% of the time, the three year all-upfront pricing works out to be cheaper than paying by hour over that period. So right off the bat, you can make a fairly valid assumption that elasticity only saves money at a overall usage of under approximately 35% (it varies a few points up or down depending on the instance type).

With that in mind, I took one of our systems that looked like a great candidate for moving into AWS. One of our many (~40) batch worker systems (40 cores, 64GB RAM, ephemeral disk). What is nice about this example is I don't need a single server with 40 cores and 64GB, I can use 40 servers with one core or any other variation, as these systems have hundreds of workers that poll a queue for work.

My three year OPEX + CAPEX fully loaded cost for that server is approximately $9000, or about $250/month. This included all bandwidth requirements and a security stack that is quite comprehensive. If I go to AWS calculator, the best I was able to do was ~$24k over three years (all up-front reserved instance(s)), and I tried with one large instance and many small. Add into that bandwidth and the security stack I would need to build on top of the AWS instances.

Now if I can have a usage of less than 35% then pay by hour makes sense, and if I can take advantage of spot instances, I could see some breaks as well. Unfortunately, these systems run closer to 50-60% average throughout the day, so I'm past the break even point.

I think I will have some services in the future that will make sense to host on rented infrastructure (AWS, Azure, Google, whatever).

My infrastructure is a little larger than SO, and I do have a secondary hot-standby DC that doubles my cost, so in reality, that server above that I quotes out at $9000 loaded is actually $18,000 loaded when you consider I maintain a 100% Data Center copy for protection from "acts of god" events, the story changes a little, but still not enough to make a difference in the numbers.

The other benefit I have with a DC that I build is that I can ensure performance (network jitter, latency, storage performance, etc.), and in a scenario where every millisecond counts in page load times, I can't emphasize how much a difference this makes. As an example several years back, we were running on rented shared infrastructure and were seeing our server side page render times in the 600 - 900 ms. We changed nothing except moved to a self-hosted physical infrastructure and our server side page render times dropped to 350ms +/- 10ms. So not only did we cut the render time in nearly half, we also cut the variance from ~300ms to 10ms. We believe that this was wholly network congestion and latency related on the shared network in the IaaS we were using.

1

u/realteh Feb 18 '16

Networking on AWS

Citation needed. We found networking to be really fast (maxing out 1G from S3) but only on the large machines that advertise it.

Def. agree with pricing though.

4

u/nickcraver Feb 18 '16

We'll cover this in that in the post, but some of our sysadmins have run major sites on AWS (for example: this site) and experienced these problems first hand. It's not about the speed, it's the reliability.

4

u/kleinsch Feb 18 '16

Sorry, slow has many meanings. It's easy to get high bandwidth, it's hard to get low latency. You're going to get 0.5ms-2ms latency between servers running in cloud hosting. Because the network is out of your control, this latency can also be unpredictable.

For some types of applications (like VOIP) this makes cloud hosting difficult or impossible.

2

u/CloudEngineer Feb 17 '16

Networking on AWS is super slow

That's a bit of a general statement. There are instance with 10GB networking available. Can you be more specific?

4

u/[deleted] Feb 18 '16

My guess would be that it is a network over a cloud and hard to tailor, whereas a network produced for a precise hardware configuration should be a lot more performant. Or maybe there is something specific about AWS that I am ignorant of in which case I welcome corrections.

2

u/man_of_mr_e Feb 24 '16

Have you considered comparing costs on Azure as well? Microsoft might be more than happy to cut your costs in exchange for using you as a case study. And, Azure has SSD and huge VM sizes such as the 448GB/6TB SSD G5 instance.

I haven't compared the pricing of Azure to AWS, but Microsoft really seems to be doing some Amazing stuff, and given how tight you guys are with the dev teams...

2

u/nickcraver Feb 25 '16

Oh yes, absolutely. We'll be doing a cost comparison of Azure as well in the post.

What stood out last time in SQL Azure likely wouldn't meet our needs, as the Stack Overflow database alone is approaching twice their highest limit (1TB). Azure would definitely require some re-engineering of the database and making tradeoffs during the migration, but that's going to be almost universally true between any two infrastructure layouts.

17

u/gabeech Feb 17 '16

FWIW I was bored a few fridays ago, and guestimated the cost given a (horribly bad assumption of a 1-1 migration to the cloud) and it worked out to something in the range of 2-3x our current price out to 4 years, and then much high assuming we stop upgrading hardware instead of replacing it.

5

u/wkoorts Feb 17 '16

AWS has things like a notoriously unreliable network.

Could you elaborate more on this please? I'd be interested to know specifically what metrics are used and what's considered to be the "unreliable" threshold. Genuinely interested as I may be involved in some hosting evaluations soon.

7

u/gabeech Feb 18 '16

Quick and easy test, spin up a few instances and watch the time jitter when you run ping between hosts.

2

u/wkoorts Feb 18 '16

That sounds like you're referring to their internal network, is that right?

4

u/gabeech Feb 18 '16

Yea, I'm not an AWS expert by any means, but network connectivity was always an issue when I've done stuff there. I had to put Two DC's in a different site in the same AZ once because they couldn't talk reliably enough.

→ More replies (6)

2

u/thvasilo Feb 17 '16

That would be a great post, thanks!

2

u/bakedpatato Feb 17 '16

I'll recruit alienth to help write that with me - it'll be a fun day of mud slinging on the internet I'm sure.

Well considering how many times I see "Reddit is too busy to handle your request" vs how many times ive seen SO go down I think you would win handily in terms of the end result haha

1

u/itssodamnnoisy Feb 18 '16

That has little to do with AWS itself, and more to do with what their auto scaling group is capped at / when it's configured to launch a new instance / how long it takes a new instance to fully spool up, I'd wager.

0

u/[deleted] Feb 18 '16

[deleted] — view deleted comment

3

u/nickcraver Feb 18 '16

When we do AWS calculations, we're assuming far less headroom than now. I think 2 years ago we went from 10x capacity down to 2x to even approach reasonable. With the same headroom as today, it'd be far more expensive.

Oh and that assumes totally re-engineering our architecture You still being your own Enterprise Edition licenses for SQL. And AWS doesn't have servers with enough RAM even on the high end for those. So we'd have to totally change the database layout, at a minimum.

9

u/Catsler Feb 17 '16

If you're interested in 2 SE engineers' views on this exact point:

The Stack Exchange Podcast: SE Podcast #17 - Kyle Brandt & George Beech https://overcast.fm/+BW5g11dA

From 2011 - it's cheaper than AWS.

4

u/gabeech Feb 18 '16

Ahh yes how much i hate the way my voice sounds.

5

u/sisyphus Feb 17 '16

The first cluster is a set of Dell R720xd servers, each with 384GB of RAM, 4TB of PCIe SSD space, and 2x 12 cores.

Spec just 4 of those machines(you can't really get that but as close as you can get) with Windows and SQL Enterprise on EC2 and report back on the savings...

1

u/CloudEngineer Feb 18 '16

I think AWS' biggest server (in terms of RAM) is 244GB. So simply not possible.

2

u/dccorona Feb 18 '16

Until the X1 comes out later this year, yes. But I wonder whether SO really needs that 384gb of RAM to be on one physical machine, or if two boxes that add up to the same amount of RAM and compute wouldn't be just as good.

2

u/nickcraver Feb 18 '16

One server with 768GB would be comfortable for all databases combined (rather than 2 clusters), but less than that may mean touching disk more. It'd work, but we would sacrifice performance.

RAM is just so damn cheap compared to almost anything else, so we go big. With 64GB and 128GB DIMMs rolling out now, this is only becoming more true.

→ More replies (1)
→ More replies (1)
→ More replies (17)

26

u/[deleted] Feb 17 '16

Stack Overflow is the 55th ranked website on Alexa which surprised me at first, but it makes so much sense. It's such an amazing resource

26

u/nightcracker Feb 18 '16

Software development is pretty niche, but within that niche stackoverflow is by far the #1 resource, and is use intensively by (nearly) everyone in the field, so I'm not that surprised.

→ More replies (3)

165

u/[deleted] Feb 17 '16 edited Feb 17 '16

MFW reddit shits on asp.net/MS, in favour of the latest esoteric hipster tech, yet this shows just how solid and scalable it is.

142

u/ryeguy Feb 17 '16

I haven't seen anyone on here claim that the microsoft stack isn't scalable or solid.

I'd also say that the success of this architecture is more due to the fact that it's competently engineered with performance as a focus. It's also not deployed on some shitty overpriced and underpowered cloud servers.

20

u/Eirenarch Feb 17 '16

I haven't seen anyone on here claim that the microsoft stack isn't scalable or solid

If by "here" you mean this thread you are correct but if you mean /r/programming you must be new here. Although this is not the majority opinion it is voiced quite often.

→ More replies (1)

16

u/jonab12 Feb 17 '16

Has anyone dared to argue that Node is the most scalable?

→ More replies (2)

2

u/[deleted] Feb 18 '16

I haven't seen anyone on here claim that the microsoft stack isn't scalable or solid

You didn't read this very thread?

→ More replies (17)

40

u/nullball Feb 17 '16

I don't see anyone shit on MS or asp.net? I think everyone knows that every major back-end will work well, as long as you work well.

60

u/Ravek Feb 17 '16

I've definitely seen highly upvoted comments that were basically 'no performant system has ever been built in ASP .NET'.

8

u/blackraven36 Feb 17 '16

As if people have an example of when it failed. There are quite a few arm chair web architecture experts on here.

If you build a system competently it will perform well. Their scaling comes largely from the fact that their architecture is very well defined, well built and well run. It means very little whether they build the software with RoR or ASP.Net because they would still face the exact same challenges.

19

u/hu6Bi5To Feb 17 '16

I think people are fighting a strawman here. No-one has criticised ASP.NET for scalability, in this definition of scalability.

But people often criticised it (or at least used to, and I expect is the primary reason why ASP.NET is leaping on .NET Core on non-Microsoft servers as a deployment target) due to higher costs and poorer automation compared to an army of Linux boxes controlled by Puppet, for instance. In that sense people criticised it's scalability...

→ More replies (1)
→ More replies (6)

2

u/[deleted] Feb 18 '16

I've seen this too.

When I pointed out SO as an example, I got a response along the lines off, Yeah, but that doesn't get anywhere near the traffic that Reddit does.

Yeah buddy, because I'm sure your new website is going to be the next Reddit, thank goodness you didn't make the mistake of going with ASP.Net!

20

u/cwbrandsma Feb 17 '16

Any system can be scalable if you are willing to put the work into making it scalable. But a developer that isn't prepared to write scalable code will never get there no matter how good the tools are.

0

u/[deleted] Feb 17 '16

[deleted] — view deleted comment

23

u/big-fireball Feb 17 '16

It can certainly be "fast enough" though.

→ More replies (7)

8

u/cwbrandsma Feb 17 '16

Speed of the language can be countered with effective caching and adding servers.

I agree that ruby is not fast, but I remember Twitter getting pretty far with it. PHP isn't fast, but Facebook did the same for quite a while.

The more important scalability issue, to me anyway, is data storage.

8

u/merreborn Feb 17 '16 edited Feb 17 '16

PHP isn't fast, but Facebook did the same for quite a while.

Facebook still uses a lot of PHP -- or at least code/platform that very strongly resembles PHP. And Wikipedia is still without a doubt a PHP application through and through.

The more important scalability issue, to me anyway, is data storage.

Yes, in your average LAMP app, you can just throw more cpus at your web tier, but the database is a much harder problem. You can add slaves, but they only give you read bandwidth, not write bandwidth.

10

u/rubygeek Feb 17 '16

And this is what fucked Twitter over originally: Not that they used Ruby. Not even that they used Rails. But that they didn't fan-out their message storage from the start. When they eventually did it, they blamed Rails and Ruby for their own architecture shortcomings.

→ More replies (2)

1

u/yogthos Feb 18 '16

Yet, GitHub is doing just fine.

1

u/[deleted] Feb 18 '16

Python is also slow , but yet it powers reddit. Querying the database takes the most time when it comes to big websites. A good cache system will solve that for you.

14

u/Stoompunk Feb 17 '16

They also shit on Java, heh.

0

u/[deleted] Feb 17 '16

[deleted] — view deleted comment

25

u/Stoompunk Feb 17 '16

It's also a great language to write in, type safety and generics rock!

50

u/[deleted] Feb 17 '16

If you like generics, and rich types, then try C#.

10

u/mipadi Feb 17 '16

And if you really like rich types, try Scala!

19

u/hippydipster Feb 17 '16

Well, there's rich, and then there's ostentatious.

→ More replies (7)

13

u/Stoompunk Feb 17 '16

Why? I tried it, but prefer the Java world.

41

u/bwrap Feb 17 '16

I uh... what...

To each their own. It took 30 minutes of playing with C# for me to forget Java even exists anymore.

38

u/monocasa Feb 17 '16

I like C# (the language) more, but I like Java (the ecosystem) more.

Microsoft (and Oracle) have been making big strides in changing that situation though.

→ More replies (5)

7

u/hu6Bi5To Feb 17 '16

...and 2/3rds into an comment section on a topic that attracts a lot of attention from .NET fanboys, and the attacks on Java begin even though it has nothing to do with the original article; and indeed wasn't even mentioned once.

I'm shocked. Shocked!

It's usually the top comment!

5

u/colablizzard Feb 17 '16

It's also got an ecosystem. Name the functionality, and there is a library for that, that too apache licensed!

2

u/[deleted] Feb 17 '16 edited Feb 18 '16

Is there a library for IP Over Pigeons?

Edit: Spelling

3

u/colablizzard Feb 17 '16

Yup. Every April 1st only.

→ More replies (1)

3

u/[deleted] Feb 17 '16

Probably because of it's lack of running on anything other than windows and IIS and favoring SQL server, which can get pricey.

Things are changing though with .NET Core. Maybe the hate will too.

0

u/nemisys1st Feb 17 '16

Preach. Full stack .net dev here.

→ More replies (11)

6

u/[deleted] Feb 18 '16

I feel so inadequate!

Great read, thanks.

44

u/[deleted] Feb 17 '16

Wait, no cloud, Python, Node.js, Hadoop, AngularJS, Docker & bash?

That could never possibly work. Oh wait.

[Sarcasm mode off]

1

u/quiI Feb 18 '16

So edgy

→ More replies (4)

4

u/damnitbob Feb 18 '16

HTTP traffic comes from one of our four ISPs (Level 3, Zayo, Cogent, and Lightower in New York)

This is brilliant, I never thought about having redundant ISPs. Internet's a bit spotty, I'll just switch over.

4

u/emilvikstrom Feb 18 '16

Most data centers bring in different providers from different directions just to prepare for the inevitable road work fail.

1

u/pdbatwork Feb 17 '16 edited Feb 17 '16

here’s a day of statistics from February 9th

and

607,073,066 (+48,848,481) ms (168 hours) spent running SQL queries

Am I reading this wrong or are you suggesting we had a 168 hours long day February 9th?

I can't really read anywhere what these 168 hours covers?

EDIT: OK, now I feel stupid. 4 minutes and 5 people suggests it CPUhours.

17

u/nickcraver Feb 17 '16 edited Feb 17 '16

To clarify: This is the total wall time spent in a category, summed up from all requests that day. It is not CPU hours (that's higher, but more expensive to measure) as some assume. And we're handling many simultaneous requests. If someone has a way to concisely make this much clearer, I'll happily update the post. I'm just not sure how to be convey this without being more confusing.

Example requests:

  1. 10ms spent waiting on SQL (wall time)
  2. 11ms spent waiting on SQL (wall time)
  3. 14ms spent waiting on SQL (wall time)

Total: 35 ms of wall time combined, possibly in the same 14ms window - does that make sense?

8

u/contrarian_barbarian Feb 17 '16

I was wondering if this was the explanation. So essentially it's the sum total of all time threads on the web servers spent waiting for responses from the SQL servers?

8

u/nickcraver Feb 17 '16

Yeah that's a good way to think about it - we're literally starting and stopping a high resolution timer around every SQL call we make inside the application, via MiniProfiler.

11

u/Rhoomba Feb 17 '16

Multiple threads/processes/machines.

3

u/contrarian_barbarian Feb 17 '16 edited Feb 17 '16

They have 4 dedicated SQL boxes. 2 have 2x12 cores, 2 have 2x8 cores. Total of 40 cores, so 168 hours is actually about 4 hours per core per day, or ~18% average utilization (although they probably have certain times that are peak usage, so the utilization is likely significantly higher during these periods, plus you want enough excess capacity to cover if 1 or even 2 of those boxes are down).

4

u/notunlikethewaves Feb 17 '16

That's 168 hours in total, across all machines and all queries, many of which will be happening in parallel.

If you, I and eight others go get some shovels and spend 6 hours digging a ditch, then we collectively spent 60 hours on ditch-digging in total.

1

u/m1around Feb 17 '16

Best guess would be 'hours of cpu time' so with multiple cpus you can get > 24 hours.

1

u/vatara420 Feb 17 '16

I assume that is the combined processing time for all their SQL servers for that day.

1

u/grunzl Feb 17 '16

They run multiple SQL server instances ... or their servers are on Mercury or Venus (but the response time seems to reject that hypothesis).

1

u/keypusher Feb 18 '16 edited Feb 18 '16

I do wonder if Joel was a large influence for running primarily on a Microsoft stack. Not that there is anything wrong with the choice, it's just surprising for a site that is so much a part of the tech ecosystem when all the other architectures I see for Google, Amazon, startups, etc are running primarily on open source.

1

u/nickcraver Feb 18 '16

Joel, Jeff and the original team of Geoff Dalgas and Jarrod Dixon were extremely comfortable on .Net. There simply hasn't been any compelling reason to move off it - we've solved all of the problems that come along and if at all possible, open source and upstream all those solutions.

1

u/[deleted] Feb 18 '16 edited Feb 18 '16

What is your take on vnext / dnx core ? Any plans to migrate to linux ?

Also, I was looking at the websocket lib. It could use some document and comment love. Looked like a great solution that I couldent extend, as is.

2

u/nickcraver Feb 18 '16

vNext/Core has a lot of promise. /u/marcgravell and I are heading up porting many of our libs over and dealing with issues as well as pushing Microsoft where needed. There's a ways to go though. For example, Dapper, StackExchange.Redis, Jil, and Sigil are all running on .Net Core, but Exceptional and MiniProfiler aren't yet (next on my list, after RC2 drops). There are other blockers that will take more time to port or evaluate replacements for like DotNetOpenAuth.

Moving to Linux? No plans. That would be trading something that working great for many unknowns. Spinning up new things on Linux? Maybe.

And thanks for the GitHub issue on documentation - that's much appreciated! I agree we need to improve on many projects, it's all a matter of man hours.

1

u/shinysony Feb 18 '16

What's the benefit of moving sql out of stored procedures and into the application?

3

u/nickcraver Feb 18 '16

We deploy many times a day at a minimum, so even change control across hundreds of databases would be extremely noisy (compared to migrations currently being only schema changes). Given that most of the time you're changing code and the stored procedure, there's just no win. It's more work to debug, tune, and fix. By having no stored procedures, I can easily see everywhere a table is accesses by simply grepping my code base. As an example, if there's another black-box type place elsewhere (inside a stored procedure) simple bits like that become much more time consuming.

There are plenty of situations and use cases where Stored Procedures are awesome. For example, if you're doing native compilation, etc. they can also be performance boosting. They're just not for us.

1

u/thesystemx Feb 18 '16

+1 we use the exact same logic

1

u/eaglex Mar 22 '16

How do you handle (breaking) schema changes?

I'm assuming you roll out new code progressively, what do you do when your code depends on a schema change so as not to affect the currently running code?

1

u/titoonster Feb 18 '16

Hey Nick, amazing as always.
Can you elaborate any more on this trick?

We do some simple tricks here such as ROWVERSION in SQL Server (the data source) compared against a “last position” document in Elastic. Since it behaves like a sequence, we can simply grab and index any items that have changed since the last pass.

So is the trick that you are taking the rowversion is actually treating it a sequence? I thought it was a binary hash. Are you saying it's a binary sequence and you store that in Elastic?

2

u/nickcraver Feb 18 '16

ROWVERISON is a sequence yeah, you can cast it as a BIGINT and in Elasticsearch we keep a single document with a "position" type that simply stores the highest one we saw on the last pass and a timestamp for kicks. That way Elasticsearch knows what position the index it contains is at; beign a self-contained info source on this is big. On the next pass we just select rows with a ROWVERSION > last position and index those - easy delta that SQL server managed by itself.

In other cases where related updated that affect the index aren't on that row (so ROWVERSION doesn't increment), or it has something like ViewCount we don't index...so it increment too often: we just have a LastChangeDate field we compare instead. And it's up to our code to set that when something that affects the index happens. The upcoming Developer Story feature has this setup with the story and sub-items in the story.

3

u/hansmosh Feb 18 '16

What's the next most popular Stack Exchange site after Stack Overflow?

9

u/gabeech Feb 18 '16

Here is a list of SE sites by traffic

TL;DR;

  1. Super User
  2. Ask Ubuntu
  3. Server Fault
  4. English Language & Usage
  5. Arquade

2

u/hansmosh Feb 18 '16

Nice. Didn't see until now that you can switch to a list view and sort in different ways!

http://stackexchange.com/sites?view=list#traffic

2

u/changingminds Feb 17 '16

I kind of have an idea what most of the stuff in their stack does, but I don't have any experience working with these.

Exactly what bits are needed strictly to deal with the massive traffic?

Like, I'm pretty sure I can spin up a pathetic but working stackoverflow clone and I wouldn't need to use most of the stuff mentioned in the post. What all among the stack is used solely to expand a bare bones stackoverflow website to be able to handle hundreds of thousands of concurrent sockets?

2

u/eigenman Feb 17 '16

Questions about Dapper. First why the need for yet another ORM model? I read the GIT Hub description dapper-dot-net and it seems performance is the best attribute. However, I'm a bit concerned about all the inline SQL strings in code. First: Is that a security issue? Second: Is there a Lambda Function method of querying the Dapper ORM? I like the idea of ORMs for SQL server that perform well. Just want to see what people think about Dapper before going deeper.

20

u/marcgravell Feb 17 '16

Hi; primary dapper author here, I hope I can help.

First why the need for yet another ORM model?

Because the other ones were sucky for what we wanted:

  • the tooling could be ugly and fight you in unexpected ways
  • the queries from DSLs and things like LINQ often weren't optimal
  • there were often strange performance characteristics (in particular, we were seeing odd stalls either in the query generation pipe or the materialization pipe)

Dapper takes the approach of doing very little, but hopefully well. It doesn't generate queries - developers should be better at writing SQL than any tool. It doesn't do object tracking, identity tracking, change tracking, etc; that isn't what it cares about. It cares about making it easy to run parameterized queries and get the data into objects (usually for view-models), as fast as possible. Very little abstraction.

First: Is that a security issue?

Nope. It certainly doesn't allow for SQL injection: in fact, quite the opposite - it encourages and simplifies correct parameterization. If you don't want to have your SQL in the app, it works fine with stored procedures (or whatever else your RDBMS calls them).

Second: Is there a Lambda Function method of querying the Dapper ORM?

There are multiple tools that build on top of dapper to provide this type of thing. I don't use them myself, so I don't feel comfortable pointing people at specific ones.

Does that help?

1

u/eigenman Feb 18 '16

Yes ty very much. I'll take a deeper look.

9

u/adam-maras Feb 17 '16

Dapper is an ORM only in that it maps SQL results to CLR objects; it doesn't do anything with relationships, it doesn't provide navigation properties, and it doesn't do any sort of validation. Its only job is to turn rows into objects and objects into parameters. So, no, it doesn't provide any sort of LINQ-like interface for querying.

That being said, Dapper does support using SQL parameters, so using inline SQL isn't a security concern as long as you're using parameterized queries instead of concatenating values into your query strings.

2

u/makonde Feb 18 '16

Whats the SQL Server license cost for that many CPUs I wonder.

1

u/turbov21 Feb 18 '16

Probably less than an Oracle license. Or more. Or equal. It's hard to read Oracle licenses.

1

u/makonde Feb 19 '16

Oracle sure but what about something like Postgres or MySql?

9

u/frugalmail Feb 17 '16

It's refreshing to see .NET folks who know what the F*ck they are doing, it seems to be such a rarity.

Lucky for you folks there aren't many servers for one person to manage easily. Windows still sucks to manage, even though they are doing their best to catch up to Linux/BSD maintainability.

12

u/gbrayut Feb 17 '16

It definitely has it's issues and is no where near as mature as our Puppet based management of Linux, but we can manage Windows relatively well using just GPOs, Powershell Remoting (WinRM), and DSC. I was hired at Stack to help work on the Desired State Configuration implementation, which we've used since the WMF 4.0 previews. It works, but we had to do a lot of custom code and modules to fill in the holes. WMF 5.0 now has replaced a lot of our custom code, and we are in the process of rewriting our DSC builds in preparation for a roll-out of WMF 5.0 and Server 2016.

PowerShell DSC is still missing some major features, like reporting, but we plan on integrating that into bosun and our patching system (which should be open sourced in the future). Microsoft has also been working on adding DSC to Azure Automation and the Operations Management Suite, which is their cloud based replacement for System Center, so things are definitely improving.

2

u/RandomNoun7 Feb 18 '16

I'm really interested in DSC, but I had assumed that it was most useful in environments with lots of servers that need to be protected against config drift.

I'm wondering, with such a small number of servers to manage, what kinds of problems do you find yourself solving with DSC? Could you maybe talk a little bit about how you decided that DSC was the way to go for these problems as opposed to other tools?

3

u/gbrayut Feb 18 '16

It works pretty well for provisioning new systems too and is more structured than the various PowerShell scripts we were using before. Our basic deployment process is PXE boot to Microsoft Deployment Toolkit (MDT) and select the OS version you want, which handles naming, domain joining to specified OU, Windows Updates, and activation key. Once that is finished we then set a static IP and the DSC Local Configuration Manager settings (aka DSC LCM metaconfig) which then will take over and install all the roles/features/apps we want and manage all the registry keys or other settings we want for that specific role (page file, NIC description, etc).

And it isn't just for configuration drift, as both DSC and Puppet are currently used to deploy updates to certain programs, restart services if they crash, or even do basic maintenance tasks. We keep track of "Changes" made during each run, and we usually expect 0 changes unless we roll-out new features so it is easy to alert on any drift. Still nice that if it happens at 4AM it will often resolve the issue without having to wake us up.

DSC also has the ability to orchestrate the deployment of multiple systems using the depends on directive. If you wanted you could have DSC roll out a whole virtual datacenter or lab environment including the Domain Controllers and all the server roles, but right now we just use it for a few basic roles (web, service, file, base apps, etc).

→ More replies (2)
→ More replies (1)

1

u/[deleted] Feb 18 '16

It's always interesting to see another website in the 50mil+ hits per month club. Keep up the good work

0

u/[deleted] Feb 17 '16

StackExchange.Redis + Protobuf-net + F# is a fun time for your L1/L2 caching needs.

You will need to explicitly call the implicit operators in StackExchange.Redis though, which is hilarious. This little operator overloader makes it less annoying:

 let inline (!>) (x : ^a) : ^b = ((^a or ^b) : (static member op_Implicit : ^a -> ^b) x)

2

u/marcgravell Feb 17 '16

I take pull requests if there is something I should be doing different to remove this.

1

u/[deleted] Feb 17 '16

Nope, not your fault. The implicit conversion is just fundamentally incompatible with F#, so the only solution (I think) is to provide an explicit conversion function, but F# already exposes that with op_Implicit()

You could just not have implicit conversion to remove the confusion but that would be a breaking change and inconvenient for most consumers.