#devops #NodeSummit #nodejs #F5 is putting the power of node.js in the network

API versioning. API metering. URI rewriting. Cookie management. A/B testing. Canary deployments. API façades.

Traditionally these tasks have been implemented through a variety of hacks and manual configuration in web server or proxy conf files. URI rewriting? Write some regular expressions in Apache and restart the process. Decisions on routing - do I send Bob to the beta version or the release version? - or authentication requiring database access?  Hard-code it in the application and use performance-killing redirects and consume valuable application resources. Want to use memcached to improve performance and scale? Hard-code it in the application. 

Domain logic doesn't belong in the application, or in the data access API. It belongs in an app proxy along with load balancing, SSL termination and performance-related functions typically associated with "the network" and typically associated with complex, network appliances. That all changes today.  

If you've been following along (and you probably haven't but that's okay) F5 has always been a pioneer in the realm of programmability in the network. We've always been convinced that it is far better to put the power of programmability in the hands of the folks who know their applications and architectures best than it is to try to bake into products features and functionality that are generalized and only address a specific set of challenges. Programmability, as promised by SDN and other emerging technologies, ensures the ability to innovate and mitigate on your own schedule, not ours.

There are a variety of choices out there today for an app proxy, but none of them puts the power of programmability - real programmability - into the hands of devops practitioners and developers alike.

LineRate App Proxy does just that.

Seriously. Rather than slogging through a configuration file and coming up with this (which has to be deployed on every applicable instance): 

RewriteCond %{HTTP_HOST}   !^www\.example\.com [NC]
RewriteCond %{HTTP_HOST}   !^$
RewriteRule ^/(.*)         http://www.example.com/$1 [L,R]

you can just write familiar code once, like this*:

"use strict";

var vsm = require('lrs/virtualServerModule');
var url = require('url');

var DoSomething = function(servReq, servResp, next) {
  if('host' in servReq.headers && servReq.headers.host) {
    var hostHeaderParsed = url.parse('http://'+ servReq.headers.host);
    if(!(hostHeaderParsed.hostname.match(/^www\.example\.com$/i))) {
      // Host name exists but is not www.example.com
      if('port' in hostHeaderParsed)  {
        servReq.addHeader('host', 'www.example.com:'+ hostHeaderParsed.port);
      } else {
        servReq.addHeader('host', 'www.example.com');

var RegisterforRequest = function(vs) {
  vs.on('request', DoSomething);

vsm.on('exist', 'vserver', RegisterforRequest);

The new reality of applications is they are often API-driven and their core architecture is changing. That means "the network" has to change, too, to accommodate new applications, new architectures, and new ways of designing and deploying the next generation of web applications.

The Change Your Network has been Waiting For

 linerate-lockup5 LineRate App Proxy is that change for the network, bringing programmability through node.js to the network with a simplified, software-defined approach that better fits with modern application architectures. It's software but, as the name implies, it's fast software - providing line rate speeds and capabilities that not only let you implement the architectures you need, but scale that entire architecture to unprecedented levels. 

Because it's programmatic, there's really no limit on what you can do. Need to talk to a database? You can do it. Need to implement an API facade or convert XML to JSON (or vice versa)? You can do it. Need to support multiple applications on a single physical host? You can do it. Need to replicate real user interactions so you can test a new version or application? You can do it.

The core premise of LineRate is simple: Develop your application. Control your network.

LineRate represents a transformational shift in not just the network, but operations. Why mess with configuration files and OS-level scripts when you can programmatically deploy, manage and control your app proxy via a REST API? Why settle for OS-level module management and recompiles to install new functionality when you can dynamically use existing repositories like npm?

Your application architectures and operational environments are transforming thanks to emerging technologies like REST-based APIs, mobile, cloud, HTML5 and more. The network - including proxies - can't get in the way by remaining complex, static and difficult to manage. It needs to be fast, agile, and programmable.

That's what LineRate brings to the table.

But you don't have to take my word for it. If you're a US-based user (sorry, folks, export restrictions and legal stuffs are holding up distribution elsewhere, but rest assured it's coming) you can grab a free version of LineRate today.  

Grab it. Launch it. Grab some caffeine and start coding. You can check out some samples on the LineRate site to get started or head straight to the scripting guide and build your own ... whatever you want.

That's kind of the point. You know what you want and what you need. Now you've got the right platform to build it.

Go forth and conquer the network - with code.  


*LineRate extends the Node.js HTTP module with 'addHeader' and 'removeHeader' calls in order to be able to manipulate them as the base Node.js implementation is read-only for headers.

icon-twitter-ns @LineRateSystems