Essence
Getting Started

Configuration

Environment variables and server configuration

Essence is configured via environment variables. Copy .env.example to .env and adjust as needed.

Environment Variables

VariableDefaultDescription
PORT8080Server port
RUST_LOGessence=infoLog level (debug, info, warn, error)
BROWSER_HEADLESStrueRun Chromium in headless mode
BROWSER_POOL_SIZE5Number of browser instances in the pool
BROWSER_TIMEOUT_MS30000Browser page load timeout
ENGINE_WATERFALL_ENABLEDtrueEnable HTTP-to-browser fallback
ENGINE_WATERFALL_DELAY_MS5000Delay before triggering browser fallback
CRAWL_RATE_LIMIT_PER_SEC2Rate limit per domain for crawling
CRAWL_MAX_DURATION_SEC300Maximum crawl duration
MAX_CONCURRENT_REQUESTS10Max concurrent crawl requests
MAX_PARALLEL_SCRAPES5Parallel scrapes for /api/v1/search
MAX_REQUEST_SIZE_MB1Max request body size

Engine Selection

Essence uses a two-tier rendering strategy:

  1. HTTP Engine (default, fast) — lightweight fetch via reqwest. Handles most pages in under a second.
  2. Browser Engine (fallback) — full Chromium automation via CDP. Used for SPAs, JavaScript-rendered content, and anti-bot pages.

When engine is set to "auto" (default), Essence automatically detects whether a page needs browser rendering based on:

  • Content density analysis
  • JavaScript framework hydration markers (__NEXT_DATA__, __NUXT__, etc.)
  • Meta-refresh redirects
  • Anti-fetch response headers

Set ENGINE_WATERFALL_ENABLED=true to race both engines in parallel for maximum reliability.

On this page