Get Fastly bot protection in real time with the DataDome-Fastly integration.
Fastly is best known as the “real-time CDN”, so what better match could there be than the real-time bot protection solution?
DataDome provides AI-powered real-time bot protection against all OWASP automated threats, including credential stuffing, layer 7 DDoS attacks, SQL injection, and scraper bots.
DataDome integrates with any web infrastructure via a range of server-side modules that are optimized for different technologies. In this article, you will learn how our Fastly bot protection module works, and how to start protecting your online assets from bad bots without making any changes to your architecture.
Why choose DataDome-Fastly bot protection?
By leveraging the DataDome-Fastly bot detection & protection module, you can expect:
- Real-time protection from all OWASP automated threats.
- Fastly DDoS protection.
- Unrivaled self-serve and real-time customization options, thanks to a powerful custom rules engine.
- More reliable analytics, with data that distinguishes bots from humans with precision.
Combined with the client-side SDKs and a Javascript tag, the Fastly integration will protect all your endpoints, from web service APIs to login forms and mobile apps. Because legitimate traffic patterns will vary from endpoint to endpoint, we use specific algorithms for each one.
To fine-tune your setup, you can create real-time custom rules to override the AI’s decisions. You can also allow or deny access for specific groups of visitors based on different criteria.
How the DataDome-Fastly integration works:
Before the regular Fastly process, the DataDome module sends a preflight request to the closest DataDome PoP. If it detects that the request is generated by a malicious bot, the module will block it. If it’s a human or a good bot, the request continues its normal process through Fastly.
Because the DataDome logic is executed before the regular Fastly process, it provides efficient real-time protection, both for cached and non-cached pages. Interaction with visitor requests takes place at the edge location, geographically close to each user, with a latency of less than 5 milliseconds.
The DataDome-Fastly integration protects the user experience for human visitors—if any errors were to occur during the process, or if a timeout were reached, the module would automatically disable its blocking process and allow the regular Fastly process to continue.
Leveraging Fastly VCL snippets for frictionless deployment:
The DataDome module for Fastly uses the Varnish Configuration Language (VCL). One way to deploy the integration is to upload the custom DataDome VCL file via your Fastly console. Like other custom VCLs, this file will be assembled with your other VCLs automatically by Fastly.
In practice, integrating the DataDome VCL file in complex existing environments requires a fair bit of manual configuration. However, the latest version of our integration leverages the VCL snippet functionality, which is ideal for adding only the small sections of DataDome code that are needed.
You can use either regular VCL snippets via the Fastly dashboard, or dynamic VCL snippets via the Fastly API.
Regular VCL snippets get created as you build versions of your Fastly configurations, and you can treat them like any other Fastly object. If you choose this option, all you have to do is create a new version of your Fastly service, then go to the VCL snippets category in your Fastly dashboard and upload the six DataDome VCL snippets there.
Dynamic VCL snippets can be modified and deployed any time they’re changed, independently from service changes. Dynamic snippets can only be created via the Fastly API, but the deployment can be easily automated thanks to Terraform. You will need to update your Terraform configuration with your Fastly API key.
Getting started with the DataDome module for Fastly bot protection:
To start testing out DataDome-Fastly bot protection, click the Free trial button below and create your account now. It takes less than a minute, you don’t need a credit card, and there’s no commitment.
Next, ask Fastly’s customer support to enable DataDome support for your Fastly service. You can either create a new Fastly service or use an existing one, and then create a new version of your service by cloning your actual version.
Then simply follow the Fastly module installation instructions for your chosen integration option.
As soon as the DataDome integration has been installed, you will be able to access your personal dashboard, where you can see your traffic in real-time categorized by threats. Ta-da!