Technical requirements
Passwork is not resource-intensive. The amount of resources (RAM, CPU, HDD) and the number of servers required depend on the number of active users, the amount of stored data, and the system's fault tolerance requirements.
Passwork consists of an application server (web server + PHP) and a database (MongoDB 4.2+). Both can run on a single shared dedicated or virtual server.
Multiple servers may be necessary if:
- a security policy mandates that the application server and database be separated;
- data needs to be stored simultaneously on multiple servers;
- a fault-tolerant solution is required (multiple application servers).
💡 The IOPS value is very important for the speed of the database, so it is advisable to use SSD disks.
💡 For Linux with RAM less than 4GB We recommend including a 4GB swapfile.
Usually suitable for editions up to 500 users, with no special data storage requirements:
Number of users | RAM | CPU | HDD |
up to 50 | 2-4 GB | 4 | 100 GB |
up to 100 | 4-8 GB | 8 | 150 GB |
up to 500 | 8-16 GB | 8 | 200 GB |
The database and the application server are distributed to different servers.
- RAM-1, CPU-1, HDD-1 — application server.
- RAM-2, CPU-2, HDD-2 — database.
Number of users | RAM-1 | CPU-1 | HDD-1 | RAM-2 | CPU-2 | HDD-2 |
up to 50 | 2-4 GB | 4 | 100 GB | 2-4 GB | 4 | 100 GB |
up to 100 | 4-8 GB | 8 | 100 GB | 4 GB | 4 | 150 GB |
up to 500 | 8-16 GB | 8 | 100 GB | 8 GB | 8 | 200 GB |
up to 1 000 | 8-16 GB | 8 | 100 GB | 16 GB | 8 | 200 GB |
up to 10 000 | 16-32 GB | 16 | 100 GB | 16-32 GB | 16 | 200 GB |
The MongoDB database can operate in a "cluster" mode. There are three main roles of servers in such a cluster:
- Master — the main server;
- Replica — a server with a copy of the data;
- Arbiter — a special server that ensures the correctness of the voting process, when selecting the master base.
Arbiter server is used for automatic switching of master servers and providing fault tolerance.
Possible scenarios:
- 2 servers: one master, actively used, + a replica, passively storing a copy of the database;
- 3 servers: two full-featured database servers, one of which is selected as a master, the second as a replica, and the third as an arbiter server, ensuring the correctness of the master selection process. The master database is switched automatically if the current master fails. The arbiter saves resources, as it is less demanding on resources;
- 3 or more servers: three full-fledged database servers (the master is selected during the voting process). The arbitrator can also be used in such scenarios as a third+ server. This may be necessary in specific clusters where you need to use predictive switching of the master database.
Technical requirements for the arbiter:
- RAM - 4 GB, CPU - 4, HDD - 100 GB
- High speed network connection to the rest of the database servers.
It is possible to use several application servers in tandem wit:
- horizontally multiple PHP-FPM servers;
- load balancer
This will allow:
- If one server goes down, requests are automatically redirected to the working servers;
- Accelerate application's operation when the number of users is large (10 000 and more)
Data storage, backups and logs
The above HDD recommendations do not take backups and logs into account. We recommend storing database backups on separate servers or in specialized storages.
An archived database backup takes about 10% of the size of the database itself.
Estimate database size (how much disk space actually takes up, not including attachments):
Number of users | Number password | Time of usage | Detabase size | Backup archive |
up to 100 | 1000 | 1 year | 0,1 GB | 10 MB |
up to 100 | 1000 | 2 year | 0,5 GB | 50 MB |
up to 100 | 1000 | 3 year | 1 GB | 0,1 GB |
up to 1 000 | 5000 | 1 year | 1 GB | 0,1 GB |
up to 1 000 | 5000 | 2 year | 5 GB | 0,5 GB |
up to 1 000 | 5000 | 3 year | 10 GB | 0,5 GB |
up to 10 000 | 10 000 | 1 year | 10 GB | 0,5 GB |
up to 10 000 | 10 000 | 2 year | 50 GB | 1 GB |
up to 10 000 | 10 000 | 3 year | 100 GB | 2 GB |
