From 2cf557a2c8eca6c6c362067c41df4a79f64f9973 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 31 Mar 2026 08:09:24 +0000 Subject: [PATCH] docs(devops): document valkey-backed extraction throttling --- .../docker/DEPLOYMENT_STATUS_2026-03-29.md | 9 ++++++++ docs/devops/single_azure_vm/docker/README.md | 23 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/docs/devops/single_azure_vm/docker/DEPLOYMENT_STATUS_2026-03-29.md b/docs/devops/single_azure_vm/docker/DEPLOYMENT_STATUS_2026-03-29.md index 5de11100..bcd2718a 100644 --- a/docs/devops/single_azure_vm/docker/DEPLOYMENT_STATUS_2026-03-29.md +++ b/docs/devops/single_azure_vm/docker/DEPLOYMENT_STATUS_2026-03-29.md @@ -9,6 +9,15 @@ The Azure VM deployment is **partially successful**. +### 2026-03-31 follow-up + +The VM moved forward after the original snapshot: + +- `prometheus`, `node-exporter`, `cadvisor`, and `valkey` are now running +- `admin-web` and `tracker-web` are healthy again +- `extraction-service` product rate limiting now uses Valkey-backed shared counters +- live verification confirmed a request for `productId=valkey-check-2` created the key `extraction:product-rate-limit:29582406:valkey-check-2` in Valkey with value `1` + ### What is working - all platform and product **backend services** are running and healthy diff --git a/docs/devops/single_azure_vm/docker/README.md b/docs/devops/single_azure_vm/docker/README.md index b60d9d0f..16d69550 100644 --- a/docs/devops/single_azure_vm/docker/README.md +++ b/docs/devops/single_azure_vm/docker/README.md @@ -177,6 +177,27 @@ Notes: - these services are intended to stay internal-only on the VM - `prometheus` is provisioned for Grafana automatically through the Grafana datasource directory - neither `prometheus` nor `valkey` needs a raw public port exposure for normal operation +- `extraction-service` now uses Valkey for shared per-product rate limiting when `PRODUCT_RATE_LIMIT_STORE=valkey` +- `extraction-service` falls back to its in-memory limiter only if Valkey is unavailable at runtime + +### Shared limiter env + +`extraction-service` can be pointed at Valkey explicitly: + +```bash +PRODUCT_RATE_LIMIT_STORE=valkey +VALKEY_URL=redis://valkey:6379 +``` + +Live verification on the VM: + +```bash +docker exec learning_ai_common_plat-extraction-service-1 \ + wget -qO- 'http://127.0.0.1:4005/api/extract/rate-limits/product?productId=' + +docker exec learning_ai_common_plat-valkey-1 \ + valkey-cli KEYS 'extraction:product-rate-limit:*' +``` ## Environment Variables @@ -189,6 +210,8 @@ All optional — defaults work for most setups: | `GITEA_ADMIN` | `bytelyst-admin` | Gitea admin username | | `GITEA_PASS` | `ByteLyst2026!` | Gitea admin password | | `OLLAMA_MODEL` | `llama3.2:3b` | Default LLM model to pull | +| `PRODUCT_RATE_LIMIT_STORE` | `valkey` in compose | Shared product throttling backend for `extraction-service` | +| `VALKEY_URL` | `redis://valkey:6379` | Internal Valkey connection string for shared counters | | `SKIP_CLONE` | `0` | Set `1` to skip cloning (re-runs) | | `SKIP_BUILD` | `0` | Set `1` to skip package build+publish (re-runs) |