« February 2007 | Main | May 2007 »

April 2007 Archives

April 15, 2007

T-Minus 3.5 Weeks and Counting!

It's almost game time -- another 3 and a half weeks, and if everyone's on the money, Tony and Rob will have someone else to contend with on their birthday. And a girl, no less! Unless of course, the ultrasounds are wrong.

We've been busily getting the nursery ready and assembling all manner of baby gadgetry and furniture; though Facebook is managing to consume way too much time for both Kelly and I. It's so addictive in fact that I had to finally bite the bullet and move my blog from a home-grown solution to MovableType just so that I can import blog entries into my facebook profile like Anthony does. It's been a long time coming though, MovableType is really well designed, and has all the things my blog's needed like trackbacks, permalinks, comments, and of course RSS/ATOM.

April 26, 2007

To Terminate Or Not To Terminate?

In my work life, I'm involved in the design and architecture of systems and network solutions; I'm also primarily tasked with the implementation of these solutions. In all but rare instances, there's always more than one way to accommodate requirements and choosing the best option becomes the real challenge.

I personally favour options which provide the customer with the most flexibility and control; and it should go without saying that choosing the right tools for the job goes a long way to providing this.

Lots of applications which are Internet facing, or primarily web-based utilize load balancing to distribute load across a farm of servers. This provides fault-tolerance and higher performance. Dedicated hardware load balancers usually perform the role of monitoring the servers in the farm, and distributing incoming requests across them; they can also provide HTTPS and SSL offloading so that the servers in the farm don't have to deal with the processing overhead of generating session keys for encryption. This is a good thing for reasons including but not limited to:

  • It allows the server farm to concentrate on serving web requests and not on performing encryption which is processor intensive, increasing overall application performance
  • It simplifies SSL configuration for websites by centralizing SSL certificates on the load balancer instead of on every server in the farm
  • Wherever security policy allows an HTTPS connection can be terminated on the load balancer, and then sent over HTTP to the server farm, allowing for Intrusion Detection/Prevention systems to inspect the request for malicious content and potentially prevent the server farm from being compromised
  • Since the load balancer can see the unencrypted request, it has a greater variety of options available to it to accomplish sticky or persistent style configurations where an application requires that a particular web client or browser is always served by the same server in the farm

Because the load balancer is translating HTTPS requests into HTTP requests, the servers in the farm don't know whether the original client request was HTTP or HTTPS. For applications that are security sensitive, this can be an issue.

Some common workarounds:

  1. Stop terminating SSL on the load balancer, and instead pass it through to the server farm
  2. Have the load balancer send a redirect to an HTTPS version of the same URL if the original request was to an HTTP URL
  3. Have the server send a redirect to an HTTPS version of the same URL if the original request was to an HTTP URL

1) Should be used as a last resort, since it negates all of the aforementioned benefits of offloading SSL.

2) Isn't always possible depending on what type of hardware load balancer is used. It's convenient, but moves control and responsibility away from the customer's application logic to the load balancer. In many hosted customer environments, load balancers are not under direct customer administration.

3) Is marginally more difficult because the server can't tell whether or not the original request was HTTP or HTTPS. This can be fixed easily by having the load balancer insert a custom HTTP header when the request is an HTTPS request, and having the server-side application logic check for the header and send a redirect if it isn't present. It's about 3 lines of code.

Since the decision to have to redirect is based on application-driven security requirements, and the customer is responsible for the application, it would seem to make the most sense to perform and code the redirect logic at the application level.

In the real world, this isn't a common perspective.

About April 2007

This page contains all entries posted to adrian's home in April 2007. They are listed from oldest to newest.

February 2007 is the previous archive.

May 2007 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 4.25