Skip to content

Commit

Permalink
Merge pull request #237 from Jonher937/spelling-in-docs
Browse files Browse the repository at this point in the history
Fix spelling in docs
  • Loading branch information
alombarte authored Feb 19, 2025
2 parents 844429b + b668421 commit d7f1c91
Show file tree
Hide file tree
Showing 29 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion async/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You are trying to implement an event based pattern, such as:
## How Async agents work
When KrakenD starts, it reads the `async_agent` list in the configuration and creates the declared agents. An agent is an application thread that can use one or multiple workers connecting to a queue or PubSub system (consumers). KrakenD contacts the defined backend(s) list passing the event data when a new message kicks in. You might decide to add manipulations, validations, filtering, or any other backend functionality supported by KrakenD.

The backend(s) receive the event from the agent as part of the body. Depending on the driver and configuration, when a backend fails to process the request, you can tell KrakenD to reinject the message (`Nack`) to retry the message later by any other worker. Notice that when working with Nack, if KrakenD is the only consumer and your backend fails to process the message continously, KrakenD will reinsert the message into the queue over and over, and could lead to an infinite loop of messages if no consumer empties these messages.
The backend(s) receive the event from the agent as part of the body. Depending on the driver and configuration, when a backend fails to process the request, you can tell KrakenD to reinject the message (`Nack`) to retry the message later by any other worker. Notice that when working with Nack, if KrakenD is the only consumer and your backend fails to process the message continuously, KrakenD will reinsert the message into the queue over and over, and could lead to an infinite loop of messages if no consumer empties these messages.

Notice that as it happens with the endpoints, the messages you consume can be sent in parallel or sequentially to multiple services.

Expand Down
2 changes: 1 addition & 1 deletion authorization/jwk-caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Example:


### Cache recommendations
**Combining the two levels of cache is usually the ideal scenario**. On one side, each endpoint has a scoped local cache entry and is the perfect strategy to handle contention. On the other side, adding the JWK client cache makes that when each endpoint cache expires, can stll rely on a more global level of cache which allows you to control the exact time between requests to your identity server.
**Combining the two levels of cache is usually the ideal scenario**. On one side, each endpoint has a scoped local cache entry and is the perfect strategy to handle contention. On the other side, adding the JWK client cache makes that when each endpoint cache expires, can still rely on a more global level of cache which allows you to control the exact time between requests to your identity server.

You might thing that one global cache level would be enough, but having this granularity makes the system way more efficient, performant, and error-free.

Expand Down
10 changes: 5 additions & 5 deletions backends/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ meta:
---
Caching allows you to **store backend responses in memory** to reduce the number of calls a user sends to the origin, **reducing the network traffic and alleviating the pressure on your services**.

