Cloudflare Docs
Visit Railgun on GitHub
Set theme to dark (⇧+D)



Railgun creates a persistent TCP connection between Cloudflare’s edge and the origin, which provides various benefits such as performance improvements and connectivity management. Railgun is configured using two components: the sender and the listener. The sender, automatically configured at every Cloudflare data center, establishes a persistent connection with the listener, installed at the origin server. Each component keeps track of the most recently requested version of a page.

​​ Railgun’s evolution

Since Railgun’s launch, Cloudflare has released several products in different areas that better address the problems that Railgun set out to solve. In the table below, you can find more information about how to reproduce the functionality of Railgun using newer Cloudflare solutions.

Use case Railgun solution Improved Cloudflare solution
Performance Railgun can transmit the difference between dynamic page requests, but not necessarily over the fastest Internet path.
  • Argo Smart Routing routes requests over the most efficient path, avoiding any network congestion.
Connectivity and IP Management Railgun listeners can front multiple origin servers simultaneously, reducing the need for more IP management.

Redundant Railgun listeners can be deployed for increased fault tolerance.
  • Cloudflare Tunnel securely connects your origin servers to Cloudflare without a publicly routable IP address.
  • Cloudflare Load Balancing distributes traffic across your servers, which reduces server strain and latency.
  • Cloudflare Aegis are dedicated IPs between Cloudflare and your origin. This allows you to lock down your services and applications at an IP level and build a protected environment that is application aware, protocol aware, and even IP-aware.
  • Cloudflare Network Interconnect (CNI) allows you to connect your network infrastructure directly with Cloudflare – rather than using the public Internet.
Reduce egress fees to Cloudflare In some cases, Railgun compression can reduce egress.