Migrate from Cloudflare to Azion

A platform migration usually begins long before the first configuration file is changed. It starts when a team notices that its current environment no longer gives the same level of clarity, speed, or control it once did.

Maybe deployments still work, but the process requires too much manual coordination. Maybe the application has grown beyond the original architecture. Maybe the team needs stronger compliance alignment, more predictable runtime behavior, or a more unified way to manage compute, storage, databases, delivery, and security.

For teams currently using Cloudflare Pages, Workers, Workers KV, R2, D1, redirects, custom headers, DNS, WAF, logs, or analytics, Azion provides equivalent capabilities through Applications, Functions, KV Store, Object Storage, SQL Database, Rules Engine, Edge DNS, Web Application Firewall, Real-Time Events, and Real-Time Metrics.

The strongest reason to migrate is not simply to replace one vendor with another. It is to modernize your application platform without restarting your architecture from zero.

How Cloudflare to Azion Migration Works

Traditional platform migrations often require rewriting application logic, reconfiguring infrastructure from scratch, and managing multiple disconnected services. This approach creates operational risk, extends timelines, and fragments team knowledge across different configuration patterns.

Stack Migration Path

The Azion migration approach preserves your application logic while transitioning to a unified platform:

  1. Incremental migration path. Start with a single project, validate each layer independently, and expand with confidence. No need to migrate everything at once.

  2. Preserved application logic. Functions, redirects, headers, and data services map directly to Azion equivalents with minimal code changes—primarily syntax updates for environment access and service imports.

  3. Unified platform model. Instead of managing compute, storage, databases, security, and observability as disconnected layers, Azion brings these capabilities together with consistent APIs and configuration patterns.

Feature Mapping

The following table provides a comprehensive mapping of Cloudflare products to their Azion equivalents. A dash (-) indicates that Azion does not currently offer a direct equivalent.

Cloudflare ProductDescriptionAzion Equivalent Product(s)
AgentsBuild AI-powered agents on Cloudflare’s developer platform.AI Inference + Functions
AI Crawl ControlAnalyze and control AI crawler access to your site.Firewall + Network Shield + Functions
AI GatewayObserve, cache, rate limit, and control AI application traffic.Functions + Cache + Real-Time Events + Data Stream
AI SearchManaged retrieval and search pipelines for AI applications.SQL Database + AI Inference
AnalyticsAnalytics products and observability across Cloudflare services.Real-Time Metrics + Real-Time Events + Data Stream + Edge Pulse
API ShieldProtect APIs with discovery, schema validation, mTLS, and controls.Firewall + Web Application Firewall + Network Shield + Certificate Manager
BotsDetect, manage, and mitigate automated/bot traffic.Bot Manager + Bot Manager Lite
CacheConfigure Cloudflare CDN caching behavior.Cache + Tiered Cache
Cloudflare for PlatformsBuild platforms on top of Cloudflare services.Console Kit + Azion API + Marketplace
Cloudflare ImagesStore, resize, optimize, and deliver images.Image Processor
Cloudflare Network FirewallFirewall-as-a-service for network traffic.Firewall + Network Shield
D1Serverless SQL database built on SQLite.SQL Database
DDoS ProtectionProtect applications and networks from DDoS attacks.DDoS Protection + DDoS Mitigation
Digital Experience MonitoringMonitor user, device, network, and application experience.Edge Pulse + Real-Time Metrics
DNSAuthoritative DNS management and DNS security.Edge DNS
Dynamic WorkersSpin up isolated Workers on demand for code execution.Functions
KVGlobal, low-latency key-value storage.KV Store
Load BalancingDistribute traffic across origins with health checks and steering.Load Balancer + Edge DNS
LogsExport, query, and manage Cloudflare logs.Real-Time Events + Data Stream
Origin RulesRewrite origin settings and route requests to origins.Applications + Load Balancer
PagesDeploy frontend and full-stack applications.Applications + Azion CLI
R2S3-compatible object storage with no egress fees.Object Storage
Rate limitingProtect applications by limiting request rates.Firewall + Functions
RulesRuleset engine for request, routing, cache, transform, and security logic.Applications + Firewall + Functions
Secrets StoreManage secrets for Cloudflare developer workloads.Variables
Smart ShieldShield and optimize origin access patterns.Cache + Tiered Cache + Application Accelerator
SSL/TLSManage certificates, encryption modes, and TLS settings.Certificate Manager + Edge DNS
TerraformManage Cloudflare resources with Terraform.Terraform Provider
Transform RulesModify requests and responses at Cloudflare’s edge.Applications + Rules Engine + Functions
VectorizeVector database for embeddings and semantic search.SQL Database
WAFWeb Application Firewall rules and protections.Web Application Firewall
WorkersServerless compute on Cloudflare’s global network.Functions
Workers AIRun AI inference on Cloudflare’s GPU-backed infrastructure.AI Inference

¹ Orchestrator includes Edge Services and Edge Node as integrated modules for orchestrating containerized workloads on private edge infrastructure.

² Functions can be instantiated within Firewall to transform requests and responses at the edge.

Migration Strategy

