This page describes the storage infrastructure that should be deployed with VoipNow.

Roles on storage layer

Storage is always necessary in a distributed infrastructure. For non-database roles, this usually implies using a shared storage of some kind (using a network file system) or the cloud (for example Amazon S3). For database level roles, there are other requirements that must be met.

SQL

As already discussed, the SQL role demands exceptional I/O performance. The storage space depends on the size of the database, which is directly proportional with the number of users. The performance should also be chosen based on the number of users.

The current industry trend to implement fast I/O is to use SSD (disks or, for extreme performance, PCI based cards). Cloud offerings also include such instances (for example, all Amazon High I/O Instances are backed by SSD disks).

Because the SQL role (at least on the master node) must be highly available, you have two choices:

Distributed database

The distributed database does not have high I/O demands. Therefore, you can use regular local storage, but make sure it is reliable enough. The distributed database features Availability Groups, but if one of the nodes loses the entire database, it will have to replicate it again from a working node. This is no a walk in the park when it comes to large databases with many gigabytes, so make sure it does not happen often.

Elasticsearch

The Elasticsearch role creates a faster engine for storing call history and various other data, for which SQL storage was not really optimal. This new role executes reports faster and enables speed improvements in the web interface.

Unstructured storage

While by default VoipNow uses the POSIX file system  in order to assist service providers in building a cost-effective shared storage layer, VoipNow can store the storage space consuming resources (incoming faxes, recorded calls and voicemail messages) in Amazon S3. Keep in mind that information is written to Amazon S3 asynchronously. Please read the Storage Configuration guide for more information on how to set up the storage.

You don't necessarily have to use the Amazon S3 service. Instead, you can use any service or software that exposes a compatible S3 interface.

We are very interested in hearing about your experiences, so please do not hesitate to share them with us in the GetSatisfaction community.

However, you still need to use a shared storage locally, but of very limited size.

Roles on other layers

The following roles require access to a shared storage layer:

Capacity

While VoipNow does not have many storage space consuming resources, some of them might consume a lot of storage space, depending on usage. These are:

These are not the only resources in VoipNow, but others (such as sounds) do not take much storage space, no matter how VoipNow is used.

I/O performance

Because resources are not intensively accessed, there is no need for high IOPS performance or high bandwidth. This means that it is not necessary to implement the shared storage using fast disk drives such as SAS or SSD.

Reliability

We recommend that you focus on capacity and keep in mind that the reliability of the disks is important. Storage appliances from recognized storage vendors use only enterprise-level disks.

If you decide to build your own shared storage on a regular server, keep in mind that RAID levels might not offer enough failure protection when a large number of disks is involved. The industry has solutions, such as the ZFS file system that is available on Open Source or commercial appliances.

Storage Type

Local storage

All nodes require local storage. All database roles will write data on local storage, which must be high-performance.

Shared storage

Some roles might require access to a network shared storage. When Amazon S3 cloud storage is used, shared storage requirements are relaxed, as the capacity and IOPS requirements are not high. Otherwise the shared storage might be expensive to deploy.

The following paths must be made available to roles that request the shared storage. They must be mapped and mounted on the shared storage.

PathTypical Size RequirementsDescription

/var/lib/asterisk/music

Low (< 10 GB)Storage path for music on hold.

/var/lib/asterisk/sounds

Low (< 10 GB)Storage path for sounds.

/var/lib/voipnow/provisioning

Very Low (< 1 GB)Path where provisioning files for equipment is saved.

/var/lib/voipnowquota

Very Low (< 1 GB)Quota management files.

/var/lib/faxmsg

Very Low (< 1 GB)Temporary storage path for outgoing fax messages.

/var/spool/fax

Very Low (< 1 GB)Storage path for fax files to be sent out, that have not been sent.

/usr/local/voipnow/tmp

Very Low (< 1GB)Temporary storage for recording sounds over the phone.
/usr/local/voipnow/stmpVery Low (< 1GB)Temporary storage for file import used in Hubgets
/usr/local/voipnow/scacheMedium (< 100 GB)Cache storage for cloud storage, used only if Amazon S3 is used
/usr/local/voipnow/scache_eMedium (< 100 GB)Cache storage errors for cloud storage, used only if Amazon S3 is used

/var/spool/asterisk/fax/

High when Amazon S3 is not usedStorage path for fax files. (low when configured

/var/spool/asterisk/monitor

High when Amazon S3 is not usedStorage path for recordings.

/var/spool/asterisk/voicemail

High when Amazon S3 is not usedStorage path for voicemail.

/usr/local/voipnow/files

High when Amazon S3 is not usedStorage path for pictures, documents, etc.

Requirements table

To resume the information above, here are the types of storage needed for each role:

RoleStorageCapacity
SQLLocal storage only. Very fast, implemented with fast disks, preferably SSD.Depends on deployment size, below 512GB even for large deployments.
Distributed DatabaseLocal storage only. No special storage performance requirements.Depends on deployment size, below 100 GB per node even for very large deployments.
PBXShared storage only.Without Amazon S3 cloud storage, capacity requirements might be high (many Terabytes) *
Web Management InterfaceShared storage only.Without Amazon S3 cloud storage, capacity requirements might be high (many Terabytes) *
Infrastructure ControllerShared storage only.Without Amazon S3 cloud storage, capacity requirements might be high (many Terabytes) *
ElasticsearchLocal storage only. Very fast, implemented with fast disks, preferably SSD.Depends on deployment size, below 512GB even for very large deployments.
WorkerShared storage only.Without Amazon S3 cloud storage, capacity requirements might be high (many Terabytes) *


* Depends on the quota limits assigned by the service provider for their users.


Configure Storage

Overview of Software Roles

VoipNow Roles Requirements