KrakenD works similarly to the deafult rules of a CDN to cache responses, as it adheres mostly to the [RFC-7234](https://datatracker.ietf.org/doc/html/rfc7234) (HTTP/1.1 Caching) in its implementation, and all the internals follow the decisions based on the RFC.
KrakenD works similarly to the default rules of a CDN to cache responses, as it adheres mostly to the [RFC-7234](https://datatracker.ietf.org/doc/html/rfc7234) (HTTP/1.1 Caching) in its implementation, and all the internals follow the decisions based on the RFC.

The caching component is a capability of the default KrakenD HTTP client connecting to your upstream services, and can store content in-memory so the next request that is within a valid expiration window can be returned right away without using the network, alliviating pressure and improving times.
The caching component is a capability of the default KrakenD HTTP client connecting to your upstream services, and can store content in-memory so the next request that is within a valid expiration window can be returned right away without using the network, alleviating pressure and improving times.

KrakenD does not cache the final content delivered to the end-user (the endpoint output), but the response of the backend (close, but not the same). Its approach is to store individual backend responses rather than aggregated content. In an endpoint with aggregation, you will need to add the cache component to all the backends that need caching individually. If you have manipulations of content after retrieving the content, these are not cached either.

Expand Down Expand Up @@ -97,7 +97,7 @@ This idea is represented in the following example:

![Example of shared and individual cache](/images/documentation/diagrams/cache-options.mmd.svg)

In the diagram above there are four `backend` definitions that could be anywhere across different endpoints. Backends `B` and `C` query their upstream services and store the content in a cache bucket that is contrained to their private access.
In the diagram above there are four `backend` definitions that could be anywhere across different endpoints. Backends `B` and `C` query their upstream services and store the content in a cache bucket that is constrained to their private access.

On the other hand, backends `A` and `D` use a shared cache bucket, so if one of them saves a result the other can fetch the same cache key without needing to go to the origin.

Expand Down Expand Up @@ -141,8 +141,8 @@ In addition, there are other ways to check if backend responses are served from
- Comparing the latency of the requests in your metrics
- Check your backend logs

{{< note title="Configurations not elegible for caching" type="warning" >}}
The components [Client Credentials](/docs/authorization/client-credentials/), [Lambda functions](/docs/backends/lambda/), [AMQP Consumers or Producers](/docs/backends/amqp-consumer/), [Publish/Subscribe](/docs/backends/pubsub/), and [HTTP Client plugins](/docs/extending/http-client-plugins/) **don't support direct caching** because they use a **custom HTTP client** with extended functionality that does not use the one with caching capabilities. Generally speaking, connections with upstream services that need authentication or custom HTTP clients are not elegible to cache their responses.
{{< note title="Configurations not eligible for caching" type="warning" >}}
The components [Client Credentials](/docs/authorization/client-credentials/), [Lambda functions](/docs/backends/lambda/), [AMQP Consumers or Producers](/docs/backends/amqp-consumer/), [Publish/Subscribe](/docs/backends/pubsub/), and [HTTP Client plugins](/docs/extending/http-client-plugins/) **don't support direct caching** because they use a **custom HTTP client** with extended functionality that does not use the one with caching capabilities. Generally speaking, connections with upstream services that need authentication or custom HTTP clients are not eligible to cache their responses.
{{< /note >}}


Expand Down
4 changes: 2 additions & 2 deletions backends/circuit-breaker.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ It's easy to picture the state of the circuit breaker as an electrical component

![Krakend logo](/images/documentation/circuit-breaker.png)

The Circuit Breaker starts with the `CLOSED` state, meaning the electricty can flow to the backends as they are considered healthy (*innocent until proven guilty*).
The Circuit Breaker starts with the `CLOSED` state, meaning the electricity can flow to the backends as they are considered healthy (*innocent until proven guilty*).

Then the component watches the state of the connections with your backend(s), with a tolerance to **consecutive failures** (`max_errors`) during a time interval (`interval`). it stops all the interaction with the backend for the next N seconds (the `timeout`). We call this state `OPEN`.

Expand All @@ -94,7 +94,7 @@ This is the way the states change:
When the circuit breaker counts the number of consecutive `max_errors`, an error could be anything that prevents having a successful connection with the service and completing the work.

{{< note title="`no-op` endpoints do not check HTTP status codes" type="warning" >}}
Because a `no-op` does not evaluate the response status code, the circuit breaker does not see the reponse status code of the backend and the errors are limited to the following list below.
Because a `no-op` does not evaluate the response status code, the circuit breaker does not see the response status code of the backend and the errors are limited to the following list below.
{{< /note >}}


Expand Down
2 changes: 1 addition & 1 deletion backends/graphql.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ In this scenario, **the end-user consumes traditional REST content**, without ev

**KrakenD acts as the GraphQL client**, negotiating the content with the GraphQL server and hiding its complexity from the end-user. The end-user consumes REST content and retrieves the data in JSON, XML, RSS, or any other format supported by KrakenD.

The configuration to consume GraphQL content from your GrapQL graphs could look like this:
The configuration to consume GraphQL content from your GraphQL graphs could look like this:

{{< highlight json "hl_lines=7-16">}}
{
Expand Down
2 changes: 1 addition & 1 deletion backends/martian.md
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ The following example defines a backend using port `1234`, but the modifier chan
```

## Groups (Apply multiple modifiers)
All the modifiers perform a single modification in the request or the response. However, the `fifo.Group` and the `priority.Group` allow you to create a list of modifiers executed sequentailly or in a specific order. The group is needed when using more than one modifier and encapsulates all the following actions to perform in the `modifiers` array.
All the modifiers perform a single modification in the request or the response. However, the `fifo.Group` and the `priority.Group` allow you to create a list of modifiers executed sequentially or in a specific order. The group is needed when using more than one modifier and encapsulates all the following actions to perform in the `modifiers` array.

### FIFO group
The `fifo.Group` holds a list of modifiers executed in first-in, first-out order.
Expand Down
2 changes: 1 addition & 1 deletion backends/shadow-backends.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ The following example shows a backend that is changing from `v1` to `v2`, but we
```

## Canary testing and Canary Releases
Learn how to do [canary testing](/blog/krakend-shadow-testing/), or the different [Canary Relases](/blog/canary-releases/) strategies you can use in our blog post.
Learn how to do [Canary Testing](/blog/krakend-shadow-testing/), or the different [Canary Releases](/blog/canary-releases/) strategies you can use in our blog post.
2 changes: 1 addition & 1 deletion backends/supported-encodings.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ For instance, if your backend returns a simple `Hello World!`, the response of K

Similarly, if your backend returns `[{"item": 1},{"item": 2}]` then the response of KrakenD (`output_encoding=json`) would be `{ "collection": [{"item": 1},{"item": 2}] }`.

Some `ouput_encodings` will revert this wrapping before returning the content to the user to match the exact value provided by the backend, but this gives you the oportunity to manipulate the content and work with it at the endpoint level. The `output_encoding` of `string` will remove the `content` wrapping, while the `json-collection` while remove the `collection` wrapping.
Some `output_encodings` will revert this wrapping before returning the content to the user to match the exact value provided by the backend, but this gives you the opportunity to manipulate the content and work with it at the endpoint level. The `output_encoding` of `string` will remove the `content` wrapping, while the `json-collection` while remove the `collection` wrapping.

## Example of mixed encodings

Expand Down
2 changes: 1 addition & 1 deletion configuration/audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ The default template, as shown in the screenshot, applies the following go templ
```go-text-template
{{ range .Recommendations }}{{.Rule}}\t[{{colored .Severity}}]\t{{.Message}}\n{{ end }}
```
As the ouput is processed using a template, you can inject anything you like. For instance, the example below generates a [TOML file](https://toml.io/en/) into `recommendations.toml`.
As the output is processed using a template, you can inject anything you like. For instance, the example below generates a [TOML file](https://toml.io/en/) into `recommendations.toml`.

{{< terminal title="Custom output" >}}
krakend audit -f '{{range .Recommendations}}
Expand Down
4 changes: 2 additions & 2 deletions configuration/environment-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ When KrakenD runs (whether with `run` or `check`), all the behavior is loaded fr
## Use a reserved environment variable
There are a group of reserved environment variables that are automatically recognized by KrakenD when set.

Examples are when you want to replace the `port`, the default `timeout`, or the configuration `name` (sent to your telemetry) that already exists inthe configuration.
Examples are when you want to replace the `port`, the default `timeout`, or the configuration `name` (sent to your telemetry) that already exists in the configuration.

In essence, you can replace any value in the configuration that lives in the root level, and is a string, an integer, or a boolean. To do it you only need to capitalize the property name and add a prefix `KRAKEND_`.

Expand All @@ -46,7 +46,7 @@ For instance, take the following `krakend.json` configuration as an example:
}
```

You could start the server with the following command wich would allow you to override the values in the configuration:
You could start the server with the following command which would allow you to override the values in the configuration:

{{< terminal title="Example: Override configuration with env vars" >}}
KRAKEND_NAME="Build ABC0123" \
Expand Down
6 changes: 3 additions & 3 deletions configuration/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Our convention for saving templates, is using the `.tmpl` extension, although th
## Template syntax
The templates use internally the Go `text/template` package and **Sprig functions**. For templates loaded in the Flexible Configuration, there are additional custom functions to load external resources.

There are two inital external documentation pages worth reading to get familiar with these, although you'll find practical information below:
There are two initial external documentation pages worth reading to get familiar with these, although you'll find practical information below:

- The [Go text/template documentation](https://golang.org/pkg/text/template/) sets the rules of templates.
- [Sprig functions](http://masterminds.github.io/sprig/)
Expand Down Expand Up @@ -58,7 +58,7 @@ A few basics to get started:
- You can loop with assigned indexes and variables as `{{ range $key, $value := .ELEMENT}}...{{end}}`
- Access to elements using `{{with .ELEMENT}}...{{end}}`, or `{{with .ELEMENT}}yes{{else}}no{{end}}` when the variable is empty
- The context is represented with a starting dot `.` (see below)
- You can supress preceding and following spaces from any block adding `-`, for instance: `{{- if true -}}...{{- end -}}`
- You can suppress preceding and following spaces from any block adding `-`, for instance: `{{- if true -}}...{{- end -}}`
- You can pipe [functions](https://pkg.go.dev/text/template#hdr-Functions) you can add to this

### Understanding the context (the dot)
Expand All @@ -79,7 +79,7 @@ Variables can be passed as arguments to functions and actions. When you are in a
{{ .b }}
{{end}}
```
Prints `hi`. As you can see the context inside the with is different, and we don't access it lile `.a.b`.
Prints `hi`. As you can see the context inside the with is different, and we don't access it like `.a.b`.

When calling templates from templates (flexible config), make sure to add the final dot `.` to pass all the settings files to the next template or pass those variables that are needed:

Expand Down
2 changes: 1 addition & 1 deletion deploying/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Below there is a **recommended configuration** in production for a good performa
```
If you send the logs out to an [ELK](/docs/logging/logstash/) or a [GELF server](/docs/logging/graylog-gelf/), use `"stdout": false` to avoid having double output.

{{< note title="Redirect ouput to /dev/null for maximum performance" type="tip" >}}
{{< note title="Redirect output to /dev/null for maximum performance" type="tip" >}}
**When the output of KrakenD stdout is not important to you**, set the logging level to `CRITICAL` and redirect its output to `/dev/null` to have even more performance. To do that, start KrakenD with:

krakend run -c krakend.json >/dev/null 2>&1
Expand Down
2 changes: 1 addition & 1 deletion deploying/ci-cd.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ check-license:
image: {{< product image >}}:{{< product latest_version >}}
script:
# Checks if the LICENSE file (must exist in the path) is valid for the next 90 days.
# If it isn't, the deployment will fail, just to draw your atention. Lower the value afterwards.
# If it isn't, the deployment will fail, just to draw your attention. Lower the value afterwards.
- krakend license valid-for 90d

# Example to check the configuration using flexible configuration
Expand Down
Loading

0 comments on commit d7f1c91

Please sign in to comment.