Question
· Jul 3, 2023

HTTP/2 HTTP/3 HTTP Protocol Version

I'm having trouble adjusting the protocol used for any CSP Requests. Currently all request to the system are sent over HTTP 1.1

When loading 40+ images on a page, the browser starts stalling request. According to google HTTP 1.1 only allows 6 parallel TCP Connections before suspending the remaining. 

I have looked through the Web Gateway Settings, %Net.HttpRequest.HTTPVersion and SSL Configuration but haven't found anything.

Is there a hidden setting that can be changed? Does Caché even support higher HTTP protocols. We do have an IRIS development instance I could test on. But I haven't found anything else there. 

I would like to change to HTTP/2 or even HTTP/3 if possible. 

Product version: Caché 2018.1
$ZV: Cache for Windows (x86-64) 2018.1.7 (Build 721U) Fri Mar 18 2022 22:07:35 EDT
Discussion (7)1
Log in or sign up to continue

Well, the issue is that Caché, or even IRIS, still uses one Job to process requests for the same session. So, anything higher than 1.1 will not help at all. So, the only solution is to make sure that as much more possible static files are processed without Caché/IRIS or WebGateway, through a webserver configured for HTTP/2/3. And only API requests which require data would go to Caché/IRIS, and best case if it will be session-less queries, meaning that your requests are not tied to the session on the server, and those queries could be processed in parallel, and everything needed can be reconstructed from the query, e.g. username to check permissions should go from Authorization header.

Moving from HTTP/1.1 to HTTP/2/3 is not as simple as you expect, differences between protocols are significant. And requires a lot of work on the application.

So, if your application is using CSP files, the only way is to completely rewrite it with some external framework, Python could be a solution, most of the popular frameworks can work this way, just select one you like more, Django, Flask, FastAPI or whatever you find. Even if you have just only REST, it will not be easy to implement. 

I see no reasons to do it on ObjectScript, it will be quite difficult to achieve it.

I'm a little confused now... 

When talking about a normal external Apache server, you would only need to add a couple of Cypher Suite Keys and change the protocol version. 
Intersystems Webgate also uses Apache Web Server as far as I can see in the Webgate Management. 
How come I need to add python code to my application in order for a browser to send its request via HTTP/2? 

I'm not really that well trained in server management but I feel like there is something I'm missing here. 

Why is the application responsible for the request instead of the apache server? 

While the requests is ended up in IRIS, than IRIS is responsible for the response, and it should support responses in HTTP/2 which is very different from HTTP/1. In HTTP/1 it does not matter how many connections are, queries will be processed one by one, and responses will go accordingly one by one. But in HTTP/2 queries processed simultaneously and response will go to the client as soon as it's done, no matter where it's started and it goes through the same connection, while in HTTP/1 connection per request. And IRIS and for sure Caché does not have support for it, the only way it's working is to process one request per connection and response as soon as the result is ready.

So, even if you manage to mimic HTTP/2 somehow, it will not help almost at all, the queries in the connection still process synchronously.