Skip to content

Commit 0a1db43

Browse files
docs: fixed spelling/typos in docs
1 parent 227fb60 commit 0a1db43

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/k8s.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Simple Kubernetes manifests can be found in the `k8s` folder. The configuration there, as well as the instructions in this document, are designed for a local bare-metal cluster (particularly using minikube) for testing how the distributed system behaves across multiple replicas.
44

55
## Configuration
6-
There are 3 mainfests in the `k8s` folder:
6+
There are 3 manifests in the `k8s` folder:
77
- `app.yaml`: The `Deployment` and `Service` for the `session-queue` app
88
- `redis.yaml`: Simple Redis `Deployment` and `Service` for the `session-queue` replicas.
99
- `config.yaml`: Environment variable configuration for `session-queue` with some sensible testing defaults.
@@ -38,7 +38,7 @@ kubectl logs {pod} --follow
3838
```
3939

4040
## Production
41-
As mentioned, the out-the-box mainfests are made for local development testing. There are various changes that could/should be made for a production-ready k8s deployment, including:
41+
As mentioned, the out-the-box manifests are made for local development testing. There are various changes that could/should be made for a production-ready k8s deployment, including:
4242
- Pushing the image to a remote registry and not using `imagePullPolicy: Never`
4343
- Using a `Service` of type `LoadBalancer` to expose the deployment (particularly if on a cloud environment)
4444
- Storing the JWT secret outside of config/source control, and using something like [ESO](https://external-secrets.io/latest/) to inject it

docs/system.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ The server keeps track of two dynamic values, which are just integers in Redis:
99
- The last queue position in the current active window
1010

1111
Based on static variables (namely the window size and number of active windows), each ticket's state can be derived from its own position, as either:
12-
- Expired: the ticket was issued before the current acive windows and is no longer active
13-
- Active: the ticket is within the actve windows (ie less than the last active queue position, and greater than the lower bound)
12+
- Expired: the ticket was issued before the current active windows and is no longer active
13+
- Active: the ticket is within the active windows (ie less than the last active queue position, and greater than the lower bound)
1414
- Waiting: the ticket position is greater than the last active queue position and not yet active
1515

1616
The last active queue position can then be incremented, by the window size, at a regular interval, thus sliding the window and processing the next batch of tickets.
@@ -33,4 +33,4 @@ To interact with the system as a user, 2 HTTP endpoints are exposed:
3333
## Considerations
3434
By storing state on the client-side with JWTs and only integers server-side, the system is scalable and can handle very large queues.
3535

36-
For slow queues where the window is attempting to increment faster than people are joining queues (ie the next latest active queue position is greater than the current queue position), window increments are skipped until the queue catches up to avoid issuing expired tickets. This, however, leads to the edge case of a user requesting a ticket after a skipped incremement and the window almost instantly incrementing after, invalidating it. To avoid this, multiple active windows are recommended (at least 2), to allow spill-over from the previous batch whilst still preventing bursty traffic from very old tickets.
36+
For slow queues where the window is attempting to increment faster than people are joining queues (ie the next latest active queue position is greater than the current queue position), window increments are skipped until the queue catches up to avoid issuing expired tickets. This, however, leads to the edge case of a user requesting a ticket after a skipped increment and the window almost instantly incrementing after, invalidating it. To avoid this, multiple active windows are recommended (at least 2), to allow spill-over from the previous batch whilst still preventing bursty traffic from very old tickets.

0 commit comments

Comments
 (0)