Technical requirements

13min

General information

Passwork is not resource-demanding. The amount of RAM, CPU power and free disk space, as well as the number of servers you will need depend on the number of active users, the amount of stored data, and the system's fault tolerance requirements.

Passwork consists of two elemetns:

  • An application server (web server + PHP)
  • A database (MongoDB)

Both can run on a single shared dedicated or virtual server.

You can use multiple servers if:

  • the application server and database should be placed on different servers to maintain security;
  • data needs to be stored simultaneously on multiple servers;
  • you need to ensure fault-tolerance of the system.

Additional recommendations

  • The IOPS value is critical to the database operation speed, so we advise using SSD disks.
  • For Linux with less than 4GB of RAM we recommend enabling a 4GB swapfile.

Passwork installation options for dedicated and virtual servers

1. Installing on a single server

This option is suitable for editions of up to 500 users if there are no specific requirements for data storage:

Number of users

RAM

CPU

HDD/SSD

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

2. Installing application and database on different servers

In this case, the database and the application server are located on different servers.

Application server requirements:

Number of users

RAM

CPU

HDD/SSD

up to 50

2-4 GB

4

100 GB

up to 100

4 GB

8

100 GB

up to 500

8-16 GB

8

100 GB

up to 1000

8-16 GB

8

100 GB

up to 10 000

16-32 GB

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

MongoDB database can operate in failover mode. There are three main server roles in the replica set:

  1. Primary — the main server;
  2. Secondary — secondary server in synchronisation mode;
  3. Arbiter — a server that does not store data, but is involved in voting for the main node in case the primary server fails.

We recommend using full instances, as MongoDB built-in balancing mechanism works without an arbiter

Possible scenarios:

  1. Three or more servers: three full-fledged database servers (the master is selected during the voting process). In this scenario you can use the arbiter as an additional server, for example when you want to achieve predictable switching of primary nodes;
  2. Three servers: two full-fledged database servers, one of which is selected as the primary, the other as the secondary and the third as the 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 replica set members is three. Otherthise, if one of the nodes fails, it will go into read-only mode and Passwork will be unavailable.

Technical requirements for the arbiter:

  • RAM — 4 GB, CPU cores — 4, HDD/SSD — 100 GB
  • High-speed network connection to the rest of the database servers.

4. Multiple application servers

You can use several application servers as a group of:

  • multiple PHP-FPM servers horizontally;
  • traffic load balancer.

This will allow to:

  1. Automatically redirect requests to other servers if one of the servers goes down;
  2. Improve application's performance when you have a lot of users (10 000 and more)

Storing backups and logs

The storage space recommendations above do not take backups and logs into account. We recommend storing database backups on separate servers or in specialized storage.

The size of an archived backup takes about 10% of the database itself.

You can estimate an actual database size (without attachments) using the following table:

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