Performance provider utilizing a cross-disciplinary, "devops style" approach. • Broad Solution Stack (OS, Database, Web Design and Development) • Solution provider to 10% of the Alexa Top 100 • Do “Big Internet” stuff Saturday, September 14, 13
what to expect. http://labs.omniti.com/labs/jsend { status : "success", data : { "post" : { "id" : 1, "title" : "A blog post", "body" : "Some useful content" } } } Saturday, September 14, 13
Barrier of entry to JS as server code • It was still very young • Very few debugging tools at the time • dtrace • console.log() • Confusing stack traces Saturday, September 14, 13
• Almost everyone knows some JS • Single threaded forces some scalable patterns • Smaller technology stack • Fast fixing prod errors. No compiling. Saturday, September 14, 13
var self = this; function emitTimeout() { self.emit('timeout'); } if (this.socket && this.socket.writable) { if (this.timeoutCb) this.socket.setTimeout(0, this.timeoutCb); this.timeoutCb = emitTimeout; this.socket.setTimeout(msecs, emitTimeout); return; } // Set timeoutCb so that it'll get cleaned up on request end this.timeoutCb = emitTimeout; if (this.socket) { var sock = this.socket; this.socket.once('connect', function() { sock.setTimeout(msecs, emitTimeout); }); return; } this.once('socket', function(sock) { sock.setTimeout(msecs, emitTimeout); }); }; Saturday, September 14, 13
for hosts • Use a separate agent for each backend. • This is critical if different backends are on the same IP/host. • Allows custom settings for each backend pool • Don’t use core agent if you want to actually keep-alive a socket. Saturday, September 14, 13
• Early days you had modules like fugue • Now core has Clustering • All of this is silly in a production environment • There are 65,535 ports, why only use one? Saturday, September 14, 13
bug could take down every process • Functional groupings of endpoints in load balancer traffic groups • No two groupings completely overlap the same machines Saturday, September 14, 13
properly monitored • In a Service Based Arch, there’s lots of things to go wrong • Properly assigned blame praise Deep Monitoring Saturday, September 14, 13