Skip to content

KnearMe Edge Worker Architecture

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
  • Rate limiting: Durable Object (RATE_LIMITER).
  • Idempotency state: IDEMPOTENCY_KV.
  • Redirect storage: REDIRECTS_KV.
  • Async dispatch/consumer: API_QUEUE with DLQ.
  • Redirect sync scheduling.
  • Queueing publish_scheduled events for origin cron paths.

wrangler.toml defines env.production and env.staging with distinct:

  • Worker names.
  • Queue names.
  • KV namespace IDs.
  • Allowed origins.