If you want to go to war with your competition, or build a Shopify killa site at a fraction of the hosting cost, then you must make use our Ramjet FPC Booster. With over four and half years of extensive deployments and continual improvement from feedback from our customers, Ramjet just adds amazing performance to Magento Open Source, and all without the complexity associated with caching.
Ramjet was designed for Magento OSE 2.3.0+, and specifically designed and tested to work with our other Titanium High Availability Modules.
What we can say is it works very differently than cache warmers that frequent the current Magento 1 & 2 module markets, and thus we call it an FPC booster rather than a cache warmer.
A ramjet uses this high pressure in front of the engine to force air through the tube, where it is heated by combusting some of it with fuel. It is then passed through a nozzle to accelerate it to supersonic speeds. This acceleration gives the ramjet forward thrust. ~Wikipedia
Ramjet has also been tested and designed to work with very large catalogs. Commercial deployments have been performed on 1 million + catalog items with about 7K categories.
Ramjet’s Features
- Works on top of Magento’s FPC
- Multi-Threaded
- Multi-Store Support
- Dashboard Boost for Single Stores
- Boost and S3 Image Sync [When used with S3R-Alpha]
- Background Boosting
- Background Image Boosting [Including WebP]
- Analytics for Boosting frequently viewed content
- Verbose Logging
- Encrypted Module
- Magento 2.2+
Initial Deployment and Activation
As our stacks are designed and considered expert series, we will not go into a lengthy and exhaustive documentation of AWS services and procedures as AWS is very well documented.
Note: This module is designed to work only with aMiSTACX, and only with Magento Open Source. The module is not available for individual purchase, and is only available for use with designated aMiSTACX deployments.
Newer stack deployments allow you to install Ramjet on initial deployment. Should you not see the Ramjet module in Magento’s admin dashboard after a fresh CloudFormation deployment, then follow these steps:
From CLI for approved aMiSTACX stacks:
cd /var/www/magento
sudo chown -R www-data:www-data /var/www/magento
sudo composer require amistacx/ramjet dev-master -W --no-interaction
sudo php bin/magento module:enable Amistacx_Ramjet
sudo ./amistacx.sh
Note: You will may need to remove pcntl_signal_dispatch from CLI php.ini
e.g. /etc/php/8.1/cli/php.ini # search for it: pcntl_signal_dispatch, then remove it.
Note: Encryption Loader for CLI must be available for php CLI.
Restart php8.x FPM:
sudo php8.1-fpm restart
Activation Section
Step 1. Set Ramjet to Enable to “Yes” >> Save Configuration [Clear Cache if prompted]
Extra Options
Enable Analytics Module : This option is very useful for very large catalogs. Ramjet will catalog view counts, and then you can boost only the highest view counts via CLI. This may save an extensive amount of time for a production system that has had it’s FPC cleared.
Cache items on saving or editing : Useful when making a lot of edits to content on a production system. The page will be immediately be boosted.
Enable logger : For development environments, and for advanced troubleshooting, you will want to set to “Yes”. Do not leave ON for production environments. The path to the log is in the default Magento log location under the amistacx folder.
Override Cache TTL to 2 weeks : Sets the maximum amount of time before FPC cache will expire.
Cache checkout link : Attempts to boost the checkout process. Results may vary. Please test A/B performance.
HTTP Authentication
Enable : Default is “No”. Attempts to Boost an authenticated user. Useful for a VIP customer or backend admin.
Ramjet Boosting
Admin Panel
Note: It is strongly suggested you only run Ramjet from CLI; however, for very small stores you can run from the admin dashboard, and only for store in single-store mode.
Ramjet Quick Start Boosting [Small to Medium Catalogs]
cd /var/www/magento
sudo chown -R www-data:www-data /var/www/magento
For a basic boost you just need to run:
sudo php bin/magento ramjet:start –content-type=[CONTENT_TYPE]
e.g.
sudo php bin/magento ramjet:start --content-type=all --threads=5
Tip! For very large catalogs, increase server size and thread count, then decrease server size after completion.
Where CONTENT_TYPE can be
product (Product details page)
category (Categories page)
cms (CMS pages)
all (All of the above)
Tip! If you are not using multi-stores, then explicitly set Magento to Single Store Mode in the admin dashboard.
Stores >> [ Settings]Configuration >> General >> Single Store Mode
Enable Single-Store Mode = “Yes” >> Save Configuration [Clear Cache if prompted]
Ramjet Advanced Boosting CLI Reference
sudo php bin/magento ramjet:start
-p, –start-page[=START-PAGE]
Page offset
-l, –limit[=LIMIT] Limit
–timeout[=TIMEOUT]
Time limit
-c, –content-type=CONTENT-TYPE (Required)
Type of content (product|category|cms|all)
-f, –force Reset previous operation
-s, –store-id[=STORE-ID] Store ID
-t, –threads[=THREADS] Count of threads
-m, –most-viewed Cache only most-viewed products
The Ramjet analytics module must be enabled in the Ramjet admin configuration.
–min-count-views[=MIN-COUNT-VIEWS]
Cache only most-viewed products
-g, –gui only for GUI mode
-b, –background-mode Run background queue mode
You must enable the Analytics Module in the Ramjet Admin configuration.
-i, –boost-images Boost gallery images
-h, –help Display this help message
-q, –quiet Do not output any message
-V, –version Display this application version
–ansi Force ANSI output
–no-ansi Disable ANSI output
-n, –no-interaction Do not ask any interactive question
-v|vv|vvv, –verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Ramjet Boosting [Large and Very Large Catalogs [1M+ SKUs]]
Using a background queue helps segment a large catalog into manageable chunks. Adding the ability to stop and resume boosting at any time. This is very useful because you don’t need to start at the very beginning when a Ramjet boost operation is interrupted or stopped.
Get list of current background queues.
sudo php bin/magento ramjet:queue:list
Display all background queues
sudo php bin/magento ramjet:queue:stop
Remove all background queues
Queue Example:
sudo php bin/magento ramjet:start --content-type=product --store-id=1 --threads=10 -b
This will create 10 queues in background. If you have 1000 products then RJ will have 10 queues with 100 products.
Advanced Cache Learning
Use this switch to pre-load only the most popular products or categories:
Note: The Ramject analytics module must be enabled in the configuration admin panel.
sudo php bin/magento ramjet:start --content-type=[CONTENT_TYPE] --most-viewed --min-count-views=#
Where # = number of views equal or greater. This is useful with large catalogs were pre-loading takes several hours or days, and hence we can just preload the most popular items to save time.
Where [Content Type] = Product or Category
Ramjet CLI Examples
Where [Content Type] = All, Product, or Category
Start cache boosting from N – page, e.g. from 20
sudo php bin/magento ramjet:start --content-type=all --start-page=20
Note: Every page contains 20 records.
Set limit for pages, e.g. to 200
sudo php bin/magento ramjet:start --content-type=[CONTENT_TYPE] --limit=200
Run cache boost with timeout set to 20 seconds.
sudo php bin/magento ramjet:start --content-type=[CONTENT_TYPE] --timeout=20
After 20 seconds the script will stop, and the last page index will be stored.
So in the future, the module will offer to start from the last index position.
You have the option to start from the last index or from the beginning
sudo php bin/magento ramjet:start --start-index=0
You can combine commands :
sudo php bin/magento ramjet:start --content-type=[CONTENT_TYPE] --start-page=10 --limit=2000
sudo php bin/magento ramjet:start --content-type=[CONTENT_TYPE] --start-page=100 --timeout=3600
Advanced Cron Usage
Because Magento will flush the entire FPC for a simple product change or other small changes, you may want to make use of Ubuntu’s cron to automate boosting.
59 * * * * www-data /usr/bin/php /var/www/magento/bin/magento ramjet:start --content-type=all --threads=1 >> /var/www/magento/var/log/magento.cron.log
The above boosts cache for all products every hour. Good for small catalogs.
59 * * * * www-data /usr/bin/php /var/www/magento/bin/magento ramjet:start --–min-count-views=5 --threads=1 >> /var/www/magento/var/log/magento.cron.log
This cron will boost all products with a min view count of five on the hour.
Server Performance Tuning
For Maximum performance and stability.
- DO NOT use Ramjet with any other type of Caching engine! This includes Redis.
- DO NOT use Ramjet with any other performance module except aMiSTACX S3R-Alpha and StarFlare.
Our stacks preserve Magento’s .user.ini files in both /var/www/magento/ and /magento/pub/
This means they override php.ini and .htaccess on Apache/NGINX. For Ramjet, we recommend at a minimum a t3-large and about 3-8GB of Magento memory allocation.
Keep in perspective you will have several layers of caching: CDN, PHP, and Magento’s FPC.
Troubleshooting
If Magento’s FPC has issues, Ramjet will not work as Ramjet is built on top of the FPC. Most of the issues encountered are the result of FPC or site DNS issues. To assist in troubleshooting, attempt to narrow the source of the issue:
Step 1. In the Ramjet section, of the Magento admin console turn on logging.
Step 2. From CLI turn on HTML profiler:
sudo php bin/magento dev:profiler:enable
Step 3. Check a page and see if FPC is working.
Step 4. If FPC is OK, review the logs of Ramjet and look for 404s.
Copy a 404 URL and see if you can reach that URL from your browser. If you can reach the URL from the browser, attempt to Curl the URL from CLI. Ramjet needs access to the URL; otherwise, it can’t cache the path.
e.g. curl https://example.com
Tip! If you are using Cloudflare, and curl results are reporting that you are getting blocked, then you need to add an entry into your hosts file [ /ect/hosts ] to map the domain to your public IP address.
This entry will bypass CF for DNS, and Ramjet will use the host file mapping.
Possible other reasons for 404s are DNS issues and firewall or security group restrictions. You can also set Magento’s doc root to baseline permissions.
sudo chown -R www-data:www-data /var/www/magento
Live Demo of Ramjet used with S3R-Alpha and StarFlare.
Versions:
## [1.2.1] – 2023-05-14
### Changed
+ Fix for Symphony Update