The migration is organized around Azion’s four product categories, allowing teams to plan and execute each layer independently:

  • Build: deploy applications, configure builds and environment variables, migrate Functions, routing, headers, load balancing, cache, image optimization, and AI workloads.
  • Secure: migrate custom domains, DNS, SSL/TLS certificates, WAF, DDoS protection, bot management, and rate limiting.
  • Store: migrate key-value data, object storage, and SQL databases.
  • Observe: migrate analytics, metrics, and logs to Azion’s real-time observability stack.

Build

The Build category covers application deployment, compute, routing, and configuration. Start here to bring your application onto Azion and establish the foundation for the rest of the migration.

1. Project Setup on Azion

The first step brings your application into Azion in a way that feels familiar to teams that deploy modern web projects. If you have used Cloudflare Pages, you already understand the pattern: connect a repository, define framework settings, run a build, deploy the output, and validate the generated URL.

Azion follows a similar workflow but with a broader platform context. Your project becomes part of an environment where application delivery, Functions, rules, security, and observability can be managed together.

Key Differences

AspectCloudflareAzion
Config filewrangler.toml (TOML)azion.config.js (JavaScript)
Framework detection15+ frameworks20+ frameworks with auto-detection
Cold startsPossibleMinimized
ComplianceSOC 2, ISO 27001PCI DSS 4.0.1 Level 1, SOC 2 Type II

Connect Your Repository

  1. Open Azion Console.
  2. Click + Create > Import from GitHub.
  3. Authorize the Azion GitHub App.
  4. Select the repository you want to migrate.

Configure Your Build

Azion auto-detects your framework and configures build settings. Override the detected preset in azion.config.js:

import { defineConfig } from 'azion'
export default defineConfig({
name: 'my-project',
preset: 'nextjs', // Override auto-detection if needed
})

Deploy and Verify

Deploy from the Azion Console or CLI. Your temporary Azion URL follows this pattern:

https://xxxxxxxxxx.map.azionedge.net/

Validate the deployment:

Terminal window
curl https://xxxxxxxxxx.map.azionedge.net/

Reference documentation

2. Converting Build Configuration

A migration can appear successful when the build passes but fail later when runtime behavior differs. Review build and deployment configuration carefully instead of treating it as a mechanical command replacement.

CLI Quick Reference

TaskCloudflareAzion
Installnpm i -D wrangler@latestcurl -fsSL https://cli.azion.app/install.sh | bash
Loginnpx wrangler loginazion login
Local devnpx wrangler pages dev ./distazion dev
Deploynpx wrangler pages deploy ./distazion deploy

Reference documentation

3. Migrating Environment Variables

Environment variables contain API keys, database credentials, authentication secrets, service endpoints, feature flags, and environment-specific configuration. Migrating them incorrectly causes runtime failures even when deployment succeeds.

Key Differences

AspectCloudflareAzion
Accessenv.VARIABLEAzion.env.get('VARIABLE')
Parametersfetch(request, env, ctx)fetch(request)

Evaluate Your Variables

Before changing code, identify every variable in:

  • Cloudflare Pages: Dashboard > Settings > Environment variables
  • Cloudflare Workers: wrangler.toml
  • CLI-managed secrets
  • CI/CD environment settings
  • Runtime configuration in source code

Create Variables in Azion

  1. Access Azion Console.
  2. Navigate to Build > Variables.
  3. Click Add Variable.
  4. Enter the variable name and value.
  5. Click Save.

Update Your Code

// Before: Cloudflare
const apiKey = env.API_KEY;
// After: Azion
const apiKey = Azion.env.get('API_KEY');

Reference documentation

4. Migrating Rewrite and Redirect URLs

Redirects protect years of SEO value, campaign links, backlinks, bookmarks, and user expectations. When redirects break, the impact shows up as lost traffic, lower rankings, and poor user experience.

Key Differences

