Skip to content

Overview

Cloud Connectivity is the layer that carries traffic between the two providers Adventive runs on. Cloudflare Workers execute at the edge and reach the databases in AWS, but AWS holds those databases on a private network with no public endpoint. Cloudflare has no native PrivateLink path into a customer VPC, so the connection is built with Cloudflare Tunnel: a cloudflared daemon runs on EC2 inside the target VPC and opens an outbound-only session to Cloudflare’s edge. Hyperdrive routes its pooled database connections through that tunnel to the private Aurora endpoints.

This section is the operating standard for that tunnel. It spans both providers by design, so it lives on its own rather than inside the Cloudflare or AWS provider pages: the Cloudflare tunnel resources, the AWS EC2 fleet that runs the daemon, the Secrets Manager wiring, and the New Relic health layer are documented here as one system.

Where the tunnel sits, Cloudflare edge to the private AWS network CLOUDFLARE EDGE Workers + Hyperdrive execute at the edge, pool DB connections Edge proxy · TLS terminates Worker traffic AWS VPC (us-east-1) cloudflared on EC2 Auto Scaling Group, one host per env outbound-only, no inbound rule Aurora MySQL (private) no public endpoint outbound tunnel 7844, 443 fallback TCP / 3306 The daemon dials out to Cloudflare; no inbound security-group rule is required on AWS and the databases never receive a public endpoint.

The daemon dials out to Cloudflare (7844, with 443 as fallback). No inbound security-group rule is required on the AWS side, and the databases never get a public endpoint. The whole tunnel is provisioned as Terraform in adventive-platform-infra: the AMI by EC2 Image Builder, the EC2 fleet by the cflared-asg module, and the Cloudflare tunnels and their Secrets Manager credentials by the cloudflare-tunnels module.

#TopicStatus
01Architecture, as-built topology, namingActive standard
02Provisioning an environment: AMI, tunnel, ASGActive standard
03Deployment pipeline and manual operationsActive standard
04Health monitoring: New Relic agent and CloudWatchActive standard
05Runbook and recoveryActive standard
06Naming, security groups, IAM, glossary, revision historyActive standard
07Architecture decision recordsActive
EnvironmentTunnelState
Developmentadv-cflared-devDeployed. One host behind an ASG, running the New Relic agent.
Stagingadv-cflared-stgDeployed. One host behind an ASG.
Productionadv-cflared-prdDeployed. Two hosts across two Availability Zones behind an ASG.

The New Relic Infrastructure agent ships in the shared tunnel-host AMI, so every environment’s hosts run it (host and process metrics). It is a deliberate, ADR-backed addition on top of the standing CloudWatch surface; see Chapter 04 and the decision record.

Cloudflare runs the Workers and Hyperdrive configs that consume the tunnel. The thin Cloudflare Tunnel entry under that section points here.

Hyperdrive pools the database connections that ride the tunnel.

AWS holds the Aurora clusters, the EC2 fleet running cloudflared, and Secrets Manager, which holds the tunnel credentials and the New Relic license key.

New Relic is the observability platform the health layer reports into.

The original planning artifact is Cloudflare Tunnel Rollout under Proposed Infrastructure. This section supersedes it as the operating standard.