DDoS Protection

Cloud DDoS protection vs on-server: pros and cons of each approach

August 2, 2026 · 9 min read
Illustration immersive du sujet : cloud DDoS protection

When evaluating cloud DDoS protection versus on-server kernel-level mitigation in 2026, infrastructure teams face a critical architectural choice that shapes both resilience and cost structures. Cloud scrubbing solutions route traffic through upstream filtering nodes, while kernel-layer frameworks like XDP and eBPF process packets directly on the target machine before they reach userspace. Each approach addresses different threat vectors, scales differently, and incurs distinct latency and financial trade-offs that demand careful analysis before deployment.

This article dissects the technical foundations of both models, quantifies their operational characteristics, and provides a decision framework to combine or select the most suitable layer for your infrastructure requirements in 2026.



How Cloud DDoS Protection Works: Upstream Scrubbing Architecture

Cloud-based DDoS mitigation operates by redirecting inbound traffic through a scrubbing center before it reaches your origin server. DNS changes or BGP announcement shifts route packets to a distributed network of filtering nodes, where anomaly detection engines analyze traffic patterns, challenge suspicious sources with JavaScript or CAPTCHA proofs, and forward only legitimate requests to the backend.

Leading implementations employ global anycast networks that absorb multi-terabit volumetric attacks across hundreds of points of presence. When an attack threshold triggers, traffic diverts automatically, and machine-learning classifiers distinguish botnet signatures from organic user behavior. This architecture excels at mitigating reflection amplification floods (DNS, NTP, Memcached) and application-layer HTTP floods that require stateful inspection beyond simple packet filtering.

The primary trade-off is latency: every legitimate packet traverses additional network hops and inspection layers. For latency-sensitive workloads—real-time game servers, financial trading platforms, voice-over-IP services—the added 5–50 milliseconds can degrade user experience. Cost structures typically follow tiered bandwidth commitments or pay-per-attack pricing, which can become prohibitive under sustained campaigns.


Wide-angle photorealistic view of a modern datacenter scrubbing center with rows of network equipment racks illuminated by cyan LED indicators, fiber optic cables organized in overhead trays, and multiple large screens displaying real-time traffic flow diagrams

Another consideration is protocol coverage. Cloud scrubbing centers optimize for HTTP/HTTPS web traffic; protecting arbitrary UDP-based protocols—game servers on non-standard ports, VoIP SIP signaling, custom application protocols—often requires additional configuration or incurs higher costs. Some providers cannot distinguish legitimate high-packet-rate gameplay traffic from volumetric floods without tailored rule sets.



On-Server Kernel Protection: XDP, eBPF, and Nftables

Kernel-layer defenses intercept packets at the earliest possible stage in the Linux network stack. Extended Berkeley Packet Filter (eBPF) programs attach to the eXpress Data Path (XDP) hook, which processes frames immediately after the network interface card driver receives them—before sk_buff allocation, before routing decisions, and microseconds before userspace applications see the traffic.

This architectural position enables sub-microsecond per-packet decisions at line rate. A single XDP program can evaluate protocol headers, source/destination tuples, and packet size, then issue verdict actions (DROP, PASS, REDIRECT) that short-circuit the entire kernel network stack. For volumetric attacks targeting known ports or protocols, XDP can filter millions of packets per second on commodity hardware without CPU saturation.

# Attach XDP program to interface eth0
ip link set dev eth0 xdp obj pakkt_engine.bpf.o sec xdp

# Inspect active BPF map rules
bpftool map dump name pakkt_rules

Complementing XDP's stateless filtering, nftables provides stateful connection tracking, TCP flag validation, and per-connection rate limiting in the PREROUTING and INPUT chains. By organizing rules in an isolated inet pakkt table, operators avoid conflicts with existing iptables-based tools (Docker bridge rules, fail2ban dynamic blocks, iptables-persistent configurations).

# Add stateful TCP SYN rate-limit rule in nftables
nft add rule inet pakkt input tcp dport 25565 ct state new limit rate 50/second accept
nft add rule inet pakkt input tcp dport 25565 ct state new counter drop

On-server protection incurs zero network latency overhead—packets never leave the physical machine. The CPU cost is proportional to attack volume, but XDP's efficiency means that a modern eight-core server can handle several million packets per second before bottlenecking. The limitation is raw bandwidth: if an attacker saturates the server's network uplink (10 Gbps, 25 Gbps, 100 Gbps), packets will drop at the NIC hardware level before XDP sees them.


Close-up photorealistic shot of a Linux terminal displaying nftables ruleset output with glowing cyan text on dark background, Ethernet cables and server rack visible in soft focus behind the screen, professional datacenter lighting

