Skip to content

Commit 16cb42c

Browse files
authored
Merge pull request #142 from itowlson/runtime-config-outbound-http
Runtime config outbound HTTP settings
2 parents c766223 + c90b4a8 commit 16cb42c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

content/v3/dynamic-configuration.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ url = "https://github.com/spinframework/spin-docs/blob/main/content/v3/dynamic-c
2525
- [Remote Compute Provider](#remote-compute-provider)
2626
- [`default` API](#default-api)
2727
- [`open_ai` API](#open_ai-api)
28+
- [Outbound HTTP Runtime Configuration](#outbound-http-runtime-configuration)
2829

2930
You can change the configuration for Spin application features such as [application variables](./variables),
3031
[key value storage](./kv-store-api-guide), [SQL storage](./sqlite-api-guide)
@@ -407,3 +408,18 @@ If the `api_type` is `default`, Spin uses its own "Cloud GPU" API. This requires
407408
#### `open_ai` API
408409

409410
If the `api_type` is `open_ai`, Spin uses the [OpenAI API](https://github.com/openai/openai-openapi). This API is offered by some commercial LLM providers.
411+
412+
## Outbound HTTP Runtime Configuration
413+
414+
You can control applications' use of outbound HTTP via the runtime configuration file via the `[outbound_http]` section.
415+
416+
* By default, Spin pools outbound HTTP connections to the same destination. You can turn this off by setting `connection_pooling = false`.
417+
* By default, Spin does not limit the number of concurrent outbound HTTP connections the application may make. You can set a limit by setting `max_concurrent_requests = <value>`.
418+
419+
For example, the following runtime config section prevents connection pooling and limits the application to 10 concurrent requests:
420+
421+
```toml
422+
[outbound_http]
423+
connection_pooling = false
424+
max_concurrent_requests = 10
425+
```

0 commit comments

Comments
 (0)