Using Railgun for faster load times and more efficient caching.
Nearly 70% of web content is cacheable (JS, CSS, & HTML). CloudFlare’s CDN leverages this by sync’ing to multiple datacenters worldwide.
They’ve taken it a step further with their RailGun Tech. RailGun maintains an active TLS/TCP link at which is able to cache up to 99.6% of the data from the origin server to CloudFlare.
Website structure changes are typically infrequent (body, tags, scripts, JSON API responses). When dynamic content changes, markup code is typically only slightly affected.
The “listener” module on the origin server detects these changes and syncs to the “sender” module on the CloudFlare network.
Installing RailGun on any RPM-based x64 server is simple.
Add the server’s IP(s) to your RailGuns in the CloudFlare Partner Panel
Prep the server by opening firewall TCP/2408 to CloudFlare’s Network IPs:
Add the following to httpd.conf
$ CloudFlareRemoteIPTrustedProxy 127.0.0.1
This adds your RailGun instance to the trusted proxy list.
Install RailGun with yum:
$ yum install railgun-stable
Activating RailGuns in cPanel:
Click the CloudFlare plugin in cPanel.
Select “Performance” from the top menu.
Scroll to the site you’d like to enable RailGun and click “Settings” to the left of the domain name you select.
Next to the RailGun option, press the “Off” button to toggle it to “On”
Any domain that is setup on CloudFlare’s DNS and has it’s IP listed in the partner panel can utilize Railgun via cPanel.