cloud-foundryswisscomdev

http/2 on swisscom cloudfoundry?


I have a Nuxt.js/NodeJs application hosted on the swisscom cloud (cloudfoundry). Unfortunately all my files are loaded over the http/1.1 protocol and not over http/2.

Previously I had my application hosted on the google cloud and the content was delivered correctly over http/2.

Now my question is, if http/2 is supported on cloudfoundry? And if so, what do I have to do, to get my contents over http/2.


Solution

  • Now my question is, if http/2 is supported on cloudfoundry? And if so, what do I have to do, to get my contents over http/2.

    Not when using standard HTTP routes, which go through Gorouter. See this issue for some more background & future path to support this.

    https://github.com/cloudfoundry/gorouter/issues/195

    In the meantime, you can use TCP routes if you really need to use HTTP/2 on CF. This bypasses Gorouter and allows TCP traffic to go directly to your app. See these two links for more details on TCP routes.

    https://docs.cloudfoundry.org/devguide/deploy-apps/routes-domains.html#http-vs-tcp-routes https://docs.cloudfoundry.org/devguide/deploy-apps/routes-domains.html#create-route

    For what it's worth, you need to check with your CF provider/operators to determine if TCP routes are enabled. They are an optional feature. In addition, your org/space quota will need to allow you to create routes.

    Hope that helps!