Showing posts with label Agility. Show all posts
Showing posts with label Agility. Show all posts

Monday, 26 April 2010

Faster Payments - ISO8583 Application Switch

Need to route ISO8583 transactions based on their message type?

A customer came to me with a requirement to interpret their ISO8583 messages and then act accordingly. This is very different from the recent post Faster Payments - ISO8583 Resilience. That article addressed the issue of ensuring the ISO8583 service was actually up and running before sending it transactions. This article is helpful in deciding which IP Address to send the transaction to when there are multiple instances of the service. Also refer to: The Evolution of Application Delivery Part 4: Service Agility.

To better understand what we are doing here lets reference the very handy Wikipedia Article on ISO8583 - Financial transaction card originated messages. As you will see in the section titled "Message Type Indicator", there is a Four Digit identifier used to determine:

  • Protocol Version: 1987, 1993, 2003
  • Message Class: Authorisation, Reversal, Reconciliation, etc
  • Message Function: Request, Response, Notification, etc
  • Message Origin: Acquirer, Issuer, etc.


    The Problem

    Why might I wish to route messages based on this information? Lets say you are in the process of upgrading/changing your Transaction Handler. You are interested in routing, or maybe mirroring, only Reconciliation Messages, to the new system an no others. The remainder of the messages, or all of them if you are going to mirror, will still need to be passed to your existing service.



    The solution


    By implementing F5's LTM (Application Delivery Controller), you can read the ISO8583 message and then perform an action based on this message. LTM isn't natively aware of the 8583 standard so you must tell it what to do. Below is an iRule (TCL script that the LTM can interpret) to route/mirror your traffic as needed:


    when CLIENT_ACCEPTED {
      TCP::collect
    }
    
    ## This section collects the first 6 bytes and then uses
    ## 'switch' to find a match. It allows to you decide where
    ## to send a request based on its message type.
    ## You could also use this to simply log without 
    ## performing a pool selection.
    
    when CLIENT_DATA {
    
      set clientData [TCP::payload 6]
    
      switch -glob $clientData {
        "??0800" { 
          pool pool_EchoTestMessage
          log local0. "This is a Network Management Message."
        }
    
        "??2202" { 
    # Need to mirror message to the new service for testing
          log local0. "Mirroring message to test: $clientData"
          pool pool_ISO8583_Service
    
    # Here's the cloning for testing the new service
          clone pool pool_NewServiceForTesting
        } 
      }
      TCP::release
    }
    
    when SERVER_CONNECTED {
      TCP::collect
    }
    
    ## This section allows you to perform an action based
    ## on the message type of the response from the server.
    ## You could log the message type or even manipulate
    ## it before sending it out.
    
    when SERVER_DATA {
    
      set serverData [TCP::payload 6]
      log local0. "Response Data raw: $clientData"
    
      switch -glob $clientData {
        "??0810" { 
          pool pool_EchoTestMessage
          log local0. "Network Management Message RESPONSE."
        }
      }
      TCP::release
    }
    

    At the beginning of this post I referenced the Service Agility post from last month. Applying the above rule delivers enormous flexibility and agility to your solution breaking free from static, fixed designs that hinder growth.
  • Wednesday, 7 April 2010

    The Evolution of Application Delivery Part 4: Service Agility

    The final article of the Four Part series explains what companies should aim for today. Service Agility. Virtualisation is a key step on the path to agility but it is possible to configure yourself into a virtual point of failure.

    The following diagram takes the same multi-tiered application illustrated in the Parts 1- 3 but deployed in a model that delivers Service Agility.

    True Service Agility exists with the elimination of static links between the elements of a service.

    Think DNS! DNS provides the ability to bind a meaningful name to a less than meaningful IP Address. It also brought us the ability to change the IP Address binding while maintaining the meaningful name. A very basic for of agility but very slow and reliant on human intervention. ADC's deliver agility in real time on a per-user or per transaction bases. A good ADC can even react to server responsiveness.

    Wednesday, 31 March 2010

    The Evolution of Application Delivery Part 3: Multi Tiered Virtualisation

    Some of those conscientious companies noticed there was more work to be done and, consequently, deployed Application Delivery Controllers between the Web Servers and the Application Servers. Often, the plug-in still exists but it only see a single IP Address for the Application Server Tier (see below). The ADC virtualises the Application.




    Virtualising each tier separately is much better than the previous designs when it comes to service resilience and availability but we are not there yet. We have not delivered Service Agility. In the diagram above we have virtualised. Yes. However, we are still at the mercy of a Web Server Plug-in. And this is not a place I would want to be.

    Once you have virtualised a service you can then deliver:
    *) rapid response to market demand: add a new server to the ADC pool without change to the Application
    *) Separate In-band monitoring of each tier
    *) Reduction in devices traversed, and latency incurred, between the users and the Application

    Wednesday, 24 March 2010

    The Evolution of Application Delivery Part 2: The ADC is born

    In "Part 1: Unintelligent" we covered basic Load-balancing. This week we will explore early application delivery implementations.

    Some organisations identified there were issues with Load-balancing and invested in Application Delivery Controllers (ADC's hereafter). There are many published articles touting the expression, "Load-balancers are dead!" (Gartner: Load-balancers are Dead). This is precisely what it means. Conscientious corporations rolled out ADC's that would:
    a) monitor the service itself e.g., send an out-of-band HTTP request and see if the response is valid - HTTP 200 OK
    b) distribute the web clients across the service based on the Connection table, or responsiveness of each individual server

    In the event of a server failure (monitor detects a bad response) the ADC would cease distributing traffic to the failed device. This brought forward an enormous change in service uptime, brand protection and resilience.

    Maturity in the ADC market added services like SSL Offload: the ADC terminated the encryption and passed the encapsulated payload back to the servers in 'clear', unencrypted form. Server CPU utilisation went down, SSL certificate management (and cost) was reduced and the servers went back to running applications with as much as possible of the Network functions being performed by the ADC.

    But there were still problems. The Applications themselves were receiving their Customer requests from a plug-in loaded into a web server. This plug-in delivered unintelligent, unmonitored, round-robin request distribution to the Application Server Tier. Didn't we just solve this problem for the Web Servers??

    Wednesday, 17 March 2010

    The Evolution of Application Delivery Part 1: Unintelligent

    This is Part 1 of a 4 part series covering the Evolution of Application Delivery. I come across a lot of confusion as to what Application Delivery really is. Some think its Load-balancing. They are wrong. :-) Hopefully this series will help better explain ADC's and their purpose.







    In the beginning we had basic, unintelligent TCP distribution which was typically delivered through destination address re-writting. This was fine for spreading HTTP Request across multiple servers when one server alone simply wasn't enough.





















    The internet matured and soon we had the need to load-balance dynamic applications which included anything from a cgi script residing on a Web Server to multi-tiered architecture like WebSphere or Weblogic systems. These multitiered applications were typically deployed behind a load-balancer and the Web Server was loaded with a crude plug-in as depicted below.













    The aforementioned, multi-tiered architecture delivered much needed scalability allowing organisations to build out sideways as needed. The problem with this architecture, especially in more recent times with growing expectations around application availability and responsiveness, is that it is still unintelligent.






    A load-balancer has no appreciation of the service running through the architecture. Consider the following: in the diagram above, what happens if one of the Web Servers starts returning errors? A failed disk could result in 404 Page not found. The load-balanacer would then upset 1/3 of your customers.






    Some of these early load-balancers would 'ping' the server to see that it was turned on but sending an ICMP packet doesn't verify if the response was good (HTTP 200 OK) or bad (404 Object not found).