Skip to content

Documentation for redis tls support. #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app-server/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ FROM php:8.3-alpine
# https://github.com/mlocati/docker-php-extension-installer
# https://github.com/docker-library/docs/tree/0fbef0e8b8c403f581b794030f9180a68935af9d/php#how-to-install-more-php-extensions
RUN --mount=type=bind,from=mlocati/php-extension-installer:2,source=/usr/bin/install-php-extensions,target=/usr/local/bin/install-php-extensions \
install-php-extensions @composer-2 opcache zip intl sockets profobuf
install-php-extensions @composer-2 opcache zip intl sockets protobuf

COPY --from=roadrunner /usr/bin/rr /usr/local/bin/rr

Expand Down
6 changes: 3 additions & 3 deletions kv/overview-kv.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ otel:

{% endcode %}

After that, you can see traces in your [Jaeger](https://www.jaegertracing.io/), [Uptrace](https://uptrace.dev/), [Zipkin](https://zipkin.io/) or any
other opentelemetry compatible tracing system.
After that, you can see traces in your [Dash0](https://www.dash0.com/), [Jaeger](https://www.jaegertracing.io/), [Uptrace](https://uptrace.dev/),
[Zipkin](https://zipkin.io/) or any other opentelemetry compatible tracing system.


## Configuration
Expand Down Expand Up @@ -356,7 +356,7 @@ To make it easy to use the KV proto API in PHP, we provide
a [GitHub repository](https://github.com/roadrunner-php/roadrunner-api-dto), that contains all the generated PHP DTO
classes proto files, making it easy to work with these files in your PHP application.

- [API](https://github.com/roadrunner-server/api/blob/master/kv/v1/kv.proto)
- [API](https://github.com/roadrunner-server/api/blob/master/proto/kv/v1/kv.proto)

### RPC API

Expand Down
29 changes: 29 additions & 0 deletions kv/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,20 @@ kv:
# Optional section.
# Default: false
read_only: false

# Optional section.
tls:
# Optional section.
# Default: ""
cert: ""

# Optional section.
# Default: ""
key: ""

# Optional section.
# Default: ""
root_ca: ""
```

{% endcode %}
Expand Down Expand Up @@ -176,6 +190,21 @@ suffix". A value of `0` is equivalent to a timeout of 512 milliseconds (`512ms`)
every CPU. Please note that specifying the value corresponds to the number of connections **per core**, so if you have 8
cores in your system, then setting the option to 2 you will get 16 connections.

### TLS Configuration

The `tls` section allows you to configure Transport Layer Security (TLS) for secure communication with the Redis server.
If no options are defined in this section, the connection will default to non-TLS.

`cert`: Path to a file containing the client certificate. This certificate is used to authenticate the client
when communicating with the server.

`key`: Path to a file containing the client private key. This key is used in conjunction with the client
certificate for mutual authentication.

`root_ca`: Path to a file containing the Certificate Authority (CA) certificates used to verify the server's certificate.
**Note**: This option can be used independently of the `cert` and `key` options. In cases where the server does not
require client certificate verification, you only need to provide the `root_ca` option.

### Other

`min_idle_conns`: Minimum number of idle connections which is useful when establishing new connection is slow. A value
Expand Down
8 changes: 4 additions & 4 deletions php/worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ while (true) {
//
// Reply by the 500 Internal Server Error response
$psr7->respond(new Response(500, [], 'Something Went Wrong!'));

// Additionally, we can inform the RoadRunner that the processing
// of the request failed.
$psr7->getWorker()->error((string)$e);
// of the request failed. Use error instead of response to indicate
// worker error, do not use both.
// $psr7->getWorker()->error((string)$e);
}
}
```
Expand Down Expand Up @@ -222,7 +223,6 @@ final class HttpDispatcher implements DispatcherInterface
$worker->respond(new Response(200, [], 'Hello RoadRunner!'));
} catch (\Throwable $e) {
$worker->respond(new Response(500, [], 'Something Went Wrong!'));
$worker->getWorker()->error((string)$e);
}
}
}
Expand Down