This is where hybrid architectures become critical. On-server kernel filtering excels at protocol-specific attacks, SYN floods within uplink capacity, and application-layer exploits that slip past upstream scrubbing. Cloud DDoS protection handles volumetric terabit-scale floods that exhaust physical bandwidth before reaching the server. The two layers address complementary threat surfaces.



Decision Framework: Choosing the Right Layer for Your Infrastructure

Selecting between cloud scrubbing and kernel-layer protection—or determining how to combine both—depends on five technical factors: attack surface, latency tolerance, protocol requirements, cost constraints, and operational complexity.

Attack Surface and Threat Model

If your infrastructure primarily faces volumetric bandwidth exhaustion attacks exceeding your uplink capacity (100+ Gbps UDP floods, DNS amplification), cloud DDoS protection is mandatory. No on-server solution can process packets that never arrive due to saturated fiber. Conversely, if threats center on application-layer exploits, login brute-force attempts, or protocol-specific floods within your bandwidth envelope, kernel-level filtering provides faster response and lower cost.

Game servers, for example, frequently encounter SYN floods, spoofed query packets, and connection exhaustion attacks in the 1–10 Gbps range—well within modern server uplink capacity. A dual-layer XDP + nftables deployment can drop malicious packets in microseconds without the latency penalty of upstream redirection.

Latency and User Experience

Real-time applications demand predictable, minimal latency. Competitive multiplayer games target sub-50ms round-trip times; adding 20ms of cloud scrubbing overhead degrades player experience and competitive fairness. Financial trading platforms, VoIP services, and industrial control systems similarly cannot tolerate variable latency introduced by scrubbing centers.

For these workloads, on-server kernel protection maintains native network performance. Platforms like PAKKT.io deploy XDP programs that add negligible per-packet overhead—typically under one microsecond—preserving the low-latency characteristics essential for real-time interaction.

Protocol and Port Flexibility

Cloud scrubbing centers optimize for HTTP/HTTPS traffic on ports 80 and 443. Protecting arbitrary UDP ports, custom application protocols, or non-web services often requires manual configuration, increases cost, or remains unsupported. Game servers running on ports 25565 (Minecraft), 27015 (Source Engine), 7777 (Ark), or custom ranges face this limitation.

Kernel-layer solutions handle any protocol the Linux network stack supports. XDP programs parse Ethernet, IP, TCP, UDP, and ICMP headers directly, enabling granular rules for any port range, protocol combination, or packet size threshold without external dependencies.

Cost Structure and Scalability

Cloud DDoS protection pricing typically follows three models: flat monthly bandwidth commitments, tiered capacity reservations, or pay-per-attack surcharges. For infrastructure under frequent or sustained attack, costs can escalate unpredictably. A week-long campaign at 50 Gbps may incur thousands of euros in overage fees.

