SP// Serverless
Scripting
You write it. We run it. Right where users first reach the internet—serverless at the edge.
Accelerate Applications
Increase Scalability
Integrate Services
Reduce Costs
How it works
Simply upload your code or compose it in our portal’s IDE. Your serverless script is instantly deployed in all of our full-scale edge locations around the world. Then whenever a relevant HTTP(S) request hits our platform, your script is triggered and runs in the edge location closest to the request’s origin.
Your script can modify the request, its response, even make new requests of additional StackPath Edge Compute, Edge Services, or third-party workloads. Unconstrained by the limits of physical or virtual server structures, your compute scales instantly and is always available.


We check the serverless script code right into a GitHub repository and use StackPath’s CLI to deploy it. Within seconds it’s live. There’s virtually no population time. It’s great.”
Jason Byrne • VP, Software Development, FloSports
Use cases
Serverless Scripting is fast, flexible, and scalable. Here are just a few ways you can use it—our customers come up with new ideas every day.
Creating API gateways
Collect and process API requests from multiple endpoints and then return a single response, rather than each endpoint having to provide individual responses. This increases API responsiveness and can reduce cost of API operations.
Creating load balancing
Analyze and intelligently route inbound requests based on user characteristics to different resources anywhere in the cloud. This balances workloads and traffic to optimize your overall operations and costs, and to improve end-user experience.
Creating firewalls
Analyze inbound requests to direct or block traffic based on its authorization. This protects your applications and infrastructure from malicious activity, unwanted bots and other automated traffic, without sacrificing access and performance for good traffic.
Adding security headers
Automatically add HTTP security headers to all outbound responses without modifying core application, improving security and privacy for both you and your end users.
Authenticating users
Integrate an authentication management service into your workflow, triggering authorization processes for any inbound request and subsequently allowing access. This increases privacy, protects valuable content, and total access control.
Prioritizing users
Route users through different page flows or customer journeys based on end-user characteristic. This lets you control and prioritize access to create different levels and content of end-user experiences and create value-adding traffic management models.
Personalizing end-user experiences
Dynamically modify HTML pages with content based user characteristics such as geographic location, daypart, authenticated customer data, type of device, cached information, and more. This delivers highly personalized user experiences without compromising response time.
Improving Search Engine Optimization (SEO)
Create triggers to deliver pre-rendered HTML pages when a user-agent is identified as a search engine crawler. This accelerates your site’s responsiveness and page load time for higher search engine scores.
Converting/optimizing images
Transform images in real-time—such as scaling, compression, and transcoding—in response to unique characteristics of the inbound request—like device type, network speed, and more. This lets you dynamically optimize the delivery and appearance of visual content.
Simplifying A/B Testing
Deliver alternate (random or controlled) website or webpage options without implementing redirects or alternate URLs. This simplifies ongoing multi-variate testing and reduces its impact on website performance and responsiveness.

Learn about SP// Containers & SP// VMs
Every workload is different. Pick the right infrastructure to meet your unique needs.
IDE & sandbox
The powerful IDE in our customer portal makes developing at the edge easier than ever. And our full-featured Serverless Scripting sandbox lets you test your scripts before pushing them to production.


Always on
Rather than VMs or containers that might have to be spun or warmed up, scripts are always ready to respond and only charged for when and where they are executed. Additionally, scripts on StackPath execute faster than those on other platforms, with significantly quicker startup times.
All locations included
Your scripts are deployed to all StackPath edge locations with no additional charge, ready to be executed in the location closest to any incoming request. Scripts can even be easily customized to provide specific functionality per edge location.
Key features
Robust APIs & CLI Tool
Integrate scripts into CI/CD processes to make managing your scripts a simple addition to your existing workflow.
Customer Portal & IDE
Quickly compose, manage, and monitor scripts and their performance through our easy-to-use customer portal.
Chrome V8 JavaScript Engine
Leverage blazing fast execution engine that translates code into native machine language in real-time on execution.
Example Script Library
Use, revise, and share example scripts to get your functions up and running right away or explore new applications.
Secure Sandboxing
Each script runs in its own, isolated sandbox—one script, one sandbox for higher security and reliability.
All Locations Included
Scripts deployed to all edge locations with no additional charges for using the whole StackPath network.
Immediate Execution
Scripts uploaded, created, or changed in the customer portal are pushed to every StackPath edge location within 2 seconds.

We experienced a 30% cost savings with StackPath’s serverless scripting and received premium quality support while optimizing the cookie-sync for our real time bidding platform.”
Reda Guermas • VP of Technology, Ad Tech, Future