React Storefront
|

Debugging Responses

All requests served by the Moovweb XDN contain a response header called x-moov-status, which contains the HTTP response status the request generated at every layer of the Moovweb stack. This can be extremely helpful when diagnosing application issues.

x-moov-status

Order is important: Values are prepended at response time. So reading them left to right goes from the outermost edge (e.g. Fastly) to innermost component (e.g. moovworker.)

The format is x-moov-status: <id>=<status>[,<id2>=<status2>...

Components

What are the components involved?

  • Inner Edge NGINX = n
  • Inner Edge Varnish = v
  • MPS = m
  • MoovWorker = w

Keys

Here is an example of the header:

x-moov-status: n=200,v=200,m=200,mp=200,mu=200,wu0=200

To inform what was involved in making the response we report full status codes even on cache hits. This is different from x-moov-t where we don't report upstream metrics on cache hits.

x-moov-status: n=200,v=200,m=200,mp=200,wu0=200
x-moov-t: ot=12,oc=miss,st=2,sc=hit

Inner Edge NGINX

  • n = HTTP status as returned downstream

Inner Edge Varnish

  • v = HTTP status as returned downstream

MPS

  • m = HTTP status as actually returned by MPS
  • mu = HTTP status as returned from the upstream; not defined if MPS never made an upstream request
  • mp = HTTP status as returned by the project code; not defined if reponse rewriter never executed (e.g. request rewriter failed)

These values can be different from each other. For example, upstream may have returned a 404 and project could have changed it to 302. In that case we would observe m=302,mu=404,mp=302.

MoovWorker

  • wu<index> = HTTP status as returned by upstream requests issued from MoovWorker; <index> starts from 0 and increments for each request issued