Webhooks too slow on queue mode

Describe the problem/error/question

I’m trying to set up n8n in queue mode, which consists of a main instance, a webhook processor, and a worker. I’ve managed to get it working, but even with a dedicated webhook processor and a dummy test webhook that returns a fixed text, the response takes a long time. On average, it takes 3-4 seconds. When it’s fast, it takes 2 seconds, which is still unacceptable. I plan on building a chatbot, but if I’m getting a 2-4 second response time just for a simple webhook, I can’t even imagine how long it will take when I connect the tools.

I am using the following variables for all three instances:

N8N_ENCRYPTION_KEY = “redacted”
TZ = “Etc/UTC”
GENERIC_TIMEZONE = “Etc/UTC”
EXECUTIONS_MODE = “queue”
DB_TYPE = “postgresdb”
DB_POSTGRESDB_DATABASE = “postgres”
DB_POSTGRESDB_SCHEMA = “n8n”
DB_POSTGRESDB_USER = “redacted”
DB_POSTGRESDB_PASSWORD = “redacted”
DB_POSTGRESDB_HOST = “redacted”
DB_POSTGRESDB_PORT = “redacted”
DB_POSTGRESDB_SSL_CA_FILE = “redacted”
QUEUE_BULL_PREFIX = “n8n”
QUEUE_BULL_REDIS_USERNAME = “redacted”
QUEUE_BULL_REDIS_PASSWORD = “redacted”
QUEUE_BULL_REDIS_HOST = “redacted”
QUEUE_BULL_REDIS_PORT = “redacted”
QUEUE_HEALTH_CHECK_ACTIVE = “true”
OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS = “true”
N8N_DISABLE_PRODUCTION_MAIN_PROCESS = “true”
N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS = “true”
N8N_RUNNERS_ENABLED = “true”
N8N_PROXY_HOPS = “1”
N8N_PROTOCOL = “https”
N8N_HOST = “n8n.example.com
N8N_EDITOR_BASE_URL = “https://n8n.example.com
WEBHOOK_URL = “https://n8n-webhook.example.com

What am I doing wrong? Is it possible to get sub 500ms responses?

My infra is not the problem. I run a heavy Nuxt SSR project on the same infra and it loads in less than 300ms.

Information on your n8n setup

  • n8n version: 1.91.1
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Not set
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker on Cloud Run
  • Operating system: None