dockerexpressgoogle-cloud-platformgoogle-cloud-run

Google Cloud Run weird behaviour only for path /healthz


I'm deploying a container on Google Cloud Run, the container serves formally an Express server (NestJS).

In my application I declared 2 routes (and I tried with several names).

Every route responds to both "/foo" and "/foo/", except "healthz".

This only works with the final slash.

Needless to say: if I serve locally it works both ways

I even tried to customize the probe (changing from the default, which should be healthz), but still, the new path answers correctly w/ or w/out trailing slash.

Only healthz keeps behaving weird.

Any idea why?

EDIT

An interesting thing I notice is this:

/healthz/ (200)

/healthz/

/healthz (404)

/healthz

The responses don't seem to be from the same server, so healthz doesn't even get to the container


Solution

  • This is the expected behavior. As per the documentation

    It is not possible to use the following URL paths:

    • /eventlog

    • Paths starting with /_ah/

    • Some paths ending with z. We recommend avoiding all paths that end in z to not collide with reserved paths.