---
title: "Architecture"
space: "Frappe Framework"
url: "https://www.prilk.com/docs/frappe-framework/architecture"
updated: "2026-05-14"
---

## Architecture

Frappe is a layered web application stack. Understanding the parts helps when troubleshooting or sizing infrastructure.

### The pieces

| Layer | Technology |
|---|---|
| Database | MariaDB (default) or PostgreSQL |
| Application server | Python with Gunicorn + Werkzeug |
| Background workers | RQ (Redis Queue) |
| Cache & sessions | Redis |
| Realtime updates | Socket.IO (Node.js) |
| Frontend | Server-rendered Jinja, plus jQuery/Vanilla JS on the desk |
| File storage | Local filesystem or S3-compatible object storage |

### How a request flows

1. Browser hits the **web** Gunicorn process via Nginx.
2. Frappe resolves the request: DocType form, report, API call, or a custom page.
3. Permissions are checked against the DocType, the user's roles, and any record-level rules.
4. Data is read from MariaDB; the response is rendered (HTML, JSON or PDF) and returned.
5. Long-running work (PDF generation, emails, integrations) is queued to **worker** processes via RQ; the user gets an immediate response.

### Multi-tenancy

A single bench can host many **sites**, each with its own database, files, users and installed apps. That's how Frappe Cloud and Prilk-managed deployments serve many customers off one stack.
