KnearMe Edge Worker Architecture
Request path ownership
Section titled “Request path ownership”Edge worker fronts selected API paths and applies policy before origin invocation.
Owned or candidate paths include:
/api/track/api/forms/submit/api/newsletter/subscribe/api/email/subscribe/api/tools/export-pdf/api/redirects/lookup
Core subsystems
Section titled “Core subsystems”- Rate limiting: Durable Object (
RATE_LIMITER). - Idempotency state:
IDEMPOTENCY_KV. - Redirect storage:
REDIRECTS_KV. - Async dispatch/consumer:
API_QUEUEwith DLQ.
Scheduled responsibilities
Section titled “Scheduled responsibilities”- Redirect sync scheduling.
- Queueing
publish_scheduledevents for origin cron paths.
Staging/production separation
Section titled “Staging/production separation”wrangler.toml defines env.production and env.staging with distinct:
- Worker names.
- Queue names.
- KV namespace IDs.
- Allowed origins.