Skip to content
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

Docs #127

Merged
merged 8 commits into from
Sep 28, 2022
Merged

Docs #127

merged 8 commits into from
Sep 28, 2022

Conversation

alexsnaps
Copy link
Member

closes #114

@alexsnaps alexsnaps added area/doc Improvements or additions to documentation target/current labels Sep 9, 2022
@alexsnaps alexsnaps added this to the Limitador Server v1.0.0 milestone Sep 9, 2022
@alexsnaps alexsnaps self-assigned this Sep 9, 2022
Copy link
Contributor

@eguzki eguzki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking super good

@@ -3,8 +3,8 @@
[![Limitador GH Workflow](https://github.com/Kuadrant/limitador/actions/workflows/rust.yml/badge.svg)](https://github.com/Kuadrant/limitador/actions/workflows/rust.yml)
[![docs.rs](https://docs.rs/limitador/badge.svg)](https://docs.rs/limitador)
[![Crates.io](https://img.shields.io/crates/v/limitador)](https://crates.io/crates/limitador)
[![Docker Repository on Quay](https://quay.io/repository/3scale/limitador/status
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this badge only makes sense if the image is being build using quay.io building system. Currently it is being build using GH actions, so this badge should point to GH workflows status badge

@alexsnaps
Copy link
Member Author

This will need changes on the site still, I'm on it, and in the source possibly...

@alexsnaps alexsnaps marked this pull request as ready for review September 22, 2022 17:02

## Command line configuration

The preferred way of starting and configuring the Limitador instance is using the command line:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The preferred way of starting and configuring the Limitador instance is using the command line:
The preferred way of starting and configuring the Limitador server is using the command line:

Comment on lines 44 to 86
```json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"namespace": {
"type": "string"
},
"seconds": {
"type": "integer"
},
"max_value": {
"type": "integer"
},
"conditions": {
"type": "array",
"items": [
{
"type": "string"
}
]
},
"variables": {
"type": "array",
"items": [
{
"type": "string"
}
]
}
},
"required": [
"namespace",
"seconds",
"max_value",
"conditions",
"variables"
]
}
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although it doesn't change much, it could also be stated as a YAML schema:

---
"$schema": http://json-schema.org/draft-04/schema#
type: object
properties:
  name:
    type: string
  namespace:
    type: string
  seconds:
    type: integer
  max_value:
    type: integer
  conditions:
    type: array
    items:
    - type: string
  variables:
    type: array
    items:
    - type: string
required:
- namespace
- seconds
- max_value
- conditions
- variables

- `namespace` namespaces the limit, will generally be the domain, [see here](../how-it-works.md)
- `seconds` is the duration for which the limit applies, in seconds: e.g. `60` is a span of time of one minute
- `max_value` is the actual limit, e.g. `100` would limit to 100 requests
- `name` lets the user _optionally_ name the limit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know we had this option. Nice! 🙂


#### `redis`

When you want persistence of your counters, such as for DR or across restarts, using `redis` will store the counters in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd avoid the acronym here.


When you want persistence of your counters, such as for DR or across restarts, using `redis` will store the counters in
a redis instance using the provided `URL`. Increments to _individual_ counters is made within redis itself, providing
accuracy over these, races tho can occur when multiple limitador servers are used against a single redis and using
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
accuracy over these, races tho can occur when multiple limitador servers are used against a single redis and using
accuracy over these, races tho can occur when multiple Limitador servers are used against a single redis and using

#### `redis_cached`

In order to avoid some communication overhead to redis, `redis_cached` adds an in memory caching layer within the
limitador servers. This lowers the latency, but sacrifices some accuracy as it will not only cache counters, but also
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
limitador servers. This lowers the latency, but sacrifices some accuracy as it will not only cache counters, but also
Limitador servers. This lowers the latency, but sacrifices some accuracy as it will not only cache counters, but also


#### `LIMITS_FILE`

- YAML file that contains the limits to create when limitador boots. If the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- YAML file that contains the limits to create when limitador boots. If the
- YAML file that contains the limits to create when Limitador boots. If the

#### `LIMITS_FILE`

- YAML file that contains the limits to create when limitador boots. If the
limits specified already have counters associated, limitador will not delete them.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
limits specified already have counters associated, limitador will not delete them.
limits specified already have counters associated, Limitador will not delete them.

@alexsnaps alexsnaps merged commit 27c106f into main Sep 28, 2022
@eguzki eguzki deleted the docs branch October 4, 2022 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/doc Improvements or additions to documentation target/current
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add README.md in the crate
3 participants