How do I use HTTP/2 with HCL Portal

HTTP/2 with HCL Portal (DX)

A question that has arisen lately is "how do I use HTTP/2 with HCL Portal" and "can it be done".

It can be done but it does take a little work.

The first question to answer is "what is HTTP/2". For those that are not aware, You can read the spec here. If you want an informal explanation, you can read the wikipedia article here. The short version is that HTTP/2 is an enhancement to the HTTP/1.1 protocol, primarily driven by Google, which speeds up aspects of HTTP. A couple of the key elements include the fact that most all browsers support it and it is only supported on HTTPS; specifically TLS.

The main question is how do I get support for HTTP/2 with DX Portal! It does work, but there are some "gotchas". First is that IHS (IBM's version of Apache) does NOT support HTTP/2 as of the time of this writing. So, you need to use Apache 2.4.17+ via the included module "mod_http2.so". In addition to including the module just mentioned, you also need the line "Protocols h2 http/1.1" somewhere in your conf file(s). This line tells Apache to prefer HTTP/2 but allows it to fall back to HTTP/1.1 if needed.

Now for the interesting part. WebSphere itself does not support HTTP/2. However, you can terminate HTTP/2 at the WebServer (again, using SSL) and have the Apache WebSphere plugin talk to WebSphere Portal via HTTP (e.g. no SSL). Remove the SSL transports from your plugin-cfg.xml and add the directive "UseInsecure=yes" to the top of your plugin-cfg.xml. I also use mod_disk_cache in Apache to cache and serve static files from Portal via Apache. At this point, when you hit your browser via SSL, it will be using HTTP/2.

But, how can you prove that. Both FireFox and Chrome developer tools allow you to augment the "network" panel results to show the HTTP protocol used to access any URL. When you hit the Portal via Apache, you see the protocol used is now "h2" instead of "1.1" for Portal accesses.

For the next part, using HTTP/2 on SSL all the way from the browser to Portal. It does work and the portion of the transaction from the browser to the Apache 2.4 web server will be HTTP/2 as well even though the transport from the Apache WebSphere plugin to the WebSphere server does not support HTTP/2. Again, but using the recommended mod_disk_cache in Apache 2.4, you get the best benefit from this path.

My test setup was using Centos 7 with Apache 2.4.37. The only thing tricky was that to get the Apache WebSphere plugin to talk SSL to the WebSphere server, I have to edit the "/usr/lib/systemd/system/httpd.service" file to add

Environment=LD_LIBRARY_PATH=/opt/IBM/WebSphere/Plugins/gsk8/gsk8_64/lib64/

I put that line right after the line that says:

Environment=LANG=C

This allows the gsk8 libraries to be used for the SSL transport between the plugin and the WebSphere server.