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). 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 |
MongoDB database can operate in "failover" mode. There are three main roles of servers in the replication set:
- PRIMARY — the main (main) server;
- SECONDARY — secondary server in synchronisation mode;
- ARBITER — is a server that does not store data, but accepts voting when the primary (PRIMARY) node is selected.
We recommend using full instances, as MongoDB built-in balancing mechanism works without Arbitron.
Possible scenarios:
- Three or more servers: three full-fledged database servers (the master is selected during the voting process). Arbitrator can also be used in such scenarios as an additional server. This may be necessary in specific situations where you want to use predictive switching of PRIMARY nodes;
- Three servers: two full-fledged database servers, one of which is selected as the primary (PRIMARY), the other as the secondary (SECONDARY), and an ARBITER server. The PRIMARY node is switched automatically if the current primary server goes down. ARBITER allows you to save resources as it is less demanding.
The minimum number of replication set members is three. If two nodes are used in a replication set, if one of the nodes fails, the replication set will go into read-only mode and Passwork will be unavailable.
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;
- traffic 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 | Database 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 |