Table of Contents
First Launch and Setup Guide
EC2 Instance Recommendations
Every company is unique in many ways, and their communication needs are no different! Years ago, it was easy to recommend hardware specs for Asterisk-based PBX systems. However, these days, VoIP has evolved into a total communication platform. While we will provide some general guidelines for EC2 hardware, it will be important to regularly check your server resources to ensure you on a properly sized-instance. This is especially true when first placing your new AWS FreePBX instance into production and any time your company experiences growth or drastic changes in the way you do business. One of the best features of AWS is the ability to change EC2 Instance Types and Sizes at any time, so you can rest assured that a proper balance between performance and cost can be achieved regardless of your company's size, now and in the future!
EC2 Hardware Types
For most environments where you simply want to take advantage of the normal suite of FreePBX services (calling, voicemail, fax, conferences, etc), the General Purpose Instance types (T3, T3a, M6, M6a) will provide the best combination of performance and value. If you are using a minimum amount of “intensive” services like conference rooms and queues, the T3 or T3a types will suffice. If you are planning to host a lot of extensions, conference rooms, 3rd party software (see below), etc., you will want to take advantage of the more dedicated performance of “M-Types” (M6, M6a, M7i, M7a, M8i, M8a).
If you plan to use “extra” software on or alongside your AWS FreePBX instance, such as iSymphony or Queue Metrics, you need to be aware that each of these platforms have their own hardware requirements. For example, iSymphony is a PHP-heavy Java application that requires significantly more CPU and RAM resources in addition to what Asterisk and FreePBX need. iSymphony's RAM requirements can easily exceed 3 or 4GB on very large deployments and/or busy call centers. You may want to take advantage of the Compute Optimized “C-Types” (C7i, C7a, C8i, C8a), which provide extra CPU cores, or Memory Optimized “R-Types” (R7i, R7a, R8i, R8a), which provide extra RAM, depending on the software you are deploying alongside AWS FreePBX.
Here are some other special use cases where you will keep other considerations in mind:
- If you are planning to run an Advanced Recovery or Warm Spare Cluster, DO NOT USE A “T-Type” INSTANCE! Clusters have higher consistent CPU loads than the T-types can provide due to their burst-based nature. You must use M-Type, C-Type, or R-Type instances for your Cluster nodes
- Voice Recognition and Text to Speech heavy deployments will likely benefit best from the Compute Optimized C-Type instances
- Call Centers with Outbound Dialers or a large number of Inbound Call Queues will likely benefit from the Memory Optimized R-Type instances
EC2 Hardware Sizes
This is the more difficult aspect to predict ahead of a deployment, as there are many factors that ultimately determine the size of instance (CPUs/RAM) you choose. You should also note that Compute Optimized C-Types and Memory Optimized R-Types have unbalanced hardware specs when compared to General Purpose T- or M-Types. Of course, once your server is in production, it is important to periodically check the resource usage on your FreePBX instance during times of PEAK CALL VOLUME to ensure you are using the correct size for your needs. An instance sized too small will lead to instability, audio issues, dropped calls, and even server crashes. An instance sized too large will waste money.
Assuming you don't have a super large deployment with your current phone solution, feel free to start with the M6a.large or M6a.xlarge instance type to get started. Once you have placed your instance in production, you'll want to monitor your resources during periods of peak call activity and adjust your instance size accordingly. Here are several ways to monitor your resources:
- Check out the AWS Compute Optimizer, which will advise you as to whether you have over- or under-provisioned your AWS instances based on the most recent 14 days of resource usage. More information on the AWS Compute Optimizer can be found here
- Connect to your instance via SSH and run 'htop' for a live view of CPU/RAM resources and running processes
- Alternatively view CPU usage on the FreePBX Dashboard Statistics widget CPU section and compare the 5 minute load average to the number of CPUs available to your instance (determined by instance size). For example, if your running on a T3.Small instance with 2vCPUs and consistently see your 5 minute load average rise above 2.0, then you are running your ALL of your CPU cores at 100% and will likely run into issues if you don't increase your instance size to one with more CPU cores
- Alternatively view RAM usage on the FreePBX Dashboard Statistics widget Memory section. If you are seeing greater than 70% of your RAM “In Use” during peak times, you could run into issues. This is especially true if using iSymphony
- If using a T3|T3a Type, you will also want to view your CPU Credit Balance via the EC2 Console (select the Instance, choose the Monitoring tab below). If you are seeing your CPU Credit Balance reaching 0 during peak times, this means your CPU is bursting too much and is either being THROTTLED or you are being CHARGED EXTRA (if Unlimited mode is on). It is recommended that you increase to a larger T3|T3a size or switch to the M5|M5a Type in these cases
If you have any doubts as to the best Instance Type and Size for your needs, we're here to help! Submit a Ticket and we'll gladly discuss your needs to come up with a tailored recommendation for your company. For more information regarding resizing instance types on AWS EC2, please click here.