AspectCloudflareAzion
Configuration_redirects fileRules Engine (Console or API)
Pattern matchingGlob patterns (/*)Regex (^/.*$)
Capture groups:splat, :placeholder%{capture[1]}, %{capture[2]}

Pattern Conversion

Cloudflare PatternAzion Regex
/old-page^/old-page$
/blog/*^/blog/(.*)$
:splat%{capture[1]}

Create Redirect Rules

Navigate to Rules Engine and configure:

Criteria:

${uri} matches ^/old-blog/(.*)$

Behavior:

Redirect To (301): /blog/%{capture[1]}

Verify Redirects

Terminal window
curl -I https://yourdomain.com/old-blog/post

Reference documentation

5. Migrating Custom Headers

HTTP headers control caching, security, and browser behavior. Azion gives teams a more flexible model through azion.config.js and Rules Engine, allowing rules that respond to request characteristics.

Key Differences

AspectCloudflareAzion
Config file_headers (text)azion.config.js (JavaScript)
PhasesResponse onlyRequest and response
Dynamic valuesNot supported${uri}, ${host}, ${geoip_city_country_code}

Example: Security Headers

import type { AzionConfig } from 'azion/config';
const config: AzionConfig = {
applications: [{
name: 'my-app',
rules: {
response: [{
name: 'Security Headers',
active: true,
criteria: [{
variable: 'uri',
conditional: 'if',
operator: 'starts_with',
argument: '/'
}],
behavior: {
addResponseHeader: [
'X-Frame-Options: SAMEORIGIN',
'X-Content-Type-Options: nosniff'
]
}
}]
}
}]
};
export default config;

Reference documentation

6. Migrating Workers to Functions

Functions are the computational engine of modern distributed applications. They often contain the most business-critical logic: authentication, personalization, API orchestration, and integrations with third-party systems.

Key Differences

AspectCloudflare WorkersAzion Functions
Function signaturefetch(request, env, ctx)fetch(request, env, ctx)
Environment accessenv.VARIABLEAzion.env.get('VARIABLE')
Memory128 MB (all plans)512 MB (all plans)
Cold startsPossiblePossible (minimized with node distribution)

Update Function Signature

// Before: Cloudflare
export default {
async fetch(request, env, ctx) {
const apiKey = env.API_KEY;
return fetch(apiUrl, { headers: { 'Authorization': `Bearer ${apiKey}` }});
}
};
// After: Azion
export default {
async fetch(request, env, ctx) {
const apiKey = Azion.env.get('API_KEY');
return fetch(apiUrl, { headers: { 'Authorization': `Bearer ${apiKey}` }});
}
};

Update Geo Metadata

// Before: Cloudflare
const country = request.cf.country;
// After: Azion
const country = request.metadata['geoip_country_code'];

Update Service Imports

Azion provides two SQL interfaces:

  • Runtime API (azion:sql) — for querying databases from Functions
  • Azion Lib SDK (azion/sql) — for managing databases via API (build tools, scripts)
import { Database } from 'azion:sql';
// Open connection (async)
const db = await Database.open('my-database');
// Query and iterate results
const rows = await db.query('SELECT * FROM users');
let row = await rows.next();
while (row) {
const name = row.getString(0); // access column by index
console.log(name);
row = await rows.next();
}

Reference documentation

7. Migrating Load Balancing

Load balancing distributes traffic across multiple origins for high availability and performance. Azion Load Balancer provides health checks, steering policies, and origin failover.

Key Differences

AspectCloudflare Load BalancingAzion Load Balancer
Health checksHTTP, HTTPS, TCPHTTP, HTTPS, TCP
Steering policiesRound-robin, Least connections, Random, GeoRound-robin, Least connections, Geo
FailoverActive-passive, Active-activeActive-passive, Active-active
Session affinityCookie, IP hashCookie, IP hash
Origins per poolMultiple originsMultiple origins

Configuration Steps

  1. Access Azion Console.
  2. Go to Products menu > Load Balancer.
  3. Create an Connector for each origin server.
  4. Configure health checks for each origin.
  5. Create a Load Balancer instance.
  6. Add origins to the load balancer pool.
  7. Configure steering policy (round-robin, geo, etc.).
  8. Set origin weights if using weighted distribution.
  9. Enable session affinity if needed.

Load Balancer Module Configuration

// Load balancer settings within address modules
{
"weight": 3, // Relative weight for weighted distribution
"method": "round_robin", // Options: "round_robin", "least_conn", "ip_hash"
"max_retries": 3, // Maximum retry attempts
"connection_timeout": 10, // Connection timeout in seconds
"read_write_timeout": 30 // Read/write timeout in seconds
}

Reference documentation

8. Migrating Cache Configuration

Caching configuration determines how content is stored and served from distributed locations. Azion Cache provides fine-grained control over cache behavior with Tiered Cache support.

Key Differences

AspectCloudflare CacheAzion Cache
Cache levelsRegional Tiered Cache + Smart Tiered Cache + Edge + BrowserCache + Tiered Cache + Browser
Cache keyCustomizableCustomizable via Rules Engine
PurgeURL, Tag, Host, PrefixURL, Cache Key, Wildcard
Stale contentStale-while-revalidateStale-while-revalidate
TTL limitsPer-page rulesPer-rule configuration

Cache Settings Migration

  1. Access Azion Console.
  2. Edit your Application.
  3. Navigate to Cache Settings.
  4. Configure default cache TTL.
  5. Enable Tiered Cache for improved hit ratio.
  6. Add custom cache rules via Rules Engine.

Tiered Cache

Enable Tiered Cache to improve cache hit ratio:

// Tiered cache is configured within cache settings modules
{
"name": "my-cache-setting",
"modules": {
"tiered_cache": {
"enabled": true
}
}
}

Cache Key Customization

Cache key customization uses Advanced Cache Key in Cache Settings combined with Adaptive Delivery for device-based variations:

Example: Vary cache by device group

  1. In Cache Settings, enable Adaptive Delivery
  2. Select “Content varies by some Device Groups (Whitelist)“
  3. Choose device groups (e.g., Mobile, Desktop)
  4. Apply via Rules Engine:
Criteria: ${uri} starts with /images/
Behavior: Set Cache Policy → [cache-setting-name]

Cache Purge

Terminal window
# Purge by URL
curl -X POST 'https://api.azion.com/v4/workspace/purge/url' --header 'Authorization: Token YOUR_TOKEN' --header 'Content-Type: application/json' --data '{
"items": [
"https://example.com/image.jpg",
"https://example.com/styles.css"
],
"layer": "cache"
}'
# Purge by wildcard
curl -X POST 'https://api.azion.com/v4/workspace/purge/wildcard' --header 'Authorization: Token YOUR_TOKEN' --header 'Content-Type: application/json' --data '{
"items": ["https://example.com/images/*"],
"layer": "cache"
}'

Reference documentation

9. Migrating Image Optimization

Image optimization reduces image file sizes while maintaining visual quality. Azion Image Processor transforms, optimizes, and delivers images from distributed node locations.

Key Differences

AspectCloudflare ImagesAzion Image Processor
StorageBuilt-in storageObject Storage integration
TransformationsResize, format, qualityResize, format, quality, crop, rotate
URL format/cdn-cgi/image/<OPTIONS>/<SOURCE-IMAGE>/image.png?ims=<OPTIONS>
Format supportWebP, AVIFWebP, AVIF, JPEG, PNG
Signed URLsSupportedSupported via Secure Token

Configuration Steps

  1. Access Azion Console.
  2. Edit your Application.
  3. Navigate to Image Processor settings.
  4. Enable Image Processor.
  5. Configure default quality and format settings.
  6. Set up Object Storage as image source (optional).

URL Format

Transform images via query string parameters:

# Cloudflare format
https://example.com/cdn-cgi/image/width=400,quality=85/image.jpg
# Azion format
https://example.com/image.jpg?ims=400x400

Transformation Parameters

Azion Image Processor uses the ims query parameter for transformations:

SyntaxDescriptionExample
?ims=WxHResize to width x height?ims=400x300
?ims=WxResize to width (auto height)?ims=400x
?ims=xHResize to height (auto width)?ims=x300
?ims=WxH:fillCrop to exact dimensions?ims=400x300:fill
?ims=WxH:fitFit within dimensions?ims=400x300:fit

Reference documentation

10. Migrating AI Workloads (Workers AI to AI Inference)

AI inference enables low-latency AI-powered features in applications. Azion AI Inference provides GPU-backed inference for text and visual models, allowing you to run AI workloads close to your users.

Key Differences

AspectCloudflare Workers AIAzion AI Inference
Model hostingCloudflare-hosted modelsCustom model deployment
Inference APIREST APIREST API + Functions
Model typesText generation, image, speechCustom models, LLMs
GPU supportShared GPUDedicated GPU instances

Using AI Inference

  1. Access Azion Console.
  2. Go to AI Inference (via Marketplace or Functions).
  3. Deploy a model or use pre-built templates.
  4. Configure inference endpoint.
  5. Integrate with your application via Functions.

AI Starter Kit

Use the AI Inference Starter Kit template:

Terminal window
# Deploy via CLI
azion deploy --template ai-inference-starter-kit

Reference documentation

Secure

The Secure category covers domains, DNS, certificates, firewall rules, and protection against malicious traffic. Plan these migrations as controlled cutovers, since they affect how users reach your application and how it is protected in production.

1. Migrating Custom Domains

Custom domain migration is one of the most sensitive parts of any platform transition. It affects users, SEO, brand trust, and production availability. Plan domain migration as a controlled cutover, not a last-minute DNS change.

Migration Strategies

StrategyBest ForDNS Control
CNAMEQuick subdomain migrationKeep your DNS provider
NameserverFull DNS control and apex domainsTransfer DNS to Azion

Create the Certificate

Create your SSL/TLS certificate before pointing your domain to Azion. This ensures users can access the application securely over HTTPS when the domain starts resolving to the new infrastructure.

Azion provides free Let’s Encrypt certificates with automatic renewal.

Configure the Domain

Create a workload in Azion Console and associate your custom domain. See Workloads Documentation.

Point the Domain to Azion

Point the subdomain to the Azion-generated domain:

www CNAME xxxxxxxxxx.map.azionedge.net

This keeps your current DNS provider while routing traffic through Azion.

Verify Propagation

Terminal window
dig www.yourdomain.com CNAME +short

Reference documentation

2. Migrating DNS to Edge DNS

DNS configuration is foundational to application delivery. Migrating DNS requires careful planning to avoid downtime during the nameserver switch.

Key Differences

AspectCloudflare DNSAzion Edge DNS
NameserversAssigned per zonens1.aziondns.net, ns2.aziondns.com, ns3.aziondns.org
Record typesA, AAAA, CNAME, MX, TXT, SRV, NS, etc.A, AAAA, CNAME, MX, TXT, SRV, NS, CAA, PTR
DNSSECSupportedSupported
APIREST APIREST API v4
AnycastGlobal AnycastGlobal Anycast

Migration Steps

  1. Access Azion Console.
  2. Go to Products menu > Edge DNS.
  3. Click + Zone to create a new DNS zone.
  4. Enter your domain name.
  5. Add DNS records matching your Cloudflare configuration.
  6. Note the Azion nameservers assigned to your zone.
  7. Update nameservers at your domain registrar.

Record Type Mapping

Cloudflare RecordAzion Edge DNSNotes
AADirect IP mapping
AAAAAAAAIPv6 address
CNAMECNAMEAlias to another domain
MXMXMail exchange (include priority)
TXTTXTText records (SPF, DKIM)
SRVSRVService records
CAACAACertificate Authority Authorization
NSNSNameserver delegation

DNSSEC Configuration

To enable DNSSEC:

  1. Navigate to your zone in Edge DNS.
  2. Go to DNSSEC tab.
  3. Enable DNSSEC.
  4. Copy the DS record to your registrar.
Terminal window
# Verify DNSSEC
dig example.com DNSSEC +dnssec

Verify Propagation

Terminal window
# Check nameserver propagation
dig example.com NS +short
# Check specific record
dig www.example.com A +short
# Check from specific DNS server
dig @ns1.aziondns.net example.com A

Reference documentation

3. Migrating SSL/TLS to Certificate Manager

SSL/TLS certificates ensure secure communication between clients and your application. Azion provides automatic certificate provisioning and supports custom certificates.

Key Differences

AreaCloudflare SSL/TLSAzion Certificate Manager
Product scopeBroader SSL/TLS suite covering edge certificates, origin certificates, encryption modes, mTLS, custom TLS settings, and related controls.Focused on managing TLS certificates and associating them with Azion Domains or Workloads.
Main certificate optionsUniversal SSL, Advanced certificates, and Custom certificates.Azion SAN, Custom certificate, Let’s Encrypt certificate, and Trusted CA for mTLS.
Default managed certificateUniversal SSL automatically covers the apex domain and first-level subdomains.Let’s Encrypt is the main managed option for customer-owned custom domains. Azion SAN applies to Azion-provided azionedge.net addresses.
Advanced managed certificatesAdvanced certificates allow more control, such as CA, hostnames, and validity period.Azion does not position an equivalent “Advanced Certificate Manager” layer in the same way; use Let’s Encrypt for managed DV or Custom certificate for full control.
Custom certificatesSupported for customers who want their own certificate, CA control, OV, or EV. Customer handles issuance and renewal.Supported by uploading a TLS certificate and private key. Azion accepts single-domain or SAN certificates.
ValidationCloudflare uses Domain Control Validation; with Cloudflare DNS it can happen automatically, while external DNS may require manual DCV.Let’s Encrypt validation supports DNS-01 and HTTP-01 challenges.
RenewalUniversal SSL and Advanced certificates are managed by Cloudflare; uploaded Custom certificates are not renewed by Cloudflare.Let’s Encrypt certificates are automatically renewed by Azion before expiration; custom certificates depend on the customer lifecycle.
Origin encryption modelCloudflare explicitly manages the visitor-to-Cloudflare and Cloudflare-to-origin model through SSL/TLS encryption modes such as Full and Full Strict.Azion Certificate Manager focuses on certificates for HTTPS traffic on Azion; origin/TLS behavior is configured through the broader application/workload setup, not as a Cloudflare-style SSL mode model.
Origin CACloudflare has Origin CA certificates for encrypting traffic between Cloudflare and the origin when traffic is proxied through Cloudflare.No direct equivalent should be described as “Origin CA”; use custom certificates or origin/application configuration depending on the architecture.
mTLSCloudflare supports client certificates and BYOCA for mTLS, plus Authenticated Origin Pulls for Cloudflare-to-origin authentication.Azion supports mTLS through Trusted CA certificates; Azion SAN certificates do not support mTLS.

Automatic Certificate Provisioning

Azion automatically provisions Let’s Encrypt certificates for custom domains:

  1. Access Azion Console.
  2. Create or edit a Workload.
  3. Add your custom domain.
  4. Azion automatically provisions a Let’s Encrypt certificate.
  5. Verify domain ownership (if required).
  6. Wait for certificate activation (typically 5-15 minutes).

Custom Certificate Upload

For organizations with existing certificates:

  1. Go to Products menu > Certificate Manager.
  2. Click + Certificate.
  3. Select Custom Certificate.
  4. Upload your certificate (PEM format).
  5. Upload your private key.
  6. Upload intermediate CA chain (if applicable).
  7. Associate the certificate with your workload.

mTLS Configuration

For mutual TLS authentication:

  1. Navigate to Certificate Manager.
  2. Upload your CA certificate as a Trusted CA.
  3. Configure your workload to require client certificates.
  4. See the mTLS configuration guide for detailed steps.

Reference documentation

4. Migrating WAF to Web Application Firewall

Web Application Firewall protects applications from malicious traffic, SQL injection, cross-site scripting (XSS), and other application-layer attacks. Migrating WAF rules requires careful mapping of rule logic and understanding differences in rule construction.

Key Differences

AspectCloudflare WAFAzion WAF
Rule languageExpression languageRules Engine criteria
Managed rulesetsCloudflare-managed rulesAzion-managed rulesets
Custom rulesFirewall RulesRules Engine for Firewall
OWASP coverageOWASP Core Rule SetOWASP Top 10 coverage
Mode optionsBlock, Challenge, LogLearning, Blocking

Migration Steps

  1. Access Azion Console.
  2. Go to Products menu > Firewall.
  3. Select or create a Firewall instance.
  4. Navigate to WAF tab.
  5. Enable desired managed rulesets (SQL Injection, XSS, etc.).
  6. Configure sensitivity level per ruleset.
  7. Create custom rules in Rules Engine tab.
  8. Associate the Firewall with your application.

Rule Migration Example

Convert Cloudflare firewall rule to Azion Rules Engine:

Cloudflare expression:

(http.request.uri.path contains "/admin" and not ip.src in {10.0.0.0/8})

Azion criteria:

Variable: ${uri}
Operator: matches
Argument: /admin
AND
Variable: ${remote_addr}
Operator: does not match
Argument: 10.0.0.0/8

Reference documentation

5. Migrating DDoS Protection

DDoS protection guards against volumetric attacks, protocol attacks, and application layer attacks. Azion provides automatic DDoS mitigation with no configuration required for most attack types.

Key Differences

AspectCloudflare DDoSAzion DDoS Protection
ActivationAutomaticAutomatic
Layer coverageL3, L4, L7L3, L4, L7
BillingUnmetered (standard)Unmetered
CustomizationManaged rules + customManaged rules + Rules Engine

Automatic Protection

Azion DDoS Protection activates automatically for all applications. No manual configuration is required for standard protection against:

  • Volumetric attacks (UDP floods, ICMP floods)
  • Protocol attacks (SYN floods, packet fragmentation)
  • Application layer attacks (HTTP floods, slowloris)

Advanced Configuration

For applications requiring specific DDoS policies:

  1. Access Azion Console.
  2. Go to Products menu > Firewall.
  3. Select your Firewall instance.
  4. Navigate to DDoS Protection tab.
  5. Configure threshold settings.
  6. Enable/disable specific mitigation rules.
  7. Set up alert notifications.

Network Shield

For network-layer protection, use Azion Network Shield:

  • Provides L3/L4 DDoS protection
  • Works with Edge DNS for traffic filtering
  • Integrates with Firewall for unified security

Reference documentation

6. Migrating Bot Management

Bot management protects applications from automated threats while allowing legitimate bots. Azion Bot Manager provides detection, challenge, and mitigation capabilities.

Key Differences

AspectCloudflare BotsAzion Bot Manager
DetectionMachine learning, heuristics, fingerprinting, JavaScript DetectionsMachine learning, behavioral analysis, fingerprinting, Reputation Intelligence
ChallengeJavaScript Detections, Managed Challenge, TurnstileJavaScript injection (fingerprinting), ALTCHA (via redirect)
ActionsAllow, Managed Challenge, BlockAllow, Deny, Drop, Redirect, Custom HTML, Random Delay, Hold Connection
Lite versionBot Fight ModeBot Manager Lite (Marketplace)

Bot Manager Lite (Marketplace)

For basic bot protection, install Bot Manager Lite from Azion Marketplace:

  1. Access Azion Console.
  2. Go to Marketplace.
  3. Search for Bot Manager Lite.
  4. Click Install.
  5. Configure detection sensitivity.
  6. Set up response actions (challenge, block).
  7. Associate with your Firewall instance.

Custom Bot Rules

Create custom rules to handle specific bots:

Criteria: ${user_agent} contains "BadBot"
Behavior: Deny (403)
Criteria: ${user_agent} contains "Googlebot"
Behavior: Allow

Verification

Terminal window
# Test bot detection
curl -A "BadBot/1.0" https://yourdomain.com/
# Expected: 403 Forbidden or challenge page
curl -A "Mozilla/5.0" https://yourdomain.com/
# Expected: Normal response

Reference documentation

7. Migrating Rate Limiting

Rate limiting protects applications from abuse by limiting request rates per client. Azion provides rate limiting through Firewall rules and Functions.

Key Differences

AspectCloudflare Rate LimitingAzion Rate Limiting
ConfigurationDedicated rate limiting rulesFirewall rules + Functions
GranularityPath, method, countryPath, method, IP, custom
ActionsBlock, Challenge, LogBlock, Log
Window10 seconds to 1 hourCustomizable

Firewall-Based Rate Limiting

Configure rate limiting in Firewall Rules Engine:

  1. Access Azion Console.
  2. Go to Firewall > Rules Engine.
  3. Create a new rule.
  4. Set criteria (path, method, etc.).
  5. Add Rate Limit behavior.
  6. Configure requests per second/minute.
  7. Set action (Block, Log).

Reference documentation

Store

The Store category covers data services. Migrate key-value, object, and SQL data with attention to consistency, access patterns, and application compatibility.

1. Migrating Workers KV with KV Store

Key-value storage is used for fast access to configuration, user preferences, session metadata, feature flags, and personalization data. The migration should preserve data consistency and application compatibility.

API Comparison

// Before: Cloudflare
await env.MY_KV_NAMESPACE.put('key1', 'value1');
const value = await env.MY_KV_NAMESPACE.get('key1');
// After: Azion
import { KVStore } from 'azion:kv';
const kv = new KVStore('my-store');
await kv.put('key1', 'value1');
const value = await kv.get('key1');

Export and Import

Export existing KV data through Cloudflare’s API. Before importing, review:

  • Key naming conventions and prefixes
  • Expiration logic
  • Value formats and serialized object structure
  • Missing-key and default value behavior

Reference documentation

2. Migrating R2 with Object Storage

Object storage powers files that matter to users and business operations: images, documents, static assets, media files, uploads, and generated content.

Key Differences

AspectCloudflare R2Azion Object Storage
Endpoint<ACCOUNT_ID>.r2.cloudflarestorage.coms3.us-east-005.azionstorage.net
Regionautous-east-005
Data transfer outFreeZero cost

Update Configuration

import { S3Client } from '@aws-sdk/client-s3';
const client = new S3Client({
region: 'us-east-005',
endpoint: 'https://s3.us-east-005.azionstorage.net',
credentials: {
accessKeyId: Azion.env.get('AZION_ACCESS_KEY'),
secretAccessKey: Azion.env.get('AZION_SECRET_KEY')
}
});

Migrate Data with s3cmd

s3cmd is a command-line tool for managing S3-compatible storage services. It’s an effective option for migrating data from Cloudflare R2 to Azion Object Storage.

  1. Install s3cmd and run s3cmd --configure to set up your Azion credentials:
  • Access Key / Secret Key: Enter the keys generated for Azion Object Storage.
  • Default Region: us-east-005 (s3cmd also accepts us-east for interactive configuration).
  • S3 Endpoint: s3.us-east-005.azionstorage.net.
  • DNS template: %(bucket).s3.us-east-005.azionstorage.net.
  • Use HTTPS protocol: true.
  1. Use the following commands to migrate your data:
CommandDescription
s3cmd lsLists all buckets.
s3cmd put file.png s3://my-bucket/Uploads an object.
s3cmd get s3://my-bucket/file.pngDownloads an object.
s3cmd sync s3://source-bucket/ s3://dest-bucket/Syncs between buckets.

Reference documentation

3. Migrating D1 with SQL Database

Database migration touches the core of application state. Azion SQL Database is SQLite-compatible, ACID-compliant, and uses a distributed Main/Replicas architecture.

Key Differences

AspectCloudflare D1Azion SQL Database
Connectionenv.DB bindingnew Database('name')
SQL dialectSQLiteSQLite
Vector searchSupportedSupported

Update Your Code

// Before: Cloudflare
const result = await env.DB
.prepare('SELECT * FROM users WHERE id = ?')
.bind(1)
.first();
// After: Azion
import { Database } from 'azion:sql';
const db = new Database('my-database');
const result = await db
.prepare('SELECT * FROM users WHERE id = ?')
.bind(1)
.first();

Export and Import

Terminal window
# Export from D1
wrangler d1 export my-db --output=dump.sql
# Import to Azion (via SQL Shell CLI or migration workflow)

Reference documentation

Observe

The Observe category covers analytics, metrics, and logs. Migrating observability ensures you keep production visibility, troubleshooting capabilities, and compliance reporting after the cutover.

1. Migrating Analytics to Real-Time Metrics

Analytics provide visibility into application performance, traffic patterns, and user behavior. Azion offers comprehensive observability through Real-Time Metrics, Real-Time Events, and GraphQL API.

Key Differences

AspectCloudflare AnalyticsAzion Real-Time Metrics
Data freshnessNear real-timeNear real-time (up to 10 minutes)
Retention30 days (free), 1 year (paid)2 years
Query methodDashboard, APIDashboard, GraphQL API
MetricsRequests, bandwidth, errorsRequests, bandwidth, errors, latency, cache
GranularityPer-minute aggregatesAdaptive intervals (minute/hour/day)

Available Metrics

Azion Real-Time Metrics tracks:

  • Request metrics: Total requests, requests by status code, requests by HTTP method
  • Performance metrics: Response time, upstream header time (equivalent to TTFB), origin response time
  • Bandwidth metrics: Data transferred, data saved by cache
  • Cache metrics: Hit ratio, miss ratio, expired objects
  • Error metrics: 4xx errors, 5xx errors, origin errors
  1. Access Azion Console.
  2. Go to Products menu > Real-Time Metrics.
  3. Select your application or workload.
  4. Configure time range and filters.
  5. Export data if needed.

Reference documentation

2. Migrating Logs to Real-Time Events

Log data is essential for debugging, security analysis, and compliance. Real-Time Events provides immediate log access through Console or GraphQL API for real-time troubleshooting and investigation.

Key Differences

AspectCloudflare LogsAzion Real-Time Events
Access methodPull API, Push to S3Real-time query via Console or GraphQL API
LatencyMinutesSeconds
RetentionConfigurableConfigurable
FormatJSONJSON, customizable
Query interfaceAPIConsole + GraphQL API

Access Real-Time Events

  1. Access Azion Console.
  2. Go to Products menu > Real-Time Events.
  3. Select the dataset (HTTP Requests, WAF, etc.).
  4. Configure time range and filters.
  5. Click Search to query logs.
  6. Click any row to see detailed log information.

Reference documentation

3. Migrating Logs to Data Stream

Data Stream exports logs continuously to external destinations for long-term storage, analysis, and integration with external monitoring and security systems.

Key Differences

AspectCloudflare LogsAzion Data Stream
Access methodPull API, Push to S3Push to 10+ destinations
LatencyMinutesSeconds
RetentionConfigurableConfigurable (via destination)
FormatJSONJSON, customizable
DestinationsS3, Azure, GCSS3, Azure Blob, Datadog, Splunk, Kafka, BigQuery, and more

Configure Data Stream

  1. Access Azion Console.
  2. Go to Products menu > Data Stream.
  3. Click + Stream.
  4. Configure the source (Applications, WAF, etc.).
  5. Select or create a template for log format.
  6. Choose destination (S3, Datadog, Splunk, etc.).
  7. Configure destination credentials.
  8. Activate the stream.

Supported Destinations

Data Stream supports 10+ destinations:

  • Cloud Storage: Amazon S3, Azure Blob Storage, Azion Object Storage
  • Monitoring: Datadog, Splunk, Elasticsearch, Azure Monitor
  • Streaming: AWS Kinesis Data Firehose, Apache Kafka
  • Analytics: Google BigQuery
  • Security: IBM QRadar
  • Custom: HTTP Webhook, Standard HTTP/HTTPS POST

Reference documentation

Troubleshooting

Common Issues

IssueSolution
Build fails on AzionCheck framework preset matches your project; verify build command in azion.config.js
Environment variables not foundConfirm variables created in Azion Console; check code uses Azion.env.get() syntax
Redirects not workingVerify regex patterns are correct; check Rules Engine criteria syntax
Functions return errorsUpdate function signature to fetch(request); verify Azion.env.get() for variables
KV data missingRe-export from Cloudflare; verify import completed without errors
Object Storage access deniedCheck S3 credentials are correct; verify endpoint is s3.azionstorage.net
Database queries failConfirm schema imported correctly; verify new Database('name') syntax
DNS not resolvingCheck CNAME or nameserver configuration; allow time for propagation
Certificate not activeVerify domain ownership; check certificate provisioning status

Key Advantages After Migration

Migrating from Cloudflare to Azion is straightforward for most modern applications, especially those using Workers, KV, R2, or D1. The immediate goal of migration is continuity—your application should keep working, users should keep accessing the same experiences, and critical business flows should remain stable.

But the larger value comes after the migration, when the team starts operating on a more unified platform.

AreaAdvantage after migrationWhat it means in practice
Migration strategyIncremental migration pathTeams can migrate one layer at a time: application, domains, functions, storage, database, security, and observability.
Platform modelUnified application platformBuild, Secure, Store, and Observe capabilities are managed through a more connected platform model.
BuildModern application deploymentApplications can be deployed from GitHub or CLI, with framework detection and Azion configuration.
BuildServerless compute with zero cold startsFunctions are designed for consistent first-request performance on Azion’s distributed infrastructure.
BuildRules-based application controlRules Engine can manage redirects, rewrites, headers, cache behavior, routing, and request/response logic.
BuildIntegrated cache and accelerationCache, Tiered Cache, and Application Accelerator can be configured as part of the application delivery layer.
BuildImage optimization at delivery timeImage Processor can transform and optimize images through URL parameters and application configuration.
SecureControlled domain and DNS cutoverCustom domains, Edge DNS, certificates, and workloads can be prepared before switching production traffic.
SecureManaged HTTPS optionsCertificate Manager supports Let’s Encrypt, custom certificates, Azion SAN, and Trusted CA for mTLS scenarios.
SecureUnmetered DDoS protectionAzion DDoS Protection is automatically enabled and unmetered across accounts.
SecureIntegrated application securityWAF, Bot Manager, Network Shield, rate limiting patterns, and Firewall rules can be combined around the workload.
StoreKV for low-latency application dataWorkers KV use cases can be migrated to KV Store for configuration, feature flags, preferences, and lightweight state.
StoreS3-compatible Object StorageR2-style object storage workflows can be migrated using S3-compatible tools, SDKs, and credentials.
StoreZero DTO cost for Object Storage deliveryAzion Object Storage does not charge Data Transfer Out over Azion’s infrastructure.
StoreSQLite-compatible SQL DatabaseD1-style use cases can be mapped to SQL Database with familiar SQL patterns.
StoreVector search for AI use casesSQL Database supports vector search for semantic search, recommendations, and RAG-style applications.
ObserveReal-time metrics for production visibilityReal-Time Metrics provides near real-time monitoring through dashboards and GraphQL API.
ObserveReal-time events for investigationReal-Time Events provides detailed logs for requests, functions, WAF, DNS, image processing, and other data sources.
ObserveData streaming to external toolsLogs can be exported to external destinations for SIEM, analytics, storage, and compliance workflows.
ComplianceCompliance-ready foundationAzion provides a stronger foundation for teams that need security, compliance alignment, and operational control.

With Azion, teams can build and run applications on globally distributed infrastructure while combining compute, delivery, storage, database, security, and observability capabilities in one environment. This reduces the fragmentation that often appears when modern applications depend on many separate services and configuration patterns.

Functions can interact with platform services such as KV Store and SQL Database. Applications can use Rules Engine for routing, redirects, and headers. Object Storage can support static assets, media, and user-generated files. Security capabilities can protect workloads. Real-Time Metrics and Events can give teams visibility into what is happening in production.

For engineering leaders, this means more operational clarity. For developers, it means a more cohesive workflow. For infrastructure and security teams, it means stronger control over how applications are delivered and protected. For the business, it means a platform foundation that can support growth without adding unnecessary complexity to every release cycle.

Next Steps

After your migration is complete:

Get Started with a Small Project

The best way to begin is not with the most complex application in your portfolio. Start with a project that is meaningful enough to validate the migration path, but small enough to move quickly and safely.

Choose an application or workload that includes representative pieces of your architecture: a build process, a few redirects, environment variables, maybe one function, and a manageable amount of data. Use that project to validate the workflow, document the process, and identify internal patterns your team can reuse.

From there, expand gradually. Migrate more complex routes. Move additional functions. Bring over storage and database workloads. Add observability. Review security rules. Then prepare production cutovers with greater confidence.

Need Help?

Get help from the Azion Support team, or join our Discord community to see how others are using Azion.