Reference architecture

Lower egress costs for an AWS application, with Cloudflare in front

For companies with an application in AWS, Azure or Google Cloud whose data transfer bill is driven by dynamic content. Cloudflare protects the application and serves static assets; Efficient Cloud Egress delivers the dynamic traffic from our data centres, which fetch from your cloud over a direct connection at a much lower transfer rate.

The problem

The application runs in AWS. Cloudflare already caches its JavaScript, CSS and images, but the rest of the traffic is API responses, personalised pages and a large catalogue where each object is requested rarely. That traffic misses the cache, comes out of AWS through its internet egress, and is most of the data transfer bill.

How the pieces fit

  1. Cloudflare receives every request. The WAF, DDoS protection and bot management filter it, and static assets are served from Cloudflare’s cache.
  2. Requests that miss the cache go to Efficient Cloud Egress instances in our data centres, configured as Cloudflare’s origin. They keep persistent connections to your application, cache what the content allows, collapse simultaneous requests for the same object into one, and pass dynamic pages straight through.
  3. Efficient Cloud Egress fetches from your origin in AWS over our direct connection to the AWS network. AWS bills that traffic at its private transfer rate, and we bill delivery in credits.

The same design works with Microsoft Azure and Google Cloud, which our data centres are also connected to.

What you get

  • One security layer in front of the application, with every log kept through Cloudflare Logpush.
  • Lower transfer cost for the dynamic traffic, without changing the application or its provider.
  • Active/active Efficient Cloud Egress instances in more than one site, and a tested failback to serving directly from AWS.
  • One team that designs and runs both layers, as a Cloudflare Authorized Service Delivery Partner.

Cost

Efficient Cloud Egress is priced from $0.031 per GB, plus Cloudflare according to your plan; see the Efficient Cloud Egress pricing. How much you save depends on your provider, region and volume, so send us a recent bill and we calculate it on your real traffic.

Frequently asked questions

Do I need to move my application out of AWS to lower egress costs?

No. The application stays in AWS, Azure or Google Cloud. Efficient Cloud Egress sits between Cloudflare and your origin and fetches from it over a direct connection to the provider, so the origin traffic is billed at the provider's private transfer rate instead of its internet egress rate.

Why use both Cloudflare and Efficient Cloud Egress?

Cloudflare is the best fit for security and for static assets that many users request, which it serves from cache. Dynamic pages, API responses and long-tail content are rarely in a CDN cache, so they still reach your origin and still pay egress. Efficient Cloud Egress handles that part of the traffic.

What happens if Efficient Cloud Egress has a problem?

Cloudflare can send traffic straight to your cloud origin again by changing its origin setting, which is the failback path we configure from the start. You go back to paying the provider's egress rate for that traffic, and nothing else changes for your users.