Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

What kind of sockets does Stack Overflow use for the realtime reputation updates? Is it something like Netty-Jetty, Solr or SignalR? Are they using web sockets implemented in C#?

share|improve this question
up vote 84 down vote accepted

UPDATE: StackExchange.Netgain is now open source!!
https://github.com/StackExchange/NetGain

We use a custom socket server that we developed in house. It supports every historic + RFC version of the web-sockets api; not just Hixie 76; hixie-76 === hybi-00; hybi-4/5/6/7/8, and hybi-13 === RFC6455. We treat sockets as a value add for those who use modern browsers and don't rely on it to provide all updates to our sites as websockets aren't supported in all browsers at this point.

We developed our own very simple protocol on top of websockets to provide rudimentary updates to question lists and as well as other interactions. We use redis messaging to support a unified messaging bus between all of our socket servers. The server side is a Windows service written in C# and the client side is jQuery.

There was talk of open sourcing our implementation but haven't reached a release yet. I have been very impressed with the load we've been able to handle thus far.

Here's a snapshot of haproxy at the moment:

socket traffic

In case you're wondering - that is 128k simultaneously connected web socket clients all receiving updates via our unified messaging bus.

Note by Marc Gravell♦: if people would be genuinely interested in our releasing this as open source, please let us know. It will take some effort. but isn't impossible.

share|improve this answer
5  
We use redis messaging to support a unified messaging bus between all of our socket servers --- where can you find more information on that particular aspect? – wal Feb 20 '13 at 1:06
    
@wal you mean this? – Shadow Wizard Feb 20 '13 at 8:22
1  
@ShaWizDowArd we don't actually use service-stack for that; we have a separate library (BookSleeve) that we open-sourced ages ago - the key point in that library is that it is multiplexed, fully async-IO, and async Task oriented – Marc Gravell Feb 20 '13 at 17:15
    
@MarcGravell, We want this superb thing as Open Source :) – Murali Murugesan Feb 26 '13 at 12:14
1  
@MarcGravell genuinely interested, but I would be even more interested in hearing details on it: how you designed it, why redis, which choices you made, how does it work... – Lorenzo Dematté Mar 1 '13 at 14:49
6  
Still really interested in the open source idea, any updates? – mattytommo Apr 30 '15 at 14:50
    
@MarkGravell definitely still interested in hearing more about this! seems like every big site is forgoing websockets in favor or event-based subs (eg facebook's graphQL), so getting this info in the public domain could really help folks learn how to scale them well – Matt K Jan 2 at 1:13
    
@MarcGravell will you guys open source it? – Abdullah Saleem Jan 20 at 14:13
3  
We just open sourced our socket server library: github.com/StackExchange/NetGain – Geoff Dalgas Jan 26 at 17:55
    
We need best socket library for .net developer to go more with socket and SignalR comes in picture. But more of SignalR performance issue and not updating overtime i think best example of large Socket used in .net web application is Stack Exchange. Can community provide better Documentation to use this library?? – Parth Trivedi Feb 22 at 3:08
    
I am large fan of how you have implement sockets and what you have used in back end. And yes an micro ORM Dapper.net that i found more powerful and better performance then all other ORM (Entity Framwork) – Parth Trivedi Feb 22 at 3:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .