---
title: hostname
summary: The hostname of the Fastly cache server which is executing the current instance, for example, cache-jfk1034.
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/compute_runtime/fn.hostname/
---

**Kind:** Function  
**Module:** [compute_runtime](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/compute_runtime/)  
**Package:** fastly 0.13.1  
**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/compute_runtime.rs#55

```rust
fn hostname() -> &'static str
```

The hostname of the Fastly cache server which is executing the current instance, for
example, `cache-jfk1034`.

Equivalent to the "FASTLY_HOSTNAME" environment variable and to [`server.hostname`](https://www.fastly.com/documentation/reference/vcl/variables/server/server-hostname/) in VCL.

**Returns**

`&str`
