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.
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:
- Either use a fast and redundant shared storage box
- Or take advantage of the cloud and rent a computing instance designed for this purpose
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.
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.
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:
- Infrastructure Controller
- Web Management Interface
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:
- incoming faxes
- voicemail messages
- recorded called
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.
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.
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.
All nodes require local storage. All database roles will write data on local storage, which must be high-performance.
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.
|Path||Typical Size Requirements||Description|
|Low (< 10 GB)||Storage path for music on hold.|
|Low (< 10 GB)||Storage path for sounds.|
|Very Low (< 1 GB)||Path where provisioning files for equipment is saved.|
|Very Low (< 1 GB)||Quota management files.|
|Very Low (< 1 GB)||Temporary storage path for outgoing fax messages.|
|Very Low (< 1 GB)||Storage path for fax files to be sent out, that have not been sent.|
|Very Low (< 1GB)||Temporary storage for recording sounds over the phone.|
|/usr/local/voipnow/stmp||Very Low (< 1GB)||Temporary storage for file import used in Hubgets|
|/usr/local/voipnow/scache||Medium (< 100 GB)||Cache storage for cloud storage, used only if Amazon S3 is used|
|/usr/local/voipnow/scache_e||Medium (< 100 GB)||Cache storage errors for cloud storage, used only if Amazon S3 is used|
|High when Amazon S3 is not used||Storage path for fax files. (low when configured|
|High when Amazon S3 is not used||Storage path for recordings.|
|High when Amazon S3 is not used||Storage path for voicemail.|
|High when Amazon S3 is not used||Storage path for pictures, documents, etc.|
To resume the information above, here are the types of storage needed for each role:
|SQL||Local storage only. Very fast, implemented with fast disks, preferably SSD.||Depends on deployment size, below 512GB even for large deployments.|
|Distributed Database||Local storage only. No special storage performance requirements.||Depends on deployment size, below 100 GB per node even for very large deployments.|
|PBX||Shared storage only.||Without Amazon S3 cloud storage, capacity requirements might be high (many Terabytes) *|
|Web Management Interface||Shared storage only.||Without Amazon S3 cloud storage, capacity requirements might be high (many Terabytes) *|
|Infrastructure Controller||Shared storage only.||Without Amazon S3 cloud storage, capacity requirements might be high (many Terabytes) *|
|Elasticsearch||Local storage only. Very fast, implemented with fast disks, preferably SSD.||Depends on deployment size, below 512GB even for very large deployments.|
|Worker||Shared storage only.||Without Amazon S3 cloud storage, capacity requirements might be high (many Terabytes) *|
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.