Headers

Edgemesh® Server response headers are added to responses to illustrate how a request flows through the Edgemesh® infrastructure. This helps with debugging and enables other tools such as our Chrome Extension.


X-Edgemesh-Server

The X-Edgemesh-Server header is added when a Request is routed through Edgemesh® Server.

Format
[Cache Status],[Routing Strategy],[Plugin]
Examples
X-Edgemesh-Server: hit, proxy
X-Edgemesh-Server: hit, direct
X-Edgemesh-Server: hit, prerendered
X-Edgemesh-Server: miss, proxy, shopify
Cache Status
miss The Request was not cached at the edge and was served from the origin backend.
hit The Request was served entirely from the edge cache.
dynamic The Request was not eligible to be served from cache and will always be served from origin.
Routing Strategy
edge The Request was fulfilled at the edge and did not require an upstream sub-request.
kv The Request was fulfilled at the edge by the global cache replication layer.
bypass The Request has bypassed Edgemesh® Server Optimizations.
forward The Request did not meet the criteria to be serviced by Edgemesh® Server and was forwarded to the upstream server.
direct The Response was fetched from the upstream server and optimized by Edgemesh® Server..
proxy The Response was fetched from a proxied backend and optimized by Edgemesh® Server.
prerendered The Response was pre-rendered by Edgemesh® Server. These responses are served to verified bots and search engines.
Plugins
shopify The Edgemesh® Server Shopify Plugin served this Request.

X-Edgemesh-Server-Version

The X-Edgemesh-Server-Version header indicates what version of Edgemesh® Server was used to service a given request.

Format
[track]@[version]
Examples
X-Edgemesh-Server-Version: stable@1.6.1
X-Edgemesh-Server-Version: canary@1.7.0
X-Edgemesh-Server-Version: nightly@2.0.0
Tracks
stable Production track. All customers run on this track unless a new feature is being tested on a customer's behalf.
canary This track is for testing features that are stable and ready to be promoted to production. Customers can set their staging sites to this track to run integration tests with new features.
nightly This track is used to test potentially unstable new features. Customer production sites are never set to this track. Only staging sites are eligible for this track.

X-Edgemesh-Backend

The X-Edgemesh-Backend header indicates what backend (proxied origin) a Response originated from. If the routing strategy is of type edge, this value will always be edgeme.sh.

Examples
X-Edgemesh-Backend: foo.com
X-Edgemesh-Backend: bar.com

If the routing strategy used is direct, then the value will be the hostname of your website, also referred to as the upstream origin.


X-Edgemesh-Cache-Key

The X-Edgemesh-Cache-Key header indicates the key a Request/Response pair is stored by. This is mostly used for debugging by Edgemesh® Support staff. This header is only present on responses that come from an Edgemesh® cache.

Format
[Deployment Track]:[URL]:[Accept Shard]:[Custom Cookie Shards]
Examples
X-Edgemesh-Cache-Key: stable:https://www.yoursite.com/:avif:cart_currency=USD
X-Edgemesh-Cache-Key: canary:https://www.yoursite.com/:default:cart_currency=USD

Server-Timing

Edgemesh® Server adds Server-Timing metrics when enabled with ?em-profile. These metrics break down the performance for each function during a Request's path to being served a Response. This is used for internal debugging and performance monitoring but is also visible in the Network Panel on each Response. All of the duration values are in milliseconds and all of the descriptions are prefixed with [EM] to help differentiate from server timing headers set by upstream and proxied origins.

Server Timing Metrics
Cache Hit The Edgemesh® edge cache was hit.
Cache Miss The Edgemesh® edge cache was missed.
Cache Dynamic The Edgemesh® edge cache was not queried.
Backend Fetch The duration of the upstream or proxied fetch request.
Cache Match The duration of the cache match query.
Config Lookup The duration of the config lookup.
Create Request The time it takes to construct the upstream and cache requests.
Create Response The time it takes to construct the cache and origin responses.
Determine Route The time it takes to determine the edge route.
KV Cache Match The duration of the global cache replication query.
Parse Body The time it takes to parse the response body when applicable.
Parse Dynamic Content The time it takes to parse dynamic content for a page.
Parse URL The time it takes to parse the request URL.
Parse User Agent The time it takes to parse the request user agent.
Rewrite Body The time it takes to perform optimizations on the response body.
Rewrite Location The time it takes to rewrite the location header when applicable.

Made withby Edgemesh Corporation