Forum Discussion

nick_s_162783's avatar
nick_s_162783
Icon for Nimbostratus rankNimbostratus
Mar 11, 2019

Enable and disable HTTP2 in irule

We have a virtual server in LTM that uses an irule to send requests to two pools of servers based on the path (e.g. /images/*) which works fine. We need the requests that go to one of the pools to use HTTP2 and use HTTP to the other pool.

 

I did see an article about using HTTP2::enable and HTTP2::disable but these commands were introduced in 14.1.0 and we have fairly old devices running 12.1.3.7.

 

Can anyone suggest a way of doing this?

 

1 Reply

  • You could try an iRule that checks if the request is HTTP2 and then change the pool based on that like this:

    when HTTP_REQUEST
    {
        if{[HTTP2::active]}
        {
            pool http2_pool
        }   
        else
        {
            pool other_pool
        }
    }
    

    Here is the documentation for that command. It says it was implemented in 11.4.

    If you have any more questions, I am sure I can help.