On-server kernel protection incurs fixed costs: the server hardware itself and minimal management overhead. PAKKT pricing, for instance, runs €3 per agent per month regardless of attack frequency or volume (within the server's uplink capacity). This predictable cost model suits budget-constrained teams and high-attack-frequency environments.

Operational Complexity and Integration

Cloud scrubbing requires DNS changes, SSL certificate management for HTTPS interception, origin IP concealment, and coordination with the provider's support team during attacks. On-server solutions integrate directly into existing Linux infrastructure, coexist with Docker networking, and expose metrics through standard observability stacks.

Platforms like PAKKT centralize XDP and nftables management through a web dashboard, eliminating the need for manual BPF compilation or eBPF toolchain expertise. Integration with server management panels—such as Pterodactyl—streamlines deployment across fleets of game servers or application instances.



Hybrid Architecture: Layering Cloud and Kernel Protection

The most resilient infrastructures deploy both layers in tandem. Cloud DDoS protection absorbs terabit-scale volumetric attacks that exceed server uplink capacity, while kernel-level XDP and nftables filters handle protocol-specific threats, application-layer exploits, and attacks that evade upstream heuristics.

In this model, cloud scrubbing acts as the first line of defense against bandwidth saturation, routing only "clean" traffic to origin servers. On the server, XDP programs enforce strict protocol validation, port-specific rate limits, and IP blacklist/whitelist policies. Nftables adds stateful connection tracking to block SYN floods, enforce TCP flag correctness, and apply per-connection rate limiting for authenticated users.

# Example nftables rule: SYN flood protection with conntrack
nft add table inet pakkt
nft add chain inet pakkt input { type filter hook input priority 0 \; }
nft add rule inet pakkt input tcp flags syn ct state new limit rate 100/second accept
nft add rule inet pakkt input tcp flags syn ct state new counter drop

This layered approach also provides operational redundancy. If an attacker discovers the origin IP address and bypasses cloud scrubbing via direct targeting, kernel-level defenses remain active. Conversely, if on-server filtering reaches CPU or bandwidth limits, cloud scrubbing absorbs the overflow.

For teams managing diverse workloads—web applications requiring HTTPS inspection alongside game servers demanding low latency—hybrid deployment tailors protection to each service. HTTP traffic routes through cloud scrubbing for application-layer intelligence, while UDP game protocols leverage on-server XDP for minimal latency and protocol flexibility.


Detailed network diagram illustration showing packet flow through cloud scrubbing layer (top) and on-server XDP/nftables filtering (bottom), with stylized blue data streams, firewall icons, and server rack representations, professional technical documentation aesthetic


Practical Implementation Considerations for 2026

Deploying kernel-level protection in 2026 requires Linux kernel 5.x or higher with XDP support enabled in the network driver. Most modern distributions (Ubuntu 22.04+, Debian 12+, Rocky Linux 9+) meet this requirement out of the box. Verify driver compatibility with ethtool -i eth0 and confirm XDP mode support (native, offload, or generic).

When configuring XDP programs, ensure the BPF verifier accepts your rule logic. The PAKKT Engine, for example, supports up to 256 simultaneous rules driven by BPF maps, balancing expressiveness with verifier complexity limits. Rules can specify port ranges, protocols (TCP/UDP/ICMP/any), action types (DROP, RATE_LIMIT, ALLOW_ONLY), global and per-port packet-per-second thresholds, and min/max packet size filters.

For nftables integration, isolate DDoS mitigation rules in a dedicated table (inet pakkt) to avoid conflicts with Docker's nat table, fail2ban's dynamic filter chains, or iptables-persistent rules. Use connection tracking (ct state) and meters (meter, limit) for stateful rate limiting without maintaining per-IP state in userspace.

Monitor kernel-level filtering through BPF map statistics, nftables counters, and system observability tools. Platforms like PAKKT expose real-time metrics (packets dropped per rule, top source IPs, GeoIP distribution) in a centralized dashboard backed by TimescaleDB for historical analysis. This telemetry informs rule tuning and attack attribution.

Regarding cloud DDoS protection, ensure your provider supports your protocol mix and latency requirements. Review service-level agreements (SLAs) for mitigation activation time, false-positive rates, and support responsiveness during active incidents. For hybrid deployments, coordinate IP whitelisting between cloud scrubbing and on-server blacklists to prevent legitimate traffic from being double-filtered.

Finally, maintain up-to-date rulesets. Attack techniques evolve continuously—new reflection vectors, novel protocol exploits, and botnet innovations emerge monthly. Subscribe to threat intelligence feeds from authoritative sources like US-CERT and incorporate indicators of compromise into your XDP and nftables configurations.



Conclusion

Choosing between cloud DDoS protection and on-server kernel filtering in 2026 hinges on attack surface, latency requirements, protocol diversity, cost predictability, and operational preferences. Cloud scrubbing excels at absorbing volumetric terabit-scale floods but introduces latency and protocol limitations. Kernel-layer XDP and nftables deliver sub-microsecond packet filtering at line rate, preserving low latency for real-time applications while incurring fixed infrastructure costs. Hybrid architectures combine both layers for comprehensive defense, routing bandwidth-saturating attacks through upstream scrubbing while enforcing protocol-specific rules and application-layer validation on-server.



FAQ

Can XDP filter multi-terabit DDoS attacks that exceed server uplink capacity?

No. XDP processes packets after the network interface receives them; if an attack saturates the physical uplink (e.g., 500 Gbps flood on a 100 Gbps link), packets drop at the NIC hardware level before XDP runs. For volumetric attacks exceeding server bandwidth, upstream cloud scrubbing is required. XDP excels at filtering attacks within the server's uplink capacity through sub-microsecond per-packet decisions.

Does nftables stateful tracking conflict with existing iptables or Docker rules?

Not if you isolate rules in a separate table. Creating an inet pakkt table with dedicated chains avoids interference with Docker's nat table, fail2ban's filter chains, or iptables-persistent configurations. Nftables and iptables share the same Netfilter kernel hooks but maintain independent rule namespaces when properly segmented.

What kernel version and driver features are required for XDP deployment in 2026?

Linux kernel 5.x or higher with XDP-capable network drivers. Verify support with ethtool -i eth0 and check for xdp or xdpgeneric in driver features. Most modern NICs (Intel i40e, ixgbe; Mellanox mlx5) support native XDP mode for optimal performance. Generic XDP mode works on any driver but incurs higher CPU overhead and lower packet-per-second throughput.

Protect your servers

Deploy PAKKT in 30 seconds

Dual-layer kernel protection. XDP + nftables. Driven from a central panel. 7-day free trial.