---
title: service_id
summary: The identifier for the Fastly service that is processing the current request.
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/compute_runtime/fn.service_id/
---

**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#190

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

The identifier for the Fastly service that is processing the current request.

Equivalent to the "FASTLY_SERVICE_ID" environment variable and to [`req.service_id`](https://www.fastly.com/documentation/reference/vcl/variables/miscellaneous/req-service-id/) in VCL.

**Returns**

`&str`
