CodeShare
Have some code. Share some code.
cancel
Showing results for 
Search instead for 
Did you mean: 

Articles

HSRP and VRRP Optimization

Problem this snippet solves:This iRule provides a manageable solution for load balancing to any number of any sized HSRP/VRRP groups of routers or firewalls. The problem is simple to understand (explained officially in Solution 9487) in that the indi...

Avoid SSL Handshake When Pool is Unavailable

Problem this snippet solves:If no servers are available in the pool serving an HTTPS Virtual Server, LTM will still perform the SSL handshake with the client (which is expected behaviour, and is required in order to allow LTM to process iRules and/or...

Source IP Based Pool Routing

Problem this snippet solves:I had an issue where my company wanted to have more than one mail server sending mail out of our building, they wanted to start sending ¨information emails¨ out but we found that we started to get black listed by mail serv...

Variable Length URI Lookup

Problem this snippet solves:This iRule uses findclass to perform class lookup for URI's of varying path length, returning the value for the longest path matched. This example uses the lookup value for pool selection, but of course could be modified t...

Cache Expire

Problem this snippet solves:This iRule sets caching headers Expires and Cache-Control on the response. Mostly the use case will be to set client-side caching of static resources as images, stylesheets, javascripts etc.. It will honor, by default, the...

Distribute Email by Source IP

Problem this snippet solves:I had a customer who wanted to use a single virtual IP address for a mail server, but have the mail go to different pools depending on whether the mail was internal or external. So I wrote the following iRule which I conne...

Disabling HTTP Processing For Unrecognized HTTP Methods

Problem this snippet solves:The iRule below disables HTTP processing for requests using HTTP methods that are not recognized by the BIG-IP HTTP profile. For example, Web-based Distributed Authoring and Versioning (WebDAV) uses the following extende...

Disable Partial GET Requests for RAM Cache

Problem this snippet solves:A side effect of using RAM Cache is that partial GET requests (206 Partial Content - see RFC 2616 sections 10.2.7 and 14.35) is enabled by BIG-IP for objects available in RAM Cache, even if the server that produced the con...

Controlling Bots

Problem this snippet solves:Webbots, you can't live with them, you can't live without them... This iRule determines if a webbot is accessing your systems and assigns them to a lower priority resource. The first example includes the bot list inside th...

CMP v10.0 compatible counters using the session table

Problem this snippet solves:This simple iRule shows how you can create a CMP-compatible counter. The first portion of the iRule demonstrates creating and incrementing a global counter which is accessible across all virtual servers and all TCP connect...

Clone Pool Based On Uri

Problem this snippet solves:This iRule will clone a connection to a second pool based on the input URI. In addition to using an iRule to choose what pool of servers a connection is sent to you can also set a clone pool within a rule. This is a simple...

Cache No POST

Problem this snippet solves:Disable RAMcache for POST request responses.Code :when HTTP_REQUEST { if { [HTTP::method] equals "POST" } { CACHE::disable } else { CACHE::enable } }Tested this on version:10.0

URL Shortener

Problem this snippet solves: The Small URL Generator takes a long URL, examines its length, and assigns it a variable length key based on the original URL's length. The key is then stored in a subtable along with the original URL. When a user accesse...

Labels
Top Contributors