Technical Requirements
General information
Passwork is not resource-intensive. The amounts of RAM, disk space, and CPU power, as well as the required number of servers, depend on the number of active users, the volume of stored data, and system fault tolerance requirements.
Passwork consists of two elements:
- Application server (web server and PHP);
- Database;
The application server and database can run on the same server or on different virtual or physical servers if:
- for security reasons, it is necessary to separate the application server and database onto different servers;
- it is necessary to store data simultaneously on multiple servers;
- a fault-tolerant solution is required.
Additional recommendations
- The IOPS metric is very important for database performance, so we recommend using SSD drives.
- For Linux with less than 4 GB of RAM, it is recommended to enable a swap file of 4 GB.
Passwork installation options
1. Installation on a single server
This option is suitable for editions up to 500 users without special data storage requirements:
| Number of users | RAM | CPU | HDD/SSD |
|---|---|---|---|
| up to 50 | 2-4 GB or more | 4 | 100 GB |
| up to 100 | 4-8 GB or more | 8 | 150 GB |
| up to 500 | 8-16 GB or more | 8 | 200 GB |
2. Installation on separate servers
In this case, the database and application server are located on different servers.
Application server requirements:
| Number of users | RAM | CPU | HDD/SSD |
|---|---|---|---|
| up to 50 | 2 GB or more | 4 | 100 GB |
| up to 100 | 4 GB or more | 8 | 100 GB |
| up to 500 | 8 GB or more | 8 | 100 GB |
| up to 1000 | 16 GB or more | 8 | 100 GB |
| up to 10,000 | 32 GB or more | 16 | 100 GB |
Database server requirements:
| Number of users | RAM | CPU | HDD/SSD |
|---|---|---|---|
| up to 50 | 2-4 GB | 4 | 100 GB |
| up to 100 | 4 GB | 4 | 150 GB |
| up to 500 | 8-16 GB | 8 | 200 GB |
| up to 1000 | 16 GB | 8 | 200 GB |
| up to 10,000 | 16-32 GB | 16 | 200 GB |
3. Multiple database servers
The MongoDB database can operate in a fault-tolerant mode. Three main server roles are allocated in a replica set:
- Primary — main server;
- Secondary — secondary server in synchronization mode;
- Arbiter — a server that does not store data but participates in selecting the primary node in case of server failure.
We recommend using full instances, as MongoDB's built-in balancing mechanism works without an arbiter as well.
Possible implementation options
- Three or more servers: three full database servers (the primary is selected through voting). In this case, the arbiter can be used as an additional server, for example, when predictable primary node failover is needed;
- Three servers: two full database servers, one of which is selected as primary, the second as secondary (
SECONDARY), and the third acts as an arbiter. The primary node switches automatically if the current primary server fails. The arbiter helps save resources as it is less demanding.
The minimum number of replica set members is three. Otherwise, if one node fails, the replica set will switch to "read-only" mode, and Passwork will be unavailable.
Technical requirements for Arbiter
- RAM — 4 GB, CPU — 4 cores, HDD/SSD — 100 GB;
- High-speed network connection with other database servers.
4. Multiple application servers
You can use multiple application servers in a cluster consisting of:
- several PHP-FPM servers (horizontal scaling);
- a traffic load balancer.
This allows:
- Automatic redirecting of requests to other servers if one fails.
- Accelerated application performance with a large number of users (10,000 or more).
Backup and log storage
The disk volume recommendations below do not include backups and logs. We recommend storing database backups on separate servers or specialized storage.
An archived database backup occupies about 10% of the database size.
You can estimate the actual database size (excluding attachments) using the following table:
| Number of users | Number of passwords | Time in use | Database size | Backup archive |
|---|---|---|---|---|
| up to 100 | 1000 | 1 year | 0.1 GB | 10 MB |
| up to 100 | 1000 | 2 years | 0.5 GB | 50 MB |
| up to 100 | 1000 | 3 years | 1 GB | 0.1 GB |
| up to 1000 | 5000 | 1 year | 1 GB | 0.1 GB |
| up to 1000 | 5000 | 2 years | 5 GB | 0.5 GB |
| up to 1000 | 5000 | 3 years | 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 years | 50 GB | 1 GB |
| up to 10,000 | 10,000 | 3 years | 100 GB | 2 GB |