Skip to content

Flowplan is now available hostedServers in Germany, backups and updates included – nothing for you to look after. Self-hosting stays free and complete.

See plans
flowplanDocumentationCommunityMarketplaceStart page

Scaling

Sizing

How many people a Flowplan instance carries, what runs out first and what hardware to plan for small, medium and large teams – based on the load tests.

5 min read

On this page
  1. Active people, not accounts
  2. What one instance carries
  3. What runs out first
  4. Recommendations
  5. Several processes on one host
  6. Measure it yourself

Active people, not accounts

What matters is not how many accounts an instance has, but how many people work at the same moment: opening pages, typing, searching, changing records. An account that is doing nothing costs the server nothing.

The figures below count active people the way the load test simulates them: each sends a request every 1.5 seconds on average, or types continuously in a shared document. Real people read, think and switch to other apps – they create far less load. So the figures are a cautious limit: an instance that carries 20 such people copes with noticeably more real people signed in at the same time.

The instance settings show how many are active at once on your instance: people active now in the live strip of Instance at a glance and the Active people per hour chart under Settings → Instance → Monitoring (see Operations). Take the peaks, not the average.

What one instance carries

Measured up to the first load step where things slow down: 95 % of reading requests above 500 ms, of writing requests above 1 s, or more than 1 % errors. "Carries" is the step before.

SetupCarries aboutNote
Single container with SQLite20 active peopleOne process, no other services
PostgreSQL, 1 instance with one dedicated core30 active peopleBeyond that, read times rise steeply
PostgreSQL, 2 instances with one core each (cluster)40–50 active peopleStill error-free at 60, but slow

The rule of thumb for planning: 25–30 active people per instance with one dedicated CPU core. For more people, add instances in cluster mode – this grows roughly linearly as long as PostgreSQL has headroom. An instance does its main work essentially on one core (Node.js); more cores per instance mostly help side work such as text recognition, and exports and imports, which run in worker threads of their own (FLOWPLAN_WORKERS) and no longer hold up other requests; more instances help with more people.

Measured on 4 vCPU (Intel Xeon, 2.1 GHz) with 16 GB RAM, PostgreSQL 16 and Redis 7 on the same machine. On a server running nothing else, and with faster cores, the figures are higher.

What runs out first

  • The instance's CPU – on reads: loading the sidebar with its permission checks page by page, opening large databases (all records) and search. These requests slow down first.
  • Writes and live editing stay fast for long. At 60 active people on two instances, document changes (95 %) went through in 182 ms, and one person's change reached co-editors on the other instance through Redis in 195 ms.
  • PostgreSQL was not the bottleneck in the test: writing requests stayed below 500 ms everywhere.

How you notice it in production: under Settings → Instance → Monitoring the response time (p95) rises, one core of the instance runs at full load all the time, and the System section shows connections "waiting".

Recommendations

Guide values for people active at the same time at peak. Plan memory generously for imports, exports and text recognition of scanned PDFs.

SmallMediumLarge
Active at the same timeup to about 20about 20–60more than 60
Setupone container with SQLitePostgreSQL, one container – from about 30 active people, or for updates without downtime, a cluster of 2–3 instancescluster with one instance per 25 active people, plus a spare
Flowplan2 vCPU, 2–4 GB RAM1–2 vCPU, 2 GB RAM per instance1–2 vCPU, 2 GB RAM per instance
DatabaseSQLite on a local SSD (no NFS)PostgreSQL with 2 vCPU, 4 GB RAM, SSDPostgreSQL with 4+ vCPU, 8+ GB RAM, SSD, own server or managed service
Other servicesoptional S3in a cluster: Redis (small, no persistence), S3Redis, S3

Database connections: set FLOWPLAN_PG_POOL to 10–20 per instance, and PostgreSQL's max_connections to at least instances × (FLOWPLAN_PG_POOL + 2) plus a reserve. Example: 4 instances with pool 20 need 88 connections; with a reserve, max_connections=150 fits.

Plan a spare: in a cluster, run at least one instance more than the load needs – during an update or when a node fails, the others carry on.

Several processes on one host Since 0.11.1

One process uses essentially one core for requests. With FLOWPLAN_PROCESSES=auto (or a number), the container runs several processes behind the same port; the background jobs run once, in process 1. Measured on 4 vCPU with 200 busy load-test users, the slowest 5 % of reads went from 1.6 s to 0.5 s and throughput from 174 to 245 requests per second; with up to about 100 users, one process is just as fast.

  • When: a host with spare cores and more than about 100 people working at the same moment. Below that, keep the default 1.
  • Memory: about 300–450 MB more per process.
  • SQLite and Litestream stay safe: the processes share the database file; backups work as before.
  • In a cluster, each process counts as an instance of its own, with its own PostgreSQL pool and Redis connection.
  • Moving an instance to another server: switch back to one process for it.
  • Monitoring shows a table with each process's memory, CPU and restarts. A crashed process is restarted after 1 s, waiting up to 30 s if it keeps failing.
  • Memory per process: Settings → Instance → Monitoring → Server shows every process with its RSS, the JavaScript heap used and reserved, the native memory outside the heap (Node.js and libraries, thread stacks, memory freed but not yet given back – roughly), uptime and live connections. The container counts once for all processes, with its file cache apart. The processes' RSS added up is a little higher than their share of the container, because shared memory counts with each of them. Since 0.12.3
  • Freed native memory: the Docker image sets MALLOC_ARENA_MAX=2, so memory that large imports and uploads freed goes back to the system instead of staying fragmented in the process. You can override it in the environment; leave it unless you know why. Since 0.12.3

Measure it yourself

The load tests are in the source code under scripts/loadtest (opens in a new tab): for a single container and for cluster mode (scripts/load-test-cluster.mjs, 1, 2 … instances against PostgreSQL and Redis). A measurement on the hardware Flowplan will run on tells you the most.

Warning

Never measure against an instance people use: the test creates hundreds of accounts, pages and thousands of records and slows the instance down for everyone. Use a fresh, separate instance and delete it afterwards.

Was this helpful?
YesThanks!
No – tell us what's missing

Found a mistake or something missing?Edit on GitHub