X-Runtime
The HTTP X-Runtime response header is an unofficial HTTP header reporting the server-side request processing time in seconds.
Note
The X- prefix for non-standard headers is
deprecated per RFC 6648.
Usage
The X-Runtime header is added by the Rack::Runtime middleware in Ruby on Rails and other Rack-based web applications. The value is a floating-point number representing the total time in seconds the server spent processing the request, from receipt to response.
The header is primarily useful for performance monitoring
and debugging. A value of 0.004523 means the server
completed the request in roughly 4.5 milliseconds,
indicating a fast response likely served from cache or a
simple lookup. A value of 1.203891 means the server
spent over a second processing, pointing to a slow
database query, external API call, or heavy computation.
Because the value is a plain floating-point number with no structured format, the header is simple to parse and log. Many monitoring tools and log aggregators extract the X-Runtime value to track server-side latency over time. The standardized Server-Timing header offers a richer format with named metrics and descriptions, making the transition worthwhile for applications requiring detailed timing breakdowns.
Values
Floating-point seconds
The value is a decimal number representing seconds,
recorded to microsecond precision. Values typically range
from sub-millisecond responses (0.001552) to
multi-second responses (1.064541) depending on the
request complexity. The number always represents
wall-clock time spent on the server side.
Example
A fast response from a lightweight endpoint. The value
0.007184 means the server processed the request in
approximately 7 milliseconds, typical for a static page
render or a cached database query.
X-Runtime: 0.007184
A moderately complex page load. The value 0.054385
indicates the server spent about 54 milliseconds
fulfilling the request, common for dynamic pages with a
few database queries.
X-Runtime: 0.054385
A slow response involving heavy processing. The value
1.064541 means the server needed over a full second,
suggesting an expensive database operation, external
service call, or complex computation on the backend.
X-Runtime: 1.064541
The X-Runtime header often appears alongside other server-generated headers in Rails applications.
X-Runtime: 0.039428
X-Request-Id: a8f5f167-371e-4170-aaef-0c6e4a0c9283
Takeaway
The X-Runtime header exposes server-side processing time as a floating-point number of seconds, added automatically by the Rack::Runtime middleware in Ruby web applications. The standardized Server-Timing header provides a cross-platform alternative with structured